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

Auto upgrade the Golang version #12585

Merged
merged 35 commits into from
Mar 23, 2023
Merged

Auto upgrade the Golang version #12585

merged 35 commits into from
Mar 23, 2023

Conversation

frouioui
Copy link
Member

@frouioui frouioui commented Mar 9, 2023

Description

Remake of #12575 but on vitessio/vitess to have the required CI permissions that are not available on forked repository (planetscale/vitess).

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.go

Once 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

  • "Backport to:" labels have been added if this change should be back-ported
  • Tests were added or are not required
  • Did the new or modified tests pass consistently locally and on the CI
  • Documentation was added or is not required

frouioui added 8 commits March 8, 2023 17:24
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]>
@vitess-bot vitess-bot bot added NeedsDescriptionUpdate The description is not clear or comprehensive enough, and needs work NeedsWebsiteDocsUpdate What it says labels Mar 9, 2023
@vitess-bot
Copy link
Contributor

vitess-bot bot commented Mar 9, 2023

Review Checklist

Hello reviewers! 👋 Please follow this checklist when reviewing this Pull Request.

General

  • Ensure that the Pull Request has a descriptive title.
  • If this is a change that users need to know about, please apply the release notes (needs details) label so that merging is blocked unless the summary release notes document is included.
  • If a test is added or modified, there should be a documentation on top of the test to explain what the expected behavior is what the test does.

If a new flag is being introduced:

  • Is it really necessary to add this flag?
  • Flag names should be clear and intuitive (as far as possible)
  • Help text should be descriptive.
  • Flag names should use dashes (-) as word separators rather than underscores (_).

If a workflow is added or modified:

  • Each item in Jobs should be named in order to mark it as required.
  • If the workflow should be required, the maintainer team should be notified.

Bug fixes

  • There should be at least one unit or end-to-end test.
  • The Pull Request description should include a link to an issue that describes the bug.

Non-trivial changes

  • There should be some code comments as to why things are implemented the way they are.

New/Existing features

  • Should be documented, either by modifying the existing documentation or creating new documentation.
  • New features should have a link to a feature request issue or an RFC that documents the use cases, corner cases and test cases.

Backward compatibility

  • Protobuf changes should be wire-compatible.
  • Changes to _vt tables and RPCs need to be backward compatible.
  • vtctl command output order should be stable and awk-able.
  • RPC changes should be compatible with vitess-operator
  • If a flag is removed, then it should also be removed from VTop, if used there.

@frouioui frouioui added the Skip CI Skip CI actions from running label Mar 9, 2023
frouioui added 6 commits March 9, 2023 09:52
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]>
@frouioui frouioui force-pushed the auto-upgrade-go-version branch from 4d8e495 to 1857ee3 Compare March 9, 2023 12:56
frouioui added 4 commits March 9, 2023 16:40
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]>
@frouioui frouioui force-pushed the auto-upgrade-go-version branch from 70ca79b to ec20bb5 Compare March 9, 2023 17:06
@frouioui frouioui added Backport to: release-14.0 and removed NeedsDescriptionUpdate The description is not clear or comprehensive enough, and needs work NeedsWebsiteDocsUpdate What it says labels Mar 9, 2023
Copy link
Contributor

@mattlord mattlord left a 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!

.github/workflows/update_golang_version.yml Outdated Show resolved Hide resolved
go/tools/go-upgrade/go_upgrade.go Outdated Show resolved Hide resolved
Copy link
Contributor

@mattlord mattlord left a 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.

go/tools/go-upgrade/go_upgrade.go Outdated Show resolved Hide resolved
Signed-off-by: Florent Poinsard <[email protected]>
@frouioui frouioui requested a review from mattlord March 20, 2023 13:38
@frouioui
Copy link
Member Author

Re-requesting your review (again) @mattlord, thanks so much for all the suggestions 🙏🏻

Signed-off-by: Florent Poinsard <[email protected]>
@frouioui frouioui requested a review from mattlord March 22, 2023 07:35
.github/workflows/update_golang_version.yml Outdated Show resolved Hide resolved
.github/workflows/update_golang_version.yml Outdated Show resolved Hide resolved
.github/workflows/update_golang_version.yml Outdated Show resolved Hide resolved
.github/workflows/update_golang_version.yml Outdated Show resolved Hide resolved
.github/workflows/update_golang_version.yml Outdated Show resolved Hide resolved
.github/workflows/update_golang_version.yml Outdated Show resolved Hide resolved
Co-authored-by: Matt Lord <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
@frouioui frouioui requested a review from mattlord March 22, 2023 14:18
Copy link
Contributor

@mattlord mattlord left a comment

Choose a reason for hiding this comment

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

❤️

@frouioui frouioui merged commit ae3589a into main Mar 23, 2023
@frouioui frouioui deleted the auto-upgrade-go-version branch March 23, 2023 08:47
frouioui added a commit to planetscale/vitess that referenced this pull request Mar 23, 2023
* 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]>
frouioui added a commit to planetscale/vitess that referenced this pull request Mar 23, 2023
* 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]>
frouioui added a commit to planetscale/vitess that referenced this pull request Mar 23, 2023
* 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]>
frouioui added a commit that referenced this pull request Mar 24, 2023
* 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]>
frouioui added a commit that referenced this pull request Mar 24, 2023
* 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]>
frouioui added a commit that referenced this pull request Mar 24, 2023
* 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]>
@hmaurer hmaurer mentioned this pull request Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Build/CI Type: Enhancement Logical improvement (somewhere between a bug and feature)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants