Skip to content

Fixes #6149, Fixes part of #6202: Use bazel-contrib/setup-bazel in workflows to setup bazel#6284

Open
ShankhanilSaha wants to merge 2 commits into
oppia:developfrom
ShankhanilSaha:update-actions-running-on-node-20
Open

Fixes #6149, Fixes part of #6202: Use bazel-contrib/setup-bazel in workflows to setup bazel#6284
ShankhanilSaha wants to merge 2 commits into
oppia:developfrom
ShankhanilSaha:update-actions-running-on-node-20

Conversation

@ShankhanilSaha

@ShankhanilSaha ShankhanilSaha commented Jun 20, 2026

Copy link
Copy Markdown
Member

Explanation

Fixes #6149
Fixes part of #6202

  • Replace all workflows using unmaintained abhinavsingh/setup-bazel with bazel's own bazel-contrib/setup-bazel.
  • Enable bazelisk-cache: true to enable caching and preventing bazel being downloaded repeatedly.

Essential Checklist

  • The PR title starts with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • The explanation section above starts with "Fixes #bugnum: " (If this PR fixes part of an issue, use instead: "Fixes part of #bugnum: ...".)
  • Any changes to scripts/assets files have their rationale included in the PR explanation.
  • The PR follows the style guide.
  • The PR does not contain any unnecessary code changes from Android Studio (reference).
  • The PR is made from a branch that's not called "develop" and is up-to-date with "develop".
  • The PR is assigned to the appropriate reviewers (reference).

Summary by CodeRabbit

  • Chores
    • Updated internal build and testing infrastructure tooling to improve build efficiency and caching capabilities.

@ShankhanilSaha
ShankhanilSaha requested a review from a team as a code owner June 20, 2026 10:43
@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

All 8 GitHub Actions workflow files replace the abhinavsingh/setup-bazel@v3 action (previously pinned to Bazel 6.5.0) with bazel-contrib/setup-bazel@0.19.0 and enable bazelisk-cache: true. The change affects 12 job-level occurrences across build_tests, code_coverage, issue_checks, lesson_checks, static_checks, stats, unit_tests, and wiki workflows.

Changes

Bazel Action Replacement

Layer / File(s) Summary
Bazel setup action swap in all workflows
.github/workflows/build_tests.yml, .github/workflows/code_coverage.yml, .github/workflows/issue_checks.yml, .github/workflows/lesson_checks.yml, .github/workflows/static_checks.yml, .github/workflows/stats.yml, .github/workflows/unit_tests.yml, .github/workflows/wiki.yml
Every job previously using abhinavsingh/setup-bazel@v3 with version: 6.5.0 now uses bazel-contrib/setup-bazel@0.19.0 with bazelisk-cache: true. Affects 12 job-level occurrences across 8 workflow files; no other job logic is changed in any file.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐇 Hop hop, the old Bazel action's gone,
A new one from the Bazel team's now on!
Twelve jobs updated, all in a row,
The bazelisk cache lets CI flow.
This bunny approves — let the builds grow! 🏗️

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly identifies the main change: replacing abhinavsingh/setup-bazel with bazel-contrib/setup-bazel across workflows and addresses the linked issues.
Linked Issues check ✅ Passed The PR successfully implements the primary requirements from issue #6149: migration to official bazel-contrib/setup-bazel action, compatibility with Bazel 6.5.0 (via bazelisk), and application across all workflows.
Out of Scope Changes check ✅ Passed All changes are focused on the stated objective of replacing the Bazel setup action with its official maintained alternative across all workflows, with no extraneous modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

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

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 and usage tips.

@ShankhanilSaha

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/build_tests.yml:
- Around line 35-37: The action reference in the setup-bazel step uses semantic
versioning (0.19.0) instead of a commit hash, which the static analysis tool
flagged as unpinned. However, since the repository consistently uses semantic
versioning for all GitHub Actions throughout the workflows, this approach is
acceptable for maintainability and consistency. If the decision is made to
enforce stricter action pinning with commit hashes, this change should be
applied consistently across all workflow files in the repository as a
coordinated security hardening effort, not in isolation.

In @.github/workflows/lesson_checks.yml:
- Around line 16-18: The bazel-contrib/setup-bazel@0.19.0 action is executing
before the repository checkout, preventing it from accessing the .bazelversion
file needed to determine the correct Bazel version to install. Move the
actions/checkout step to execute before the setup-bazel action so that the
.bazelversion file is available when the Bazel setup reads it for version
resolution and cache optimization.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 37fd19c0-6d62-4a35-9f4d-72ffd9380a66

📥 Commits

Reviewing files that changed from the base of the PR and between 418dae9 and f69ffbb.

📒 Files selected for processing (8)
  • .github/workflows/build_tests.yml
  • .github/workflows/code_coverage.yml
  • .github/workflows/issue_checks.yml
  • .github/workflows/lesson_checks.yml
  • .github/workflows/static_checks.yml
  • .github/workflows/stats.yml
  • .github/workflows/unit_tests.yml
  • .github/workflows/wiki.yml

Comment thread .github/workflows/build_tests.yml
Comment thread .github/workflows/lesson_checks.yml

@adhiamboperes adhiamboperes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@ShankhanilSaha, this LGTM, but one of the actions is still failing. Please look into it.

@oppiabot

oppiabot Bot commented Jun 24, 2026

Copy link
Copy Markdown

Hi @ShankhanilSaha, this PR is ready to be merged. Please address any remaining comments prior to merging, and feel free to ask someone to merge your PR once the CI checks pass and you're happy with it. Thanks!

@BenHenning

Copy link
Copy Markdown
Member

The current actions wildcard patterns at the oppia org level includes bazel-contrib/setup-bazel@*. I'm not sure if I did this wrong and missed it on inspection (and @seanlip now fixed it), but it is currently configured correctly. Can you try re-triggering the CI again @ShankhanilSaha?

@ShankhanilSaha

Copy link
Copy Markdown
Member Author

@BenHenning I have re-run the workflows.

@oppiabot

oppiabot Bot commented Jul 2, 2026

Copy link
Copy Markdown

Hi @ShankhanilSaha, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you! If you're unsure how to reassign this PR to a reviewer, please make sure to review the wiki page that details the Guidance on submitting PRs.

@oppiabot oppiabot Bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Jul 2, 2026
@Neer-rn Neer-rn removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Jul 3, 2026
@oppiabot

oppiabot Bot commented Jul 10, 2026

Copy link
Copy Markdown

Hi @ShankhanilSaha, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you! If you're unsure how to reassign this PR to a reviewer, please make sure to review the wiki page that details the Guidance on submitting PRs.

@oppiabot oppiabot Bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Jul 10, 2026
@oppiabot oppiabot Bot closed this Jul 17, 2026
@oppiabot oppiabot Bot removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Jul 17, 2026
@oppiabot

oppiabot Bot commented Jul 24, 2026

Copy link
Copy Markdown

Hi @ShankhanilSaha, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you! If you're unsure how to reassign this PR to a reviewer, please make sure to review the wiki page that details the Guidance on submitting PRs.

@oppiabot oppiabot Bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: LGTM stale Corresponds to items that haven't seen a recent update and may be automatically closed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Use official setup-bazel workflow

4 participants