Skip to content

build: resolve Bazel Go deps through GOPROXY (#69503) - #69812

Closed
ti-chi-bot wants to merge 1 commit into
pingcap:feature/release-8.5-materialized-viewfrom
ti-chi-bot:cherry-pick-69503-to-feature/release-8.5-materialized-view
Closed

ti-chi-bot wants to merge 1 commit into
pingcap:feature/release-8.5-materialized-viewfrom
ti-chi-bot:cherry-pick-69503-to-feature/release-8.5-materialized-view

Conversation

@ti-chi-bot

@ti-chi-bot ti-chi-bot commented Jul 13, 2026 •

Copy link
Copy Markdown
Member

This is an automated cherry-pick of #69503

Issue Number: close #69513

Summary

  • change cmd/mirror to generate go_repository entries with sum and version instead of mirrored urls, sha256, and strip_prefix
  • remove the pingcapmirror Go module upload path and deprecated bazel_mirror_upload
  • regenerate DEPS.bzl so Bazel Go dependencies are resolved by rules_go through the configured Go module environment, e.g. GOPROXY=...|...,direct

Test Plan

  • make tidy
  • go test ./cmd/mirror
  • PATH=/tmp/tidb-bazel-shim:$PATH make bazel_prepare
  • PATH=/tmp/tidb-bazel-shim:$PATH make bazel_mirror_upload
  • PATH=/tmp/tidb-bazel-shim:$PATH make lint
  • git -c core.whitespace=-tab-in-indent diff --check
  • verified DEPS.bzl has no pingcapmirror, cache.hawkingrei.com, urls, sha256, or strip_prefix entries for Go modules

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)

Release note

None

Summary by CodeRabbit

  • Changes
    • Dependency setup now resolves Go modules through GOPROXY, simplifying builds and reducing reliance on mirrored artifacts.
    • Legacy dependency mirroring and upload options are deprecated and provide guidance when used.
    • Added a Bazel ABI compatibility check to help detect build compatibility issues earlier.
    • Updated several development dependencies to newer versions.

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot

Copy link
Copy Markdown
Member Author

@wuhuizuo This PR has conflicts, I have hold it.
Please resolve them or ask others to resolve them, then comment /unhold to remove the hold label.

@ti-chi-bot ti-chi-bot Bot added the release-note-none Denotes a PR that doesn't merit a release note. label Jul 13, 2026
@ti-chi-bot

ti-chi-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown

@ti-chi-bot: ## If you want to know how to resolve it, please read the guide in TiDB Dev Guide.

Details

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 commented Jul 13, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign mjonss for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found 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 ti-chi-bot Bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jul 13, 2026
@coderabbitai

coderabbitai Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 3213f599-8e2e-4ad2-b7ff-af2cd56c2bd6

📥 Commits

Reviewing files that changed from the base of the PR and between 1757537 and dc6d2a4.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (6)
  • DEPS.bzl
  • Makefile
  • cmd/mirror/BUILD.bazel
  • cmd/mirror/mirror.go
  • cmd/mirror/skylarkutil.go
  • go.mod
🔥 Files not summarized due to errors (1)
  • DEPS.bzl: Server error: no LLM provider could handle the message

📝 Walkthrough

Walkthrough

The PR changes Bazel dependency generation to use GOPROXY-provided module metadata, removes mirror artifact upload and reuse paths, updates Makefile invocations, deprecates mirror flags and upload behavior, and adds a Bazel ABI-check target. Merge conflict markers remain in several changed regions.

Changes

GOPROXY Bazel dependency flow

Layer / File(s) Summary
Makefile mirror targets
Makefile
Bazel mirror invocations are updated, bazel_mirror_upload is deprecated in one branch, and bazel_check_abi is added.
GOPROXY dependency generation
cmd/mirror/mirror.go
Mirror uploads, existing-artifact reuse, and mirror URL generation are removed; go_repository entries use downloaded module versions and sums, while --mirror and --upload are deprecated and ignored.
Bazel rule and module dependency cleanup
cmd/mirror/BUILD.bazel, go.mod
mirror_lib is reduced to mirror.go with fewer dependencies, and selected Go module versions are updated.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

  • pingcap/tidb#69320: Both update dumpNewDepsBzl toward GOPROXY-based module URLs and metadata.
  • pingcap/tidb#69503: Directly overlaps the Makefile and cmd/mirror changes that remove manual mirror uploads.

Suggested reviewers: cfzjywx, d3hunter, jmpotato, yangkeao, zyguan

Poem

I’m a rabbit with dependencies bright,
GOPROXY carries them through the night.
Mirrors nap, sums pin the trail,
Bazel hops on a simpler rail.
ABI carrots wait in sight—
Merge conflicts? Thump them right!

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions
The command is terminated due to an error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@wuhuizuo wuhuizuo closed this Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants