bazel: add mirror for rules_proto#67685
Conversation
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
📝 WalkthroughWalkthroughExtended the Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
WORKSPACE (1)
161-166: Consider reordering URLs to prioritize mirrors before GitHub.The current ordering lists the GitHub URL first (line 162), which means if it continues experiencing 502 errors, Bazel will attempt it first before falling back to the newly added mirrors. Most other
http_archiveentries in this file (e.g.,bazel_skylib,io_bazel_rules_go,rules_cc) list internal mirrors (bazel-cache.pingcap.net,ats.apps.svc) before the GitHub URL to prioritize faster, more reliable sources.♻️ Suggested URL reordering
urls = [ - "https://github.com/bazelbuild/rules_proto/releases/download/6.0.0/rules_proto-6.0.0.tar.gz", - "https://cache.hawkingrei.com/bazelbuild/rules_proto/releases/download/6.0.0/rules_proto-6.0.0.tar.gz", "http://bazel-cache.pingcap.net:8080/bazelbuild/rules_proto/releases/download/6.0.0/rules_proto-6.0.0.tar.gz", "http://ats.apps.svc/bazelbuild/rules_proto/releases/download/6.0.0/rules_proto-6.0.0.tar.gz", + "https://cache.hawkingrei.com/bazelbuild/rules_proto/releases/download/6.0.0/rules_proto-6.0.0.tar.gz", + "https://github.com/bazelbuild/rules_proto/releases/download/6.0.0/rules_proto-6.0.0.tar.gz", ],🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@WORKSPACE` around lines 161 - 166, Reorder the urls array for the rules_proto http_archive so internal mirrors are tried before GitHub: move the bazel-cache.pingcap.net and ats.apps.svc entries (and any other internal mirror like cache.hawkingrei.com) to appear before the GitHub URL in the urls list for the rules_proto declaration; this matches other http_archive entries (e.g., bazel_skylib, io_bazel_rules_go, rules_cc) and ensures Bazel will attempt the faster internal mirrors first when resolving rules_proto-6.0.0.tar.gz.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@WORKSPACE`:
- Around line 161-166: Reorder the urls array for the rules_proto http_archive
so internal mirrors are tried before GitHub: move the bazel-cache.pingcap.net
and ats.apps.svc entries (and any other internal mirror like
cache.hawkingrei.com) to appear before the GitHub URL in the urls list for the
rules_proto declaration; this matches other http_archive entries (e.g.,
bazel_skylib, io_bazel_rules_go, rules_cc) and ensures Bazel will attempt the
faster internal mirrors first when resolving rules_proto-6.0.0.tar.gz.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #67685 +/- ##
================================================
- Coverage 77.5947% 77.4341% -0.1607%
================================================
Files 1981 1965 -16
Lines 548157 548328 +171
================================================
- Hits 425341 424593 -748
- Misses 122006 123733 +1727
+ Partials 810 2 -808
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
/retest |
1 similar comment
|
/retest |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AilinKid, winoros, YangKeao The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/update-bazel-files.yml:
- Around line 47-50: The workflow should treat a missing pull request as a no-op
instead of failing; update the block that checks pr_number (the if that
references pr_number, HEAD_OWNER and HEAD_REF) to not call exit 1 when pr_number
is empty or "null" — instead log a clear message (e.g., "No pull request found
for ${HEAD_OWNER}:${HEAD_REF}, skipping.") and exit with success (exit 0) or
simply return/continue so the job ends cleanly when state=open yields no PR.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: d4eb8077-618f-4cae-ab1d-562e747b4e31
📒 Files selected for processing (1)
.github/workflows/update-bazel-files.yml
| if [[ -z "${pr_number}" || "${pr_number}" == "null" ]]; then | ||
| echo "Unable to resolve pull request for ${HEAD_OWNER}:${HEAD_REF}." >&2 | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
Treat missing PR as a no-op instead of a workflow failure.
With state=open, this can legitimately happen if the PR is closed/merged before this job runs. Exiting 1 makes the automation noisy without actionable failure.
Suggested adjustment
- if [[ -z "${pr_number}" || "${pr_number}" == "null" ]]; then
- echo "Unable to resolve pull request for ${HEAD_OWNER}:${HEAD_REF}." >&2
- exit 1
- fi
+ if [[ -z "${pr_number}" || "${pr_number}" == "null" ]]; then
+ echo "No open pull request for ${HEAD_OWNER}:${HEAD_REF}; skipping."
+ exit 0
+ fi🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/update-bazel-files.yml around lines 47 - 50, The workflow
should treat a missing pull request as a no-op instead of failing; update the
block that checks pr_number (the if that references pr_number, HEAD_OWNER and
HEAD_REF) to not call exit 1 when pr_number is empty or "null" — instead log a
clear message (e.g., "No pull request found for ${HEAD_OWNER}:${HEAD_REF},
skipping.") and exit with success (exit 0) or simply return/continue so the job
ends cleanly when state=open yields no PR.
|
@pantheon-bot please review this PR |
|
/retest |
2 similar comments
|
/retest |
|
/retest |
|
/test all |
|
/retest |
What problem does this PR solve?
Issue Number: close #xxx
Problem Summary:
What changed and how does it work?
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.
Summary by CodeRabbit