Skip to content

workflow: add PR types explanation #475

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Apr 30, 2018

Conversation

0xc0170
Copy link
Contributor

@0xc0170 0xc0170 commented Mar 28, 2018

Every PR type should be clear to a user.
It is a user responsibility to specify PR type and accept the versioning based on it.

Fixes #429

Proposal to define PR types. I would like to reference this in every pull request so all of us are aware of the responsibility to select the proper type and the release label selection based on that.

Needs more work to be more clear and specify more details, expecting lot of comments 🔥

@sg- @cmonr @adbridge @theotherjimmy @kjbracey-arm Please review


Any change that results in breaking user space. It should have strong justification to be considered. Often the change could be made backward compatible, for example deprecate the old functionality and introduce the new replacement.

Release: minor version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be major version?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, major version is the 5. , next one will be 6. in a year's time

Copy link
Contributor Author

@0xc0170 0xc0170 Mar 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

major would be 6.x , we do 5.x - minor.. .sometimes called feature release.

@AnotherButler what shall we define here ?

Same question below by @geky , should be documented somewhere

Copy link
Contributor

@geky geky Mar 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we don't make breaking changes on minor releases.

(If we do those should be painful exceptions)

Looking at the current rules, what's the motivation for a contributor to make a change "feature" vs "breaking"? They both get released at the same time.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is just a classification. If someone rewrites an algorithm which totally changes the behaviour of the system, then that is a breaking change but not a new feature....

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we don't make breaking changes on minor releases.

Yes, this should not be seen often and thus should really provide strong reason to be considered. there are usually ways to do it backward compatible, but might not always be the case.

It is just a classification. If someone rewrites an algorithm which totally changes the behaviour of the system, then that is a breaking change but not a new feature....

Proposals for better specification of a breaking change ? It can be fix, feature or refactor if it results in breaking a user space. we can provide better examples here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A breaking changes is any change, other than the introduction of a new feature, which changes the user experience of the functionality.


A bug fix should be backward-compatible internal change that fixes incorrect behavior. The fix should provide a description what and how it fixes the issue. The test should be included to catch this issue in the future and confirm the correct behavior.

Release: patch version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we go over versions somewhere in docs? maybe we should link there in this page so these terms are defined? @AnotherButler?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@geky geky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great 👍

Copy link
Contributor

@sg- sg- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Biggest change is that there should be an introduction to our versioning. Major.feature.patch and then replace all use of minor with feature.

@0xc0170
Copy link
Contributor Author

0xc0170 commented Mar 28, 2018

I'll add the versioning and update this


##### Fix

A bug fix should be backward-compatible internal change that fixes incorrect behavior. The fix should provide a description what and how it fixes the issue. The test should be included to catch this issue in the future and confirm the correct behavior.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace "The test should...." with either "A test should..." or "Tests should..."


A bug fix should be backward-compatible internal change that fixes incorrect behavior. The fix should provide a description what and how it fixes the issue. The test should be included to catch this issue in the future and confirm the correct behavior.

Release: patch version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


##### Fix

A bug fix should be backward-compatible internal change that fixes incorrect behavior. The fix should provide a description what and how it fixes the issue. The test should be included to catch this issue in the future and confirm the correct behavior.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A seperate suggestion: replace suggestive text with active text.

An example: "A bug fix should be backwards-compatible..." would be transformed to "A big fix is backwards-compatible....".

Imo, this makes our enforcement job easier by making reviews stricter, and leaving negotiation leverage with us instead of suggesting that PR authors can barter for leeway.


##### Refactor

Refactors are intended for minor versions if they are not fixing specific issue as they
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it assumed that a refactor is common knowledge here? This described what they're targeted for, but not -what- they are.


##### Feature

New features targets minor releases. It can be integrated only if the feature supports most of the targets (if it requires new target HAL implementation).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Echoing @geky comment about what is a major/minor/patch release, if it isn't already documented.


New features targets minor releases. It can be integrated only if the feature supports most of the targets (if it requires new target HAL implementation).

Adding a new functionality is considered to be a feature. It does not matter if it is C++ or C.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about how the PR relates to tools? Python?

@0xc0170
Copy link
Contributor Author

0xc0170 commented Apr 3, 2018

Updated. It now contains versioning section + responded to all @cmonr comments.


Any change that results in breaking user space. It should have strong justification to be considered. Often the change could be made backward compatible, for example deprecate the old functionality and introduce the new replacement.

Release: feature
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I added versioning here, this should be major version to be correct.

Copy link
Contributor

@kjbracey kjbracey Apr 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe mbed OS 5 has ever attempted to truly follow semantic versioning, as mbed OS 3 components did - there's been some flexibility on this one. My understanding is we don't deliberately totally break stuff, like binning complete APIs, but we do allow incompatible changes at 5.X to correct API flaws if the deprecation alternative isn't straightforward. (Eg errno mapping changes).

My understanding was that there was an expectation that apps may need to make some changes for a feature release, and as such inclusion version references should be explicit, rather than automatically "take latest" like Yotta, but changes for 5.X should be straightforward.

We're a bit Linux kernely with version number in that regard, rather than user-space shared library. The patch boundary is relatively clear, but when to increment the top digit less so. I have a suspicion the top digit is reserved for marketing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a suspicion the top digit is reserved for marketing.

ಠ_ಠ

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds correct. I don't think we do our major releases quick enough to strictly enforce semanic versioning, specifically in regards to deprecation warnings.

Copy link
Contributor Author

@0xc0170 0xc0170 Apr 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kjbracey-arm Agree. We were flexible (we keep backward compatibility as long as we can, but some breaking changes were done and were part of feature releases).

What goes to major release then?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From discussions with @sg-, it would be the time to remove /all/ the already-deprecated things, and potentially introduce significant breaking changes that we might be reluctant to do for a regular 5.X.

Wider-scale naming clean-up might also be a thing - some discussions about proposed Serial/UARTSerial structural cleanups have come into that area.

So I'd say major release is very-breaking changes, including refactors that are a bit too breaking to justify for a 5.X, and dropping deprecated stuff.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in the new commit (major to be).

Version number MAJOR.FEATURE.PATCH where:

- MAJOR version for incompatible API changes
- FEATURE version for adding functionality in backward-compatible manner
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. So we're abandoning the MINOR release terminology?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"functionality in backward-compatible manner" to "functionality in a backwards-compatible manner"

Copy link
Contributor Author

@0xc0170 0xc0170 Apr 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we have feature releases.

language will fix (waiting for Amanda to guidance)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marketing strikes again!

Copy link
Contributor

@theotherjimmy theotherjimmy Apr 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of my least favorite "we renamed a standard thing" instances.


##### Fix

A bug fix is backward-compatible internal change that fixes incorrect behavior. The fix provides a description what and how it fixes the issue. Tests are included to catch the issue in the future and confirms the correct behavior.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"is backward-compatible" to "is a backwards-compatible"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"The fix provides a description what and how it fixes the issue."

I'm not sure what's trying to be said here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what's trying to be said here.

I'll remove that one, it is in git guidance above

"is backward-compatible" to "is a backwards-compatible"

@AnotherButler I believe both are correct, aren't they? If not, let me know and I'll do edits


##### Refactor

Refactors are intended for feature releases if they are not fixing specific issue as they
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is code cleanup considered a refactor?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, is the newline between 102 and 103 intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is code cleanup considered a refactor?

It really depends on the scope and changes made.


New features targets feature releases. It can be integrated only if the feature supports most of the targets (if it requires new target HAL implementation).

Adding a new functionality is considered to be a feature. It does not matter if it is C++, C or Python.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


Any change that results in breaking user space. It should have strong justification to be considered. Often the change could be made backward compatible, for example deprecate the old functionality and introduce the new replacement.

Release: feature
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds correct. I don't think we do our major releases quick enough to strictly enforce semanic versioning, specifically in regards to deprecation warnings.

@0xc0170
Copy link
Contributor Author

0xc0170 commented Apr 5, 2018

I rebased to resolve conflicts, up to date!


##### Breaking change

Any change that results in breaking user space. It should have strong justification to be considered. Often the change could be made backward compatible, for example deprecate the old functionality and introduce the new replacement.
Copy link
Contributor Author

@0xc0170 0xc0170 Apr 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SenRamakri asked good question. As this is quite serious type of pull request, we might want to clarify more.

Shall I add breaking user space (an application requires changes to continue working) or similar. This also leads to another good question is - what can actually break (what is considered public vs internal) ? It might be good to answer this via separate PR. So lets stick here for what is breaking change and how to make it clear to users.

@0xc0170
Copy link
Contributor Author

0xc0170 commented Apr 10, 2018

Another round for review ! 📲

Copy edit latest content.
@AnotherButler
Copy link
Contributor

We have most/some of this content here: https://os-doc-builder.test.mbed.com/docs/development/introduction/how-we-release-arm-mbed-os.html

Would it make sense to move that content from the intro to here?

@0xc0170
Copy link
Contributor Author

0xc0170 commented Apr 12, 2018

Would it make sense to move that content from the intro to here?

I can move there the versioning. And reference it here? Need to find where is md file for that page

@0xc0170
Copy link
Contributor Author

0xc0170 commented Apr 13, 2018

@AnotherButler I updated the PR. As the document you shared with me already contains the info I was looking for, I kept the section but just a reference to the release document (this way people can get versioning info that we reference below). Review please

Fix sentence for consistent voice throughout and across documents
@AnotherButler
Copy link
Contributor

@sg- Is this OK to merge, or does your "needs changes" still stand?

@AnotherButler AnotherButler merged commit 03559e0 into ARMmbed:new_engine Apr 30, 2018
AnotherButler pushed a commit that referenced this pull request Apr 30, 2018
Make changes from PR #475 to live site after reviewing on test site.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants