From 4b295e55c75fb0a7dcab007397c80c9c473826b7 Mon Sep 17 00:00:00 2001 From: Florent Poinsard Date: Wed, 17 Apr 2024 10:56:25 -0600 Subject: [PATCH 1/8] Assign and tag the release team for go update/upgrade auto PRs Signed-off-by: Florent Poinsard --- .github/workflows/update_golang_dependencies.yml | 4 ++++ .github/workflows/update_golang_version.yml | 3 +++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/update_golang_dependencies.yml b/.github/workflows/update_golang_dependencies.yml index 88388246549..81e6c79c17d 100644 --- a/.github/workflows/update_golang_dependencies.yml +++ b/.github/workflows/update_golang_dependencies.yml @@ -1,6 +1,7 @@ name: Update Golang Dependencies on: + pull_request: schedule: - cron: "0 0 1,15 * *" # Runs every month on the 1st and 15th days at midnight UTC workflow_dispatch: @@ -45,9 +46,12 @@ jobs: commit-message: "upgrade go deps" signoff: true delete-branch: true + reviewers: vitessio/release title: "Upgrade the Golang Dependencies" body: | This Pull Request updates all the Golang dependencies to their latest version using `go get -u ./...`. + + cc @vitessio/release base: main labels: | go diff --git a/.github/workflows/update_golang_version.yml b/.github/workflows/update_golang_version.yml index 0ef0c3483c9..6150591d68f 100644 --- a/.github/workflows/update_golang_version.yml +++ b/.github/workflows/update_golang_version.yml @@ -70,6 +70,7 @@ jobs: commit-message: "bump go version to go${{steps.detect-and-update.outputs.go-version}}" signoff: true delete-branch: true + reviewers: vitessio/release title: "[${{ matrix.branch }}] Upgrade the Golang version to `go${{steps.detect-and-update.outputs.go-version}}`" body: | This Pull Request bumps the Golang version to `go${{steps.detect-and-update.outputs.go-version}}` and the bootstrap version to `${{steps.detect-and-update.outputs.bootstrap-version}}`. @@ -81,6 +82,8 @@ jobs: - [ ] Build and Push the bootstrap images to Docker Hub, the bot cannot handle that. - [ ] Update the `./.github/workflows/*.yml` files with the newer Golang version, the bot cannot handle that due to permissions. - To accomplish this, run the following: `go run ./go/tools/go-upgrade/go-upgrade.go upgrade workflows --go-to=${{steps.detect-and-update.outputs.go-version}}` + + cc @vitessio/release base: ${{ matrix.branch }} labels: | Skip CI From 6625f828c5c0f9bb2d47f61511228ba3abecc856 Mon Sep 17 00:00:00 2001 From: Florent Poinsard Date: Wed, 17 Apr 2024 11:01:04 -0600 Subject: [PATCH 2/8] More debug Signed-off-by: Florent Poinsard --- .github/workflows/update_golang_dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_golang_dependencies.yml b/.github/workflows/update_golang_dependencies.yml index 81e6c79c17d..28d4feea685 100644 --- a/.github/workflows/update_golang_dependencies.yml +++ b/.github/workflows/update_golang_dependencies.yml @@ -42,7 +42,7 @@ jobs: - name: Create Pull Request uses: peter-evans/create-pull-request@v4 with: - branch: "upgrade-go-deps-on-main" + branch: "upgrade-go-deps-on-main-test" commit-message: "upgrade go deps" signoff: true delete-branch: true From 55418090db090373339dee9e01802a253c01a9a7 Mon Sep 17 00:00:00 2001 From: Florent Poinsard Date: Wed, 17 Apr 2024 11:15:44 -0600 Subject: [PATCH 3/8] Use PAT to create PRs and use team-reviewers Signed-off-by: Florent Poinsard --- .github/workflows/update_golang_dependencies.yml | 4 +++- .github/workflows/update_golang_version.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update_golang_dependencies.yml b/.github/workflows/update_golang_dependencies.yml index 28d4feea685..3662b4c080c 100644 --- a/.github/workflows/update_golang_dependencies.yml +++ b/.github/workflows/update_golang_dependencies.yml @@ -41,12 +41,14 @@ jobs: - name: Create Pull Request uses: peter-evans/create-pull-request@v4 + env: + GITHUB_TOKEN: ${{ secrets.CREATE_PR_VITESS_BOT }} with: branch: "upgrade-go-deps-on-main-test" commit-message: "upgrade go deps" signoff: true delete-branch: true - reviewers: vitessio/release + team-reviewers: vitessio/release title: "Upgrade the Golang Dependencies" body: | This Pull Request updates all the Golang dependencies to their latest version using `go get -u ./...`. diff --git a/.github/workflows/update_golang_version.yml b/.github/workflows/update_golang_version.yml index 6150591d68f..66e949a19c7 100644 --- a/.github/workflows/update_golang_version.yml +++ b/.github/workflows/update_golang_version.yml @@ -65,12 +65,14 @@ jobs: - name: Create Pull Request if: steps.detect-and-update.outputs.create-pr == 'true' uses: peter-evans/create-pull-request@v4 + env: + GITHUB_TOKEN: ${{ secrets.CREATE_PR_VITESS_BOT }} with: branch: "upgrade-go-to-${{steps.detect-and-update.outputs.go-version}}-on-${{ matrix.branch }}" commit-message: "bump go version to go${{steps.detect-and-update.outputs.go-version}}" signoff: true delete-branch: true - reviewers: vitessio/release + team-reviewers: vitessio/release title: "[${{ matrix.branch }}] Upgrade the Golang version to `go${{steps.detect-and-update.outputs.go-version}}`" body: | This Pull Request bumps the Golang version to `go${{steps.detect-and-update.outputs.go-version}}` and the bootstrap version to `${{steps.detect-and-update.outputs.bootstrap-version}}`. From 3a794a1eecbe137be1246123dd631fec321c13ba Mon Sep 17 00:00:00 2001 From: Florent Poinsard Date: Wed, 17 Apr 2024 11:20:42 -0600 Subject: [PATCH 4/8] Try tagging team with their short name Signed-off-by: Florent Poinsard --- .github/workflows/update_golang_dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_golang_dependencies.yml b/.github/workflows/update_golang_dependencies.yml index 3662b4c080c..3d908d0516b 100644 --- a/.github/workflows/update_golang_dependencies.yml +++ b/.github/workflows/update_golang_dependencies.yml @@ -48,7 +48,7 @@ jobs: commit-message: "upgrade go deps" signoff: true delete-branch: true - team-reviewers: vitessio/release + team-reviewers: Release title: "Upgrade the Golang Dependencies" body: | This Pull Request updates all the Golang dependencies to their latest version using `go get -u ./...`. From 577578e009a085c310c5ce3b3594c152830a7d63 Mon Sep 17 00:00:00 2001 From: Florent Poinsard Date: Wed, 17 Apr 2024 12:10:29 -0600 Subject: [PATCH 5/8] Remove env field and use token field instead Signed-off-by: Florent Poinsard --- .github/workflows/update_golang_dependencies.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/update_golang_dependencies.yml b/.github/workflows/update_golang_dependencies.yml index 3d908d0516b..ca4fb089c22 100644 --- a/.github/workflows/update_golang_dependencies.yml +++ b/.github/workflows/update_golang_dependencies.yml @@ -41,9 +41,8 @@ jobs: - name: Create Pull Request uses: peter-evans/create-pull-request@v4 - env: - GITHUB_TOKEN: ${{ secrets.CREATE_PR_VITESS_BOT }} with: + token: ${{ secrets.CREATE_PR_VITESS_BOT }} branch: "upgrade-go-deps-on-main-test" commit-message: "upgrade go deps" signoff: true From eba4319d11e0c6abf056d23886b02640107f434b Mon Sep 17 00:00:00 2001 From: Florent Poinsard Date: Wed, 17 Apr 2024 12:19:21 -0600 Subject: [PATCH 6/8] Remove debug code Signed-off-by: Florent Poinsard --- .github/workflows/update_golang_dependencies.yml | 1 - .github/workflows/update_golang_version.yml | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update_golang_dependencies.yml b/.github/workflows/update_golang_dependencies.yml index ca4fb089c22..eb572338f61 100644 --- a/.github/workflows/update_golang_dependencies.yml +++ b/.github/workflows/update_golang_dependencies.yml @@ -1,7 +1,6 @@ name: Update Golang Dependencies on: - pull_request: schedule: - cron: "0 0 1,15 * *" # Runs every month on the 1st and 15th days at midnight UTC workflow_dispatch: diff --git a/.github/workflows/update_golang_version.yml b/.github/workflows/update_golang_version.yml index 66e949a19c7..1bbe05a5ed8 100644 --- a/.github/workflows/update_golang_version.yml +++ b/.github/workflows/update_golang_version.yml @@ -65,14 +65,13 @@ jobs: - name: Create Pull Request if: steps.detect-and-update.outputs.create-pr == 'true' uses: peter-evans/create-pull-request@v4 - env: - GITHUB_TOKEN: ${{ secrets.CREATE_PR_VITESS_BOT }} with: + token: ${{ secrets.CREATE_PR_VITESS_BOT }} branch: "upgrade-go-to-${{steps.detect-and-update.outputs.go-version}}-on-${{ matrix.branch }}" commit-message: "bump go version to go${{steps.detect-and-update.outputs.go-version}}" signoff: true delete-branch: true - team-reviewers: vitessio/release + team-reviewers: Release title: "[${{ matrix.branch }}] Upgrade the Golang version to `go${{steps.detect-and-update.outputs.go-version}}`" body: | This Pull Request bumps the Golang version to `go${{steps.detect-and-update.outputs.go-version}}` and the bootstrap version to `${{steps.detect-and-update.outputs.bootstrap-version}}`. From 78648c1366f368937a5e8c6e99158f2b782b53b2 Mon Sep 17 00:00:00 2001 From: Florent Poinsard Date: Wed, 17 Apr 2024 12:19:54 -0600 Subject: [PATCH 7/8] Use proper branch name Signed-off-by: Florent Poinsard --- .github/workflows/update_golang_dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_golang_dependencies.yml b/.github/workflows/update_golang_dependencies.yml index eb572338f61..b751c6e6cc9 100644 --- a/.github/workflows/update_golang_dependencies.yml +++ b/.github/workflows/update_golang_dependencies.yml @@ -42,7 +42,7 @@ jobs: uses: peter-evans/create-pull-request@v4 with: token: ${{ secrets.CREATE_PR_VITESS_BOT }} - branch: "upgrade-go-deps-on-main-test" + branch: "upgrade-go-deps-on-main" commit-message: "upgrade go deps" signoff: true delete-branch: true From 457977d379e193771718e8206d791e4ba815ea8c Mon Sep 17 00:00:00 2001 From: Florent Poinsard Date: Thu, 18 Apr 2024 09:57:58 -0600 Subject: [PATCH 8/8] Fix review suggestions Signed-off-by: Florent Poinsard --- .github/workflows/update_golang_dependencies.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/update_golang_dependencies.yml b/.github/workflows/update_golang_dependencies.yml index b751c6e6cc9..97c99a54397 100644 --- a/.github/workflows/update_golang_dependencies.yml +++ b/.github/workflows/update_golang_dependencies.yml @@ -55,6 +55,5 @@ jobs: base: main labels: | go - dependencies Component: General - Type: Internal Cleanup + Type: Dependencies