Skip to content
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

Check version bump on release branches' update #10024

Merged
merged 3 commits into from
Apr 19, 2024

Conversation

GangWang01
Copy link
Contributor

@GangWang01 GangWang01 commented Apr 17, 2024

Fixes #9960

Context

VersionPrefix should be updated on each commit to our service branches (vsXX.YY) to prevent clashes of the produced packages with same version that would cause issues later down the VS insertion pipeline.

Though currently we use GH polices to inform us about this, it still requires user action and can be prone to errors.

Changes Made

Add a build step checking version bump on release branches' update. If it's not updated, fail the run with the message asking to update the version.

Need to backport to active release branches.

Testing

Tested with test PR #10017.

Notes

@GangWang01 GangWang01 requested a review from a team as a code owner April 17, 2024 05:59
Copy link
Member

@JanKrivanek JanKrivanek left a comment

Choose a reason for hiding this comment

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

Looks good!

I'd like to see this limited to release branches and properly handling the initial release branch commit (the 'branding PR')

I as well voiced a wish for opt out pipeline variable... but since this is only on PR build, not on the release build - it's ok without opt-out

.vsts-dotnet-ci.yml Show resolved Hide resolved
.vsts-dotnet-ci.yml Show resolved Hide resolved
…o release branch or the change from dotnet bot
Copy link
Member

@JanKrivanek JanKrivanek left a comment

Choose a reason for hiding this comment

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

Thank you for improvements!

The only reason why I request changes is the exception for maestro-bot - let's remove that one.
Otherwise it's good to go!

.vsts-dotnet-ci.yml Show resolved Hide resolved
.vsts-dotnet-ci.yml Outdated Show resolved Hide resolved
Copy link
Member

@JanKrivanek JanKrivanek left a comment

Choose a reason for hiding this comment

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

Thank you!

@JanKrivanek JanKrivanek enabled auto-merge (squash) April 19, 2024 09:56
@JanKrivanek JanKrivanek merged commit aa68ac1 into main Apr 19, 2024
9 of 10 checks passed
@JanKrivanek JanKrivanek deleted the vs-check-version-update branch April 19, 2024 10:33
@GangWang01
Copy link
Contributor Author

@JanKrivanek do we need to backport to active release branches?

@JanKrivanek
Copy link
Member

@JanKrivanek do we need to backport to active release branches?

Yeah - good point!

@JanKrivanek
Copy link
Member

/backport to vs17.10
/backport to vs17.9
/backport to vs17.7

Copy link
Contributor

Started backporting to vs17.10: https://github.com/dotnet/msbuild/actions/runs/8752995312

@JanKrivanek
Copy link
Member

/backport to vs17.9

@JanKrivanek
Copy link
Member

/backport to vs17.7

Copy link
Contributor

Started backporting to vs17.9: https://github.com/dotnet/msbuild/actions/runs/8753015552

Copy link
Contributor

Started backporting to vs17.7: https://github.com/dotnet/msbuild/actions/runs/8753015998

Copy link
Contributor

@JanKrivanek backporting to vs17.9 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: Check version bump on release branches' update
Using index info to reconstruct a base tree...
M	.vsts-dotnet-ci.yml
Falling back to patching base and 3-way merge...
Auto-merging .vsts-dotnet-ci.yml
CONFLICT (content): Merge conflict in .vsts-dotnet-ci.yml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Check version bump on release branches' update
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

Copy link
Contributor

@JanKrivanek an error occurred while backporting to vs17.9, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

Copy link
Contributor

@JanKrivanek backporting to vs17.7 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: Check version bump on release branches' update
Using index info to reconstruct a base tree...
M	.vsts-dotnet-ci.yml
Falling back to patching base and 3-way merge...
Auto-merging .vsts-dotnet-ci.yml
CONFLICT (content): Merge conflict in .vsts-dotnet-ci.yml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Check version bump on release branches' update
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

Copy link
Contributor

@JanKrivanek an error occurred while backporting to vs17.7, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

JanKrivanek added a commit that referenced this pull request Apr 19, 2024
@JanKrivanek
Copy link
Member

Backported manually to vs17.7 #10042
vs17.9 and vs17.10 will get the change via the flow

surayya-MS added a commit that referenced this pull request Apr 19, 2024
surayya-MS pushed a commit to surayya-MS/msbuild that referenced this pull request Apr 24, 2024
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.

[Infra] Automate version bump on release branches updates
3 participants