Skip to content

[rb] Turn off external caching on portable Ruby#17307

Merged
p0deje merged 1 commit intotrunkfrom
fix-rb-cache
Apr 6, 2026
Merged

[rb] Turn off external caching on portable Ruby#17307
p0deje merged 1 commit intotrunkfrom
fix-rb-cache

Conversation

@p0deje
Copy link
Copy Markdown
Member

@p0deje p0deje commented Apr 6, 2026

🔗 Related Issues

💥 What does this PR do?

🔧 Implementation Notes

💡 Additional Considerations

🔄 Types of changes

  • Cleanup (formatting, renaming)
  • Bug fix (backwards compatible)
  • New feature (non-breaking change which adds functionality and tests!)
  • Breaking change (fix or feature that would cause existing functionality to change)

Copilot AI review requested due to automatic review settings April 6, 2026 16:18
@qodo-code-review
Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Disable external caching for Ruby in Bazel workflow

🐞 Bug fix

Grey Divider

Walkthroughs

Description
• Disable external caching for Ruby in Bazel workflow
• Prevents caching issues with portable Ruby builds
• Adds ruby: false to manifest configuration

Grey Divider

File Changes

1. .github/workflows/bazel.yml 🐞 Bug fix +1/-0

Disable Ruby external caching in Bazel workflow

• Added ruby: false to the external-cache manifest configuration
• Prevents Bazel from caching Ruby dependencies in portable builds
• Aligns Ruby caching behavior with other pinned extensions

.github/workflows/bazel.yml


Grey Divider

Qodo Logo

@selenium-ci selenium-ci added the B-build Includes scripting, bazel and CI integrations label Apr 6, 2026
@qodo-code-review
Copy link
Copy Markdown
Contributor

qodo-code-review bot commented Apr 6, 2026

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX Issues (0)

Grey Divider


Remediation recommended

1. Ruby cache disable incomplete 🐞 Bug ☼ Reliability
Description
ruby: false is only added to the inputs.caching Bazel setup, but the inputs.caching == false
setup still passes an external-cache manifest without a ruby entry, so workflows that set
caching: false won’t explicitly disable portable Ruby external caching. This makes the PR’s “turn
off external caching on portable Ruby” behavior dependent on the caching input and may leave
affected jobs unchanged.
Code

.github/workflows/bazel.yml[R169-172]

          external-cache: |
            manifest:
              crates: rust/Cargo.Bazel.lock
+              ruby: false
Evidence
The Bazel workflow has two setup branches: the caching-enabled branch now disables ruby in the
external-cache manifest, but the caching-disabled branch still defines external-cache and does not
include ruby: false. Some workflows (e.g., CI-RBE) call this reusable workflow with `caching:
false and then run bazel test //... and bazel build //...`, which will exercise repos/toolchains
declared by the rules_ruby extension; MODULE.bazel explicitly enables portable_ruby = True and
registers a repo named ruby (the portable Ruby toolchain).

.github/workflows/bazel.yml[158-203]
.github/workflows/ci-rbe.yml[24-34]
scripts/github-actions/ci-build.sh[1-27]
MODULE.bazel[272-284]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The reusable Bazel workflow disables external caching for the portable Ruby repo only in the `inputs.caching` branch. The `inputs.caching == false` branch still sets `external-cache` without explicitly disabling `ruby`, so callers that run with `caching: false` won’t get the intended portable-Ruby cache disablement.

### Issue Context
Some workflows call `./.github/workflows/bazel.yml` with `caching: false` (e.g., CI-RBE) and still run `bazel test //...` and `bazel build //...`, which can require the rules_ruby portable Ruby toolchain declared in `MODULE.bazel`.

### Fix Focus Areas
- .github/workflows/bazel.yml[192-201]

### Suggested change
Add `ruby: false` under the `external-cache: |\n  manifest:` block in the **"Setup Bazel without caching"** step as well (mirroring the caching-enabled branch).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

Copy link
Copy Markdown
Contributor

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

Updates the GitHub Actions Bazel workflow cache configuration to avoid using the external cache for the portable Ruby toolchain.

Changes:

  • Adds a ruby: false entry to the external-cache manifest in .github/workflows/bazel.yml to disable caching for Ruby.

@p0deje p0deje merged commit d00aea3 into trunk Apr 6, 2026
38 checks passed
@p0deje p0deje deleted the fix-rb-cache branch April 6, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B-build Includes scripting, bazel and CI integrations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants