Skip to content

revert(prow-jobs): resolve error-log-review tool via Go module proxy - #5361

Merged
ti-chi-bot[bot] merged 1 commit into
mainfrom
revert-goproxy-direct-error-log-review
Oct 13, 2026
Merged

ti-chi-bot[bot] merged 1 commit into
mainfrom
revert-goproxy-direct-error-log-review

Conversation

@wuhuizuo

Copy link
Copy Markdown
Contributor

What is changed

Revert #4909: remove the GOPROXY=direct prefix from the error-log-review presubmit jobs, so the go command resolves the tool and its dependencies through the default Go module proxy again.

Files (5):

  • prow-jobs/pingcap/ticdc/latest-presubmits.yaml
  • prow-jobs/pingcap/tiflash/latest-presubmits.yaml
  • prow-jobs/pingcap/tiflow/latest-presubmits.yaml
  • prow-jobs/tikv/pd/latest-presubmits.yaml
  • prow-jobs/tikv/tikv/latest-presubmits.yaml

Why

GOPROXY=direct makes the go command resolve every dependency from its origin host instead of a module proxy. On 2026-10-13 (~02:00–02:35 UTC) gopkg.in returned a transient 502 Proxy Error, which broke all of these presubmits with:

config.go:9:2: unrecognized import path "gopkg.in/yaml.v3":
reading https://gopkg.in/yaml.v3?go-get=1: 502 Proxy Error

Example failed run: https://prow.tidb.net/view/gs/prow-tidb-logs/pr-logs/pull/pingcap_tiflow/12883/pull-error-log-review/2109830078522200064

Failing runs in that window: pingcap/tiflow#12883, pingcap/ticdc#6466, tikv/pd#11337, tikv/pd#11338, tikv/pd#11349; a later run at 02:36 UTC passed. The error-log-review presubmits are non-optional, so this blocked Tide merge.

#4909 added GOPROXY=direct so that go run ...@main always resolves the latest commit immediately, bypassing module-proxy branch-query caching. Reverting trades that freshness for reliability: right after a push to main, @main may briefly resolve to a stale pseudo-version, which is acceptable for this presubmit.

Validation

  • git revert 99b33ce9298fe3e3f82ece3b74196c427668d740 applies cleanly (auto-merge, no conflicts).
  • prow-jobs/kustomization.yaml uses disableNameSuffixHash: true, so no hash regeneration is needed.

This reverts commit 99b33ce (#4909).

`GOPROXY=direct` forces the go command to resolve every dependency from
its origin host instead of a module proxy. On 2026-10-13 a transient
gopkg.in outage broke all error-log-review presubmits
(tiflow/ticdc/tiflash/pd/tikv) with:

    config.go:9:2: unrecognized import path "gopkg.in/yaml.v3":
    reading https://gopkg.in/yaml.v3?go-get=1: 502 Proxy Error

Revert to the default Go module proxy resolution. The cost is that
`go run ...@main` may briefly resolve to a stale pseudo-version right
after a push to main, which is acceptable for this presubmit.

@ti-chi-bot ti-chi-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I have already done a preliminary review for you, and I hope to help you do a better job.

Summary
This PR reverts the previous change that added GOPROXY=direct to the go run command for the error-log-review tool in presubmit jobs. The revert restores the default Go module proxy usage to improve reliability, addressing transient 502 errors from gopkg.in that caused presubmit failures. The approach is a straightforward revert across multiple YAML files configuring presubmit jobs. The changes are minimal, clean, and well-justified based on recent flakiness observed in the build pipeline.


Critical Issues

  • None found. The revert addresses a real reliability problem and has no regression risk since it simply removes an environment override.

Code Improvements

  • None critical. However, consider centralizing the go run command invocation for error-log-review tool in a single shared snippet or template, if possible, to reduce duplication across these many presubmit job YAML files. This would make future changes easier and reduce the risk of drift.

Best Practices

  • Documentation:

    • The PR description is very thorough. It would be helpful to add a short comment next to the go run command in each YAML file explaining why we avoid GOPROXY=direct, referencing this revert and the transient outage. This helps future maintainers understand the rationale without diving into PR history.

    • Example:

      # Use default GOPROXY to avoid transient gopkg.in outages that break presubmits.
      go run github.com/PingCAP-QE/ci/tools/error-log-review@main \
  • Testing:

    • Since these are presubmit job configs, manual validation is typical. However, if you have infrastructure or scripts to validate these YAML changes (e.g., kubectl apply --dry-run or prow config lint), please mention that validation was done.
    • Consider adding automated tests or monitoring alerts for presubmit flakiness to catch such issues early.
  • Style / Consistency:

    • The diff correctly removes the GOPROXY=direct prefix only, preserving indentation and formatting.
    • No naming or style issues detected.

Summary of Files Impacted

  • prow-jobs/pingcap/ticdc/latest-presubmits.yaml (line ~249)
  • prow-jobs/pingcap/tiflash/latest-presubmits.yaml (line ~233)
  • prow-jobs/pingcap/tiflow/latest-presubmits.yaml (line ~216)
  • prow-jobs/tikv/pd/latest-presubmits.yaml (line ~124)
  • prow-jobs/tikv/tikv/latest-presubmits.yaml (line ~97)

All changes are identical removals of the GOPROXY=direct environment override before go run.


Overall: This is a well-justified, low-risk revert improving presubmit stability. Adding brief comments in the YAML files would improve maintainability. Consider DRYing the presubmit job config snippet in the future to reduce duplication.

@ti-chi-bot ti-chi-bot Bot added the size/S label Oct 13, 2026
@wuhuizuo

Copy link
Copy Markdown
Contributor Author

/approve

@ti-chi-bot

ti-chi-bot Bot commented Oct 13, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wuhuizuo

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 ti-chi-bot Bot added the approved label Oct 13, 2026
@ti-chi-bot
ti-chi-bot Bot merged commit 9103ab9 into main Oct 13, 2026
9 checks passed
@ti-chi-bot
ti-chi-bot Bot deleted the revert-goproxy-direct-error-log-review branch October 13, 2026 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

1 participant