-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Auto upgrade the Golang version #12585
Conversation
… version Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
If a new flag is being introduced:
If a workflow is added or modified:
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
4d8e495
to
1857ee3
Compare
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
70ca79b
to
ec20bb5
Compare
Signed-off-by: Florent Poinsard <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I also tested all the commands and everything seems to work as expected, regarding updating the files etc.
Nice work!
Signed-off-by: Florent Poinsard <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a suggestion as from local testing I saw that we weren't updating the Makefile. The suggested changes fix that, but you can resolve it however you see fit. Requesting changes to prevent someone else from merging this since it would have had all of the requirements met.
Signed-off-by: Florent Poinsard <[email protected]>
Re-requesting your review (again) @mattlord, thanks so much for all the suggestions 🙏🏻 |
Signed-off-by: Florent Poinsard <[email protected]>
Co-authored-by: Matt Lord <[email protected]> Signed-off-by: Florent Poinsard <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
* initial addition of the go_upgrade tool to detect and bump the golang version Signed-off-by: Florent Poinsard <[email protected]> * update go.mod automatically Signed-off-by: Florent Poinsard <[email protected]> * fix isSameMajor version issue Signed-off-by: Florent Poinsard <[email protected]> * update the bootstrap version automatically Signed-off-by: Florent Poinsard <[email protected]> * update the bootstrap docker image changelog Signed-off-by: Florent Poinsard <[email protected]> * uncomment code Signed-off-by: Florent Poinsard <[email protected]> * addition of workflow Signed-off-by: Florent Poinsard <[email protected]> * addition of base to create-pull-request Signed-off-by: Florent Poinsard <[email protected]> * test create PR alternative Signed-off-by: Florent Poinsard <[email protected]> * add flags and getter methods Signed-off-by: Florent Poinsard <[email protected]> * better PR message Signed-off-by: Florent Poinsard <[email protected]> * fix no-workflow-update flag and better PR body msg Signed-off-by: Florent Poinsard <[email protected]> * fix PR title, branch and body format Signed-off-by: Florent Poinsard <[email protected]> * test matrix and pwd path Signed-off-by: Florent Poinsard <[email protected]> * enhanced matrix Signed-off-by: Florent Poinsard <[email protected]> * update_workflows option Signed-off-by: Florent Poinsard <[email protected]> * update workflows independently Signed-off-by: Florent Poinsard <[email protected]> * test without matrix Signed-off-by: Florent Poinsard <[email protected]> * Add docs to go_upgrade and re-add matrix to the workflow Signed-off-by: Florent Poinsard <[email protected]> * support major version upgrade Signed-off-by: Florent Poinsard <[email protected]> * do not update bootstrap version if they are the same Signed-off-by: Florent Poinsard <[email protected]> * migrate to cobra instead of pflags Signed-off-by: Florent Poinsard <[email protected]> * remove redundant comment Signed-off-by: Florent Poinsard <[email protected]> * safety net around replaceGoVersionInCodebase to avoid unrequired upgrade Signed-off-by: Florent Poinsard <[email protected]> * Remove double negation in workflowUpdate flag Signed-off-by: Florent Poinsard <[email protected]> * Use regexp instead of mere string comparison Signed-off-by: Florent Poinsard <[email protected]> * Proper regexp for every string comparison Signed-off-by: Florent Poinsard <[email protected]> * use better regex Signed-off-by: Florent Poinsard <[email protected]> * remove useless flag and improve the auto-PR body description Signed-off-by: Florent Poinsard <[email protected]> * add note in the tool usage to run the tool at the root of the repo Signed-off-by: Florent Poinsard <[email protected]> * add comment in .github/workflows/update_golang_version.yml Signed-off-by: Florent Poinsard <[email protected]> * Apply @mattlord code suggestion Signed-off-by: Florent Poinsard <[email protected]> * replace usages of old filename Signed-off-by: Florent Poinsard <[email protected]> * Apply suggestions from code review Co-authored-by: Matt Lord <[email protected]> Signed-off-by: Florent Poinsard <[email protected]> --------- Signed-off-by: Florent Poinsard <[email protected]> Signed-off-by: Florent Poinsard <[email protected]> Co-authored-by: Matt Lord <[email protected]>
* initial addition of the go_upgrade tool to detect and bump the golang version Signed-off-by: Florent Poinsard <[email protected]> * update go.mod automatically Signed-off-by: Florent Poinsard <[email protected]> * fix isSameMajor version issue Signed-off-by: Florent Poinsard <[email protected]> * update the bootstrap version automatically Signed-off-by: Florent Poinsard <[email protected]> * update the bootstrap docker image changelog Signed-off-by: Florent Poinsard <[email protected]> * uncomment code Signed-off-by: Florent Poinsard <[email protected]> * addition of workflow Signed-off-by: Florent Poinsard <[email protected]> * addition of base to create-pull-request Signed-off-by: Florent Poinsard <[email protected]> * test create PR alternative Signed-off-by: Florent Poinsard <[email protected]> * add flags and getter methods Signed-off-by: Florent Poinsard <[email protected]> * better PR message Signed-off-by: Florent Poinsard <[email protected]> * fix no-workflow-update flag and better PR body msg Signed-off-by: Florent Poinsard <[email protected]> * fix PR title, branch and body format Signed-off-by: Florent Poinsard <[email protected]> * test matrix and pwd path Signed-off-by: Florent Poinsard <[email protected]> * enhanced matrix Signed-off-by: Florent Poinsard <[email protected]> * update_workflows option Signed-off-by: Florent Poinsard <[email protected]> * update workflows independently Signed-off-by: Florent Poinsard <[email protected]> * test without matrix Signed-off-by: Florent Poinsard <[email protected]> * Add docs to go_upgrade and re-add matrix to the workflow Signed-off-by: Florent Poinsard <[email protected]> * support major version upgrade Signed-off-by: Florent Poinsard <[email protected]> * do not update bootstrap version if they are the same Signed-off-by: Florent Poinsard <[email protected]> * migrate to cobra instead of pflags Signed-off-by: Florent Poinsard <[email protected]> * remove redundant comment Signed-off-by: Florent Poinsard <[email protected]> * safety net around replaceGoVersionInCodebase to avoid unrequired upgrade Signed-off-by: Florent Poinsard <[email protected]> * Remove double negation in workflowUpdate flag Signed-off-by: Florent Poinsard <[email protected]> * Use regexp instead of mere string comparison Signed-off-by: Florent Poinsard <[email protected]> * Proper regexp for every string comparison Signed-off-by: Florent Poinsard <[email protected]> * use better regex Signed-off-by: Florent Poinsard <[email protected]> * remove useless flag and improve the auto-PR body description Signed-off-by: Florent Poinsard <[email protected]> * add note in the tool usage to run the tool at the root of the repo Signed-off-by: Florent Poinsard <[email protected]> * add comment in .github/workflows/update_golang_version.yml Signed-off-by: Florent Poinsard <[email protected]> * Apply @mattlord code suggestion Signed-off-by: Florent Poinsard <[email protected]> * replace usages of old filename Signed-off-by: Florent Poinsard <[email protected]> * Apply suggestions from code review Co-authored-by: Matt Lord <[email protected]> Signed-off-by: Florent Poinsard <[email protected]> --------- Signed-off-by: Florent Poinsard <[email protected]> Signed-off-by: Florent Poinsard <[email protected]> Co-authored-by: Matt Lord <[email protected]>
* initial addition of the go_upgrade tool to detect and bump the golang version Signed-off-by: Florent Poinsard <[email protected]> * update go.mod automatically Signed-off-by: Florent Poinsard <[email protected]> * fix isSameMajor version issue Signed-off-by: Florent Poinsard <[email protected]> * update the bootstrap version automatically Signed-off-by: Florent Poinsard <[email protected]> * update the bootstrap docker image changelog Signed-off-by: Florent Poinsard <[email protected]> * uncomment code Signed-off-by: Florent Poinsard <[email protected]> * addition of workflow Signed-off-by: Florent Poinsard <[email protected]> * addition of base to create-pull-request Signed-off-by: Florent Poinsard <[email protected]> * test create PR alternative Signed-off-by: Florent Poinsard <[email protected]> * add flags and getter methods Signed-off-by: Florent Poinsard <[email protected]> * better PR message Signed-off-by: Florent Poinsard <[email protected]> * fix no-workflow-update flag and better PR body msg Signed-off-by: Florent Poinsard <[email protected]> * fix PR title, branch and body format Signed-off-by: Florent Poinsard <[email protected]> * test matrix and pwd path Signed-off-by: Florent Poinsard <[email protected]> * enhanced matrix Signed-off-by: Florent Poinsard <[email protected]> * update_workflows option Signed-off-by: Florent Poinsard <[email protected]> * update workflows independently Signed-off-by: Florent Poinsard <[email protected]> * test without matrix Signed-off-by: Florent Poinsard <[email protected]> * Add docs to go_upgrade and re-add matrix to the workflow Signed-off-by: Florent Poinsard <[email protected]> * support major version upgrade Signed-off-by: Florent Poinsard <[email protected]> * do not update bootstrap version if they are the same Signed-off-by: Florent Poinsard <[email protected]> * migrate to cobra instead of pflags Signed-off-by: Florent Poinsard <[email protected]> * remove redundant comment Signed-off-by: Florent Poinsard <[email protected]> * safety net around replaceGoVersionInCodebase to avoid unrequired upgrade Signed-off-by: Florent Poinsard <[email protected]> * Remove double negation in workflowUpdate flag Signed-off-by: Florent Poinsard <[email protected]> * Use regexp instead of mere string comparison Signed-off-by: Florent Poinsard <[email protected]> * Proper regexp for every string comparison Signed-off-by: Florent Poinsard <[email protected]> * use better regex Signed-off-by: Florent Poinsard <[email protected]> * remove useless flag and improve the auto-PR body description Signed-off-by: Florent Poinsard <[email protected]> * add note in the tool usage to run the tool at the root of the repo Signed-off-by: Florent Poinsard <[email protected]> * add comment in .github/workflows/update_golang_version.yml Signed-off-by: Florent Poinsard <[email protected]> * Apply @mattlord code suggestion Signed-off-by: Florent Poinsard <[email protected]> * replace usages of old filename Signed-off-by: Florent Poinsard <[email protected]> * Apply suggestions from code review Co-authored-by: Matt Lord <[email protected]> Signed-off-by: Florent Poinsard <[email protected]> --------- Signed-off-by: Florent Poinsard <[email protected]> Signed-off-by: Florent Poinsard <[email protected]> Co-authored-by: Matt Lord <[email protected]>
* Auto upgrade the Golang version (#12585) * initial addition of the go_upgrade tool to detect and bump the golang version Signed-off-by: Florent Poinsard <[email protected]> * update go.mod automatically Signed-off-by: Florent Poinsard <[email protected]> * fix isSameMajor version issue Signed-off-by: Florent Poinsard <[email protected]> * update the bootstrap version automatically Signed-off-by: Florent Poinsard <[email protected]> * update the bootstrap docker image changelog Signed-off-by: Florent Poinsard <[email protected]> * uncomment code Signed-off-by: Florent Poinsard <[email protected]> * addition of workflow Signed-off-by: Florent Poinsard <[email protected]> * addition of base to create-pull-request Signed-off-by: Florent Poinsard <[email protected]> * test create PR alternative Signed-off-by: Florent Poinsard <[email protected]> * add flags and getter methods Signed-off-by: Florent Poinsard <[email protected]> * better PR message Signed-off-by: Florent Poinsard <[email protected]> * fix no-workflow-update flag and better PR body msg Signed-off-by: Florent Poinsard <[email protected]> * fix PR title, branch and body format Signed-off-by: Florent Poinsard <[email protected]> * test matrix and pwd path Signed-off-by: Florent Poinsard <[email protected]> * enhanced matrix Signed-off-by: Florent Poinsard <[email protected]> * update_workflows option Signed-off-by: Florent Poinsard <[email protected]> * update workflows independently Signed-off-by: Florent Poinsard <[email protected]> * test without matrix Signed-off-by: Florent Poinsard <[email protected]> * Add docs to go_upgrade and re-add matrix to the workflow Signed-off-by: Florent Poinsard <[email protected]> * support major version upgrade Signed-off-by: Florent Poinsard <[email protected]> * do not update bootstrap version if they are the same Signed-off-by: Florent Poinsard <[email protected]> * migrate to cobra instead of pflags Signed-off-by: Florent Poinsard <[email protected]> * remove redundant comment Signed-off-by: Florent Poinsard <[email protected]> * safety net around replaceGoVersionInCodebase to avoid unrequired upgrade Signed-off-by: Florent Poinsard <[email protected]> * Remove double negation in workflowUpdate flag Signed-off-by: Florent Poinsard <[email protected]> * Use regexp instead of mere string comparison Signed-off-by: Florent Poinsard <[email protected]> * Proper regexp for every string comparison Signed-off-by: Florent Poinsard <[email protected]> * use better regex Signed-off-by: Florent Poinsard <[email protected]> * remove useless flag and improve the auto-PR body description Signed-off-by: Florent Poinsard <[email protected]> * add note in the tool usage to run the tool at the root of the repo Signed-off-by: Florent Poinsard <[email protected]> * add comment in .github/workflows/update_golang_version.yml Signed-off-by: Florent Poinsard <[email protected]> * Apply @mattlord code suggestion Signed-off-by: Florent Poinsard <[email protected]> * replace usages of old filename Signed-off-by: Florent Poinsard <[email protected]> * Apply suggestions from code review Co-authored-by: Matt Lord <[email protected]> Signed-off-by: Florent Poinsard <[email protected]> --------- Signed-off-by: Florent Poinsard <[email protected]> Signed-off-by: Florent Poinsard <[email protected]> Co-authored-by: Matt Lord <[email protected]> * Fix regexp Signed-off-by: Florent Poinsard <[email protected]> --------- Signed-off-by: Florent Poinsard <[email protected]> Signed-off-by: Florent Poinsard <[email protected]> Co-authored-by: Matt Lord <[email protected]>
* Auto upgrade the Golang version (#12585) * initial addition of the go_upgrade tool to detect and bump the golang version Signed-off-by: Florent Poinsard <[email protected]> * update go.mod automatically Signed-off-by: Florent Poinsard <[email protected]> * fix isSameMajor version issue Signed-off-by: Florent Poinsard <[email protected]> * update the bootstrap version automatically Signed-off-by: Florent Poinsard <[email protected]> * update the bootstrap docker image changelog Signed-off-by: Florent Poinsard <[email protected]> * uncomment code Signed-off-by: Florent Poinsard <[email protected]> * addition of workflow Signed-off-by: Florent Poinsard <[email protected]> * addition of base to create-pull-request Signed-off-by: Florent Poinsard <[email protected]> * test create PR alternative Signed-off-by: Florent Poinsard <[email protected]> * add flags and getter methods Signed-off-by: Florent Poinsard <[email protected]> * better PR message Signed-off-by: Florent Poinsard <[email protected]> * fix no-workflow-update flag and better PR body msg Signed-off-by: Florent Poinsard <[email protected]> * fix PR title, branch and body format Signed-off-by: Florent Poinsard <[email protected]> * test matrix and pwd path Signed-off-by: Florent Poinsard <[email protected]> * enhanced matrix Signed-off-by: Florent Poinsard <[email protected]> * update_workflows option Signed-off-by: Florent Poinsard <[email protected]> * update workflows independently Signed-off-by: Florent Poinsard <[email protected]> * test without matrix Signed-off-by: Florent Poinsard <[email protected]> * Add docs to go_upgrade and re-add matrix to the workflow Signed-off-by: Florent Poinsard <[email protected]> * support major version upgrade Signed-off-by: Florent Poinsard <[email protected]> * do not update bootstrap version if they are the same Signed-off-by: Florent Poinsard <[email protected]> * migrate to cobra instead of pflags Signed-off-by: Florent Poinsard <[email protected]> * remove redundant comment Signed-off-by: Florent Poinsard <[email protected]> * safety net around replaceGoVersionInCodebase to avoid unrequired upgrade Signed-off-by: Florent Poinsard <[email protected]> * Remove double negation in workflowUpdate flag Signed-off-by: Florent Poinsard <[email protected]> * Use regexp instead of mere string comparison Signed-off-by: Florent Poinsard <[email protected]> * Proper regexp for every string comparison Signed-off-by: Florent Poinsard <[email protected]> * use better regex Signed-off-by: Florent Poinsard <[email protected]> * remove useless flag and improve the auto-PR body description Signed-off-by: Florent Poinsard <[email protected]> * add note in the tool usage to run the tool at the root of the repo Signed-off-by: Florent Poinsard <[email protected]> * add comment in .github/workflows/update_golang_version.yml Signed-off-by: Florent Poinsard <[email protected]> * Apply @mattlord code suggestion Signed-off-by: Florent Poinsard <[email protected]> * replace usages of old filename Signed-off-by: Florent Poinsard <[email protected]> * Apply suggestions from code review Co-authored-by: Matt Lord <[email protected]> Signed-off-by: Florent Poinsard <[email protected]> --------- Signed-off-by: Florent Poinsard <[email protected]> Signed-off-by: Florent Poinsard <[email protected]> Co-authored-by: Matt Lord <[email protected]> * Fix regexp Signed-off-by: Florent Poinsard <[email protected]> * remove the use of DateOnly Signed-off-by: Florent Poinsard <[email protected]> --------- Signed-off-by: Florent Poinsard <[email protected]> Signed-off-by: Florent Poinsard <[email protected]> Co-authored-by: Matt Lord <[email protected]>
* Auto upgrade the Golang version (#12585) * initial addition of the go_upgrade tool to detect and bump the golang version Signed-off-by: Florent Poinsard <[email protected]> * update go.mod automatically Signed-off-by: Florent Poinsard <[email protected]> * fix isSameMajor version issue Signed-off-by: Florent Poinsard <[email protected]> * update the bootstrap version automatically Signed-off-by: Florent Poinsard <[email protected]> * update the bootstrap docker image changelog Signed-off-by: Florent Poinsard <[email protected]> * uncomment code Signed-off-by: Florent Poinsard <[email protected]> * addition of workflow Signed-off-by: Florent Poinsard <[email protected]> * addition of base to create-pull-request Signed-off-by: Florent Poinsard <[email protected]> * test create PR alternative Signed-off-by: Florent Poinsard <[email protected]> * add flags and getter methods Signed-off-by: Florent Poinsard <[email protected]> * better PR message Signed-off-by: Florent Poinsard <[email protected]> * fix no-workflow-update flag and better PR body msg Signed-off-by: Florent Poinsard <[email protected]> * fix PR title, branch and body format Signed-off-by: Florent Poinsard <[email protected]> * test matrix and pwd path Signed-off-by: Florent Poinsard <[email protected]> * enhanced matrix Signed-off-by: Florent Poinsard <[email protected]> * update_workflows option Signed-off-by: Florent Poinsard <[email protected]> * update workflows independently Signed-off-by: Florent Poinsard <[email protected]> * test without matrix Signed-off-by: Florent Poinsard <[email protected]> * Add docs to go_upgrade and re-add matrix to the workflow Signed-off-by: Florent Poinsard <[email protected]> * support major version upgrade Signed-off-by: Florent Poinsard <[email protected]> * do not update bootstrap version if they are the same Signed-off-by: Florent Poinsard <[email protected]> * migrate to cobra instead of pflags Signed-off-by: Florent Poinsard <[email protected]> * remove redundant comment Signed-off-by: Florent Poinsard <[email protected]> * safety net around replaceGoVersionInCodebase to avoid unrequired upgrade Signed-off-by: Florent Poinsard <[email protected]> * Remove double negation in workflowUpdate flag Signed-off-by: Florent Poinsard <[email protected]> * Use regexp instead of mere string comparison Signed-off-by: Florent Poinsard <[email protected]> * Proper regexp for every string comparison Signed-off-by: Florent Poinsard <[email protected]> * use better regex Signed-off-by: Florent Poinsard <[email protected]> * remove useless flag and improve the auto-PR body description Signed-off-by: Florent Poinsard <[email protected]> * add note in the tool usage to run the tool at the root of the repo Signed-off-by: Florent Poinsard <[email protected]> * add comment in .github/workflows/update_golang_version.yml Signed-off-by: Florent Poinsard <[email protected]> * Apply @mattlord code suggestion Signed-off-by: Florent Poinsard <[email protected]> * replace usages of old filename Signed-off-by: Florent Poinsard <[email protected]> * Apply suggestions from code review Co-authored-by: Matt Lord <[email protected]> Signed-off-by: Florent Poinsard <[email protected]> --------- Signed-off-by: Florent Poinsard <[email protected]> Signed-off-by: Florent Poinsard <[email protected]> Co-authored-by: Matt Lord <[email protected]> * Use go1.18 compatible variable Signed-off-by: Florent Poinsard <[email protected]> * Fix regexp Signed-off-by: Florent Poinsard <[email protected]> * go mod tidy Signed-off-by: Florent Poinsard <[email protected]> --------- Signed-off-by: Florent Poinsard <[email protected]> Signed-off-by: Florent Poinsard <[email protected]> Co-authored-by: Matt Lord <[email protected]>
Description
This Pull Request adds a workflow that runs on manual trigger and every night with a CRON. The goal of the workflow is to update the Golang version to the latest supported version for every branch (
main
+ last 3 supported release branches) and automatically create a Pull Request.A new tool
go-upgrade
is used by this workflow. The tool is described in code: https://github.com/vitessio/vitess/blob/c6f56d377aad05628efc41de7c2c0567e6f7ac0d/go/tools/go-upgrade/go-upgrade.goOnce the automated Pull Request is created there are still three manual steps left to the reviewers that are listed in the new Pull Request's body. You can find a similar example to the Pull Request the bot will create: #12601.
Checklist