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

[release-14.0] Auto upgrade the Golang version (#12585) #12707

Merged
merged 4 commits into from
Mar 24, 2023

Conversation

frouioui
Copy link
Member

Description

This is a backport of #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]>
@frouioui frouioui added Type: Enhancement Logical improvement (somewhere between a bug and feature) Component: Build/CI Backport This is a backport labels Mar 23, 2023
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
@frouioui frouioui added the Release Blocker: release-19.0 This item blocks the release on branch release-19.0 label Mar 23, 2023
@frouioui frouioui mentioned this pull request Mar 23, 2023
24 tasks
Signed-off-by: Florent Poinsard <[email protected]>
@frouioui frouioui merged commit 625245e into vitessio:release-14.0 Mar 24, 2023
@frouioui frouioui deleted the bp-go-upgrade-on-14 branch March 24, 2023 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport This is a backport Component: Build/CI Release Blocker: release-19.0 This item blocks the release on branch release-19.0 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