-
-
Notifications
You must be signed in to change notification settings - Fork 168
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
Add "Must bump version" check #59
Comments
👍 |
Its is posible if you add https://github.com/OCA/maintainer-quality-tools/blob/master/travis/cfg/travis_run_pylint_pr.cfg#L14 |
Or are you talking about auto increase the version number to manifest file? Like as a plugin to odoo modules of https://pypi.python.org/pypi/bumpversion/0.5.3? |
👍 for adding the check. |
The point is not to autoincrement (that depends on the type of change made). |
@dreispt I'm agree with you What about if 2 people are working in 2 different changes? Generally in many projects the change of versions are controlled from stable branch to avoid this issues. IMHO we should think use a workflow (auto or manual) to change it from stable branch. |
👍 with the check |
@moylop260 I think that's a corner case we can live with. And if two people are changing the same module, odds are that you will have conflicts and need a rebase. |
Could somebody help me to create this check? If you want help use the following videos to learn |
Maybe this check is not a IMHO It's a new script from MQT, since we have git_run script to know a |
Actually I'm not sure bumping version at each PR is the right thing to do. In "normal" projects the maintainer bumps the version when he does a release. Between releases there is dev, alpha and beta versions. If we want to encourage faster merges (aka optimistic merges) we need a mechanism to mark releases that the maintainer deems stable. So in the current state of affairs, I believe it's better to not force bumping versions in each PR and let the maintainer do it manually when he thinks the module is stable enough. |
+1 with @sbidoul |
@sbidoul AFAICT in OCA world every PR merge is a stable release. |
To make it clear: my suggestion is not for automatic version bumping - that should be a human action, since we must decide what digit to bump. |
Yes, and I think we must strive to change that. That's why I'm 👎 on this check: encouraging people to bump version at each merge would make it harder to transition to optimistic merge + manual release. |
I think that we will need a better tagging mechanism if we start releasing non-stable versions, with beta/alpha tags excluded from the Odoo Apps store & everyone's automatic upgrade systems. Stable module one day, broken the next - not really the way to go IMO. 👍 on the check, 👎 on auto-bump BTW |
Maybe we are seeing the modules like as a python package. The point is that working with python package you don't change the version in each PR. Imagine 3 developers working in a PR in the same module.
After days of feedback and more commits a PR is merged.
After fix conflicts
After days of feedback and more commits a PR is merged.
After fix conflicts (Again)
IMHO a bump version is not work of a pull request. I my case if I see a opened PR of the same module... better I will wait a merge before of create my PR today in order to avoid the game of conflicts, fix, rebase, conflicts, fix, rebase... IMHO It should be work of the maintainer who decide what PR merge first. For pylint-odoo we are using pbr and if we create a new We decide the version with the tag. Other tools to bumpversion is bumpversion to auto increase the version
This auto-create a commit, a tag and change the manifest. We decide the version with the patch|minor|major command. Maybe, we can use a mix of pbr and bumpversion to change the manifest version based in (something):
I don't know what is the better solution for 2 worlds. |
@lmignon What is you opinion for this? |
If there is many PR on the same module, the second PR should be made [image: Ursa Information Systems] Ursa Information Systems
On Wed, Oct 19, 2016 at 4:59 PM, moylop260 notifications@github.com wrote:
|
@max3903 I dont understood you sorry |
Instead of having 3 PR opened against the OCA branch. The second and third One example: [image: Ursa Information Systems] Ursa Information Systems
On Wed, Oct 19, 2016 at 5:11 PM, moylop260 notifications@github.com wrote:
|
This is most unusual. |
Also, if there is 3 PR on the same module, maybe an issue should have been [image: Ursa Information Systems] Ursa Information Systems
On Wed, Oct 19, 2016 at 5:18 PM, Stéphane Bidoul (ACSONE) <
|
FWIW |
You raise a good point. I am coming around to see the need for the version bump being outside of the PR. Here's an example of PRs submitted to the same module, all with independent purposes and no conflicts between them (from what I remember):
None of these PRs raised the patch version in the manifest. Had we tried to do so, the respective authors would have had to watch for other authors' PRs to possibly get merged in front of their's. Another question is the credibility of the CI after another branch for the same module has been merged. How will it know that the version has incremented from under it? While our amazing concept of modularity does keep us from this in most cases, it does happen.
IMO this only holds true if the PRs are linked to each other in some way. If I author a bug fix, I don't expect to become responsible for a feature addition due to a PR being submitted to my branch. This could also cause lost PRs if they are being submitted to not-so-responsive repos. |
Using
|
@moylop260 I like the idea to auto increment the .fix number (if .breaking or .feature or .fix are not already incremented) on merge. IMO that should be done in a dedicated script (no transifex) and use the @sbidoul script. |
Thanks, I'm updating #59 (comment) with votes to have all clear. I added 5th option from #59 (comment). @lmignon By manual do you mean option 1, 4 or 5? |
@yajo if you consolidate votes in the same comment, please make sure to include all +/- arguments too. |
I'm trying to, please tell me the +/- points you miss for any of them 😉 |
@yajo for instance you do not reflect my argument about staying close to usual open source processes. Also when you say "aims to change current workflow" this is not accurate. I do not want to change the current workflow now, I want to keep the door open to evolving the current workflow. This is quite different. |
Thanks, I changed both. If you miss any other points, please tell. |
My vote is for option 2: autobump last position (fix), manually change others. |
I vote for opt |
My vote diverges a bit, but it's something that has already be said: we must check in MQT that the version is changed on each PR (that is to force user to change it), but leave the user to decide which part he/she changes according the PR. Conflicts because of this won't be the usual day to day. |
What if opt 2 could be tied to a keyword in PR name? Like: |
If possible, it would be cool. You mean trigger the linter (opt.1) if |
yep, would be nice and make everybody happy... I guess :) |
Nice, option 7 added, I switch our votes for that. 😉 |
For me the bump for fix and improvement is something that must be done the merging process. However, if we can simply automate it, it would be great. We have 4 cases to take care of: automated (to do while merging, responsibility of the merger):
manually changed by commiter in the PR:
Thus the check on title might not be necessary if version was manually changed. Unless we want to force all PR title to a set of tags in which case we could extend the automated behavior to bigger changes like migration and major versions using tags in each PR title. |
I think that could lead to problems. When we talk about a FIX, it always increases 5th number; but an IMP could increase the 4th number (if it is non-breaking) or the 3rd (if it is breaking). The responsibility to choose which one to increase in this case is for a human. Also, the point for automatic bump is fix simultaneous PR conflicts. Yes, it could happen that 2 IMPs come at the same time for the same addon, but seems not so usual, and a rebase in that case could be required not just for the version but for the code too, so I would not lose too much time in making such a hard job that would just cover a random percent of contributions. Option 7 covers 100% of them. BTW, having 2 MIG at the same time is out of scope; conflict is guaranteed, so nothing to do there. In any case, I think that your suggestion could be applied in a later step (like v2.0 of the autobumper) if we go for option 7, so let me add it there with your vote. |
Option 7 seems like an ideal scenario, but IMO we will need to align our contribution docs for that. These prefixes aren't mentioned anywhere, so it will be unlikely for anyone other than veterans to get it right. I like to hope for ideal scenario though, so my vote is changed to 7. With my vote on this side of the fence, I'll help out with the docs if it happens 😉 |
You can take the section "Commit message" from Odoo guidelines as reference: https://www.odoo.com/documentation/8.0/reference/guidelines.html |
@sbidoul If we go with option 2, can we package the branches being reviewed [image: Ursa Information Systems] Ursa Information Systems
On Mon, Oct 24, 2016 at 3:48 AM, Daniel Reis notifications@github.com
|
Can we coexist? Can we have PSC or repo where maintainers accepts PR easily I would like to try to see if I get more contributions. [image: Ursa Information Systems] Ursa Information Systems
On Thu, Oct 20, 2016 at 10:03 AM, Pedro M. Baeza notifications@github.com
|
That effort goes well if you only need 1 PR to be merged in your deployment, but if that PR gets stalled or you need more than one, then you still need to do a git merge... And that happens a lot, from my experience.
I wouldn't veto against that as long as stable branches are not affected. If you want to open a 8.0-unstable, 9.0-unstable, etc. branch and merge anything there, I have no problem; but the main reason we can officially support all the hundreds of OCA addons in many companies is the reliable stability filters that code passes before reaching stable. Of course, I hope you agree that merges from i.e. 9.0-unstable to 9.0 should go through a PR. But we are merging 2 issues here. One is the optimistic merge proposal, and other is the autobump one. |
@yajo The problem is that autobump and optimistic merging are incompatible [1]. That's why I advocate manual bump or as, @max3903 suggests, enabling autobump on a per project basis. [1] update: if we want to use the version number bump as a release indicator |
@max3903 Packaging PR's is possible although not trivial. It's mostly unrelated to the option chosen here. Note it's very easy to pip install from a git branch directly (see my slides), so packaging of unmerged PR's is not necessary IMO. |
Well... actually it's not autobump vs optimistic merging. Autobump automates the way OCA currently works, while optimistic merging changes it, so the incompatibility is only in the optimistic merging side of the battle. That proposal should be discussed in a separate thread, please kindly open it somewhere, expose your arguments, and let's not block this one for that. |
Solutions 1 and 5 are essentially the same thing - manual version bumping, basically as of today, and if possible a Lint check (warning or failing, to be decided). |
@moylop260 Independently of the autobump discussion, is the "must bump version" check easy to add to pylint? |
@dreispt Your questions are already answered; please read the thread 😉 |
Sorry for the long comment! |
Superseded by OCA/oca-github-bot#24 |
This is a suggestion for a new check:
When doing a PR, it should bump the module's version should be bumped, either if we are porting, adding feature, or fixing code.
The check should run only for PRs.
Special case: some PR might not involve modules (e.g: changir .travis.yml) - in these case the check should not fail.
The text was updated successfully, but these errors were encountered: