Skip to content

chore(hack): add script to update go modules#6713

Merged
ti-chi-bot[bot] merged 2 commits intopingcap:mainfrom
liubog2008:liubo02/auto-update-modules
Feb 5, 2026
Merged

chore(hack): add script to update go modules#6713
ti-chi-bot[bot] merged 2 commits intopingcap:mainfrom
liubog2008:liubo02/auto-update-modules

Conversation

@liubog2008
Copy link
Copy Markdown
Member

  • a script to update selected go modules but not increase minimal go version

Now these modules can be updated by this script

PATCH_ONLY_PREFIXES=(
    "k8s.io/"
    "sigs.k8s.io/"
    "helm.sh/helm/v3"
)
ALLOWED_PREFIXES=(
    "k8s.io/"
    "sigs.k8s.io/"
    "helm.sh/helm/v3"
    "golang.org/"
    "github.com/aws/aws-sdk-go-v2/"
    "github.com/aws/smithy-go"
    "github.com/Azure/azure-sdk-for-go/"
    "github.com/onsi/ginkgo/v2"
    "github.com/onsi/gomega"
    "go.uber.org/mock"
    "github.com/golangci/golangci-lint/v2"
    "github.com/apache/skywalking-eyes"
)

Signed-off-by: liubo02 <liubo02@pingcap.com>
@github-actions github-actions bot added the v2 for operator v2 label Feb 5, 2026
@ti-chi-bot ti-chi-bot bot added the size/XL label Feb 5, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 37.12%. Comparing base (865b683) to head (764004b).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6713   +/-   ##
=======================================
  Coverage   37.12%   37.12%           
=======================================
  Files         390      390           
  Lines       22347    22347           
=======================================
  Hits         8297     8297           
  Misses      14050    14050           
Flag Coverage Δ
unittest 37.12% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a new script to selectively update Go module dependencies without bumping the minimum required Go version. The script provides fine-grained control over module updates through configurable prefixes, allowing patch-only updates for specified modules (like k8s.io and sigs.k8s.io) while permitting major/minor updates for others.

Changes:

  • Added hack/update-modules.sh script with command-line interface for selective module updates
  • Added hack/lib/modules.sh library with helper functions for module management
  • Added modules/update target to Makefile for easy invocation

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.

File Description
hack/update-modules.sh Main script providing CLI interface for updating Go modules with configurable update policies (patch-only vs latest) for different module prefixes
hack/lib/modules.sh Library of helper functions for module operations including version extraction, dependency filtering, and batch updates
Makefile Adds new modules/update target that invokes the update script

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: liubo02 <liubo02@pingcap.com>
@ti-chi-bot ti-chi-bot bot added the lgtm label Feb 5, 2026
@ti-chi-bot
Copy link
Copy Markdown
Contributor

ti-chi-bot bot commented Feb 5, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: csuzhangxc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot
Copy link
Copy Markdown
Contributor

ti-chi-bot bot commented Feb 5, 2026

[LGTM Timeline notifier]

Timeline:

  • 2026-02-05 09:22:09.509754469 +0000 UTC m=+345200.611153178: ☑️ agreed by csuzhangxc.

@ti-chi-bot ti-chi-bot bot added the approved label Feb 5, 2026
@liubog2008
Copy link
Copy Markdown
Member Author

/cherry-pick release-2.0

@ti-chi-bot
Copy link
Copy Markdown
Member

@liubog2008: once the present PR merges, I will cherry-pick it on top of release-2.0 in the new PR and assign it to you.

Details

In response to this:

/cherry-pick release-2.0

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot ti-chi-bot bot merged commit 4e88448 into pingcap:main Feb 5, 2026
10 checks passed
ti-chi-bot pushed a commit to ti-chi-bot/tidb-operator that referenced this pull request Feb 5, 2026
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Copy Markdown
Member

@liubog2008: new pull request created to branch release-2.0: #6716.
But this PR has conflicts, please resolve them!

Details

In response to this:

/cherry-pick release-2.0

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants