Repository navigation
feat: gen check and test workflow - #4276
Merged
Merged
Conversation
Contributor
|
Caution Review failedAn error occurred during the review process. Please try again later. ✨ 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 |
seanaye
reviewed
Jun 23, 2026
seanaye
left a comment
Contributor
There was a problem hiding this comment.
Seems like its moving generally in the right direction
- extract inline workflow bash to scripts/*.sh via include_str! - model runners as an enum with Display - generalize FluentBuilder::map to T -> U - mark generated workflow YAML linguist-generated (collapse in PR diffs) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
synoet
force-pushed
the
rust-workflows-cloud-storage
branch
from
June 23, 2026 18:41
b233716 to
a651bf9
Compare
Drops the `&& github.event.pull_request.draft == false` gate on the check/test jobs so they run on this draft PR while validating the new workflow end-to-end. Restore before merging. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Namespace profiles don't ship Nix (unlike the old self-hosted linux-extra-beefy), so setup-cachix's nix calls failed with 'cannot connect to socket'. Run ./.github/actions/setup-nix before setup-cachix in the check/test jobs, mirroring the deploy workflow. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Match Zed's one-module-per-workflow naming: the registry carries a single `slug` that names both the source module (<slug>.rs) and the output file (<slug>.yml), replacing the separate explicit filename. - code-check-cloud-storage.yml -> code_check_cloud_storage.yml - check-generated-workflows.yml -> check_generated.yml The required status check is the job name "Cloud Storage Status Check" (unchanged), so the rename doesn't affect the branch ruleset. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Reverts the temporary b40155b. The check/test jobs skip on draft PRs again (`&& github.event.pull_request.draft == false`), which is the intended pre-merge behavior. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
synoet
marked this pull request as ready for review
June 23, 2026 20:21
Contributor
There was a problem hiding this comment.
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 `@rust/cloud-storage/tools/xtask/src/workflows/code_check_cloud_storage.rs`:
- Around line 118-139: The paths_filter() function uses an unpinned action
reference with the v3 tag in the .uses() method call. Replace the "v3" tag in
.uses("dorny", "paths-filter", "v3") with a specific commit SHA hash to ensure
the action is pinned to a fixed version rather than a movable tag. This prevents
supply chain attacks where tags can be reassigned to malicious commits.
In `@rust/cloud-storage/tools/xtask/src/workflows/scripts/configure_postgres.sh`:
- Around line 17-19: The unbounded until loop waiting for PostgreSQL readiness
can hang indefinitely if the database fails to start. Add a retry counter and
maximum attempt limit to the loop that waits for pg_isready. Before the until
loop, initialize a counter variable to zero and define a maximum number of
retries (e.g., 30 or 60 attempts). Inside the loop, increment the counter on
each iteration and check if it has exceeded the maximum before sleeping. If the
maximum is reached, log a clear error message indicating that PostgreSQL failed
to become ready and exit with a non-zero status code to explicitly fail the job
rather than hanging until the global timeout.
🪄 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: CHILL
Plan: Pro
Run ID: a739d148-7be8-46cf-9d2c-fb409304462c
⛔ Files ignored due to path filters (1)
rust/cloud-storage/Cargo.lockis excluded by!**/*.lock,!**/Cargo.lock
📒 Files selected for processing (22)
.gitattributes.github/actionlint.yaml.github/scripts/changed-cloud-storage-doppler-config-bins.sh.github/workflows/check_generated.yml.github/workflows/code-check-cloud-storage.yml.github/workflows/code_check_cloud_storage.ymlrust/cloud-storage/.cargo/config.tomlrust/cloud-storage/tools/xtask/Cargo.tomlrust/cloud-storage/tools/xtask/src/doppler_bins.rsrust/cloud-storage/tools/xtask/src/main.rsrust/cloud-storage/tools/xtask/src/workflows/check_generated.rsrust/cloud-storage/tools/xtask/src/workflows/code_check_cloud_storage.rsrust/cloud-storage/tools/xtask/src/workflows/mod.rsrust/cloud-storage/tools/xtask/src/workflows/runners.rsrust/cloud-storage/tools/xtask/src/workflows/scripts/compute_changed_files.shrust/cloud-storage/tools/xtask/src/workflows/scripts/compute_doppler_bins.shrust/cloud-storage/tools/xtask/src/workflows/scripts/compute_nextest_filter.shrust/cloud-storage/tools/xtask/src/workflows/scripts/configure_postgres.shrust/cloud-storage/tools/xtask/src/workflows/scripts/run_tests.shrust/cloud-storage/tools/xtask/src/workflows/scripts/validate_doppler_configs.shrust/cloud-storage/tools/xtask/src/workflows/steps.rsrust/cloud-storage/tools/xtask/src/workflows/vars.rs
💤 Files with no reviewable changes (2)
- .github/scripts/changed-cloud-storage-doppler-config-bins.sh
- .github/workflows/code-check-cloud-storage.yml
Tag refs like @V3 can be repointed to malicious commits; pin to the SHA v3 currently resolves to (v3.0.3), matching the repo's other SHA-pinned actions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
check/test shared namespace-profile-linux-mid with the deploy workflow, whose cache-volume churn evicted the CI sccache caches between runs (the larger test cache lost first -> cold). Move them to a dedicated CI profile with its own cache volume. path-check/status-check stay on linux-small (they don't use the sccache volume). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
synoet
force-pushed
the
rust-workflows-cloud-storage
branch
from
June 23, 2026 22:02
e1c2035 to
4e79cca
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generate the cloud-storage CI workflow from Rust
Ports the cloud-storage
check/testworkflow from hand-written YAML to Rust(
xtask+ thegh-workflowcrate, à la Zed): environment, runners, and reusablesteps are small composable modules, and
cargo x workflowsregenerates the YAML.A generated drift-check (
check_generated.yml) fails CI if the committed YAMLfalls out of sync with the source.
Two infra changes ride along with the port:
linux-extra-beefy→ Namespace profiles(
linux-midforcheck/test,linux-smallforpath-check/status-check).(drops all
AWS_*creds).Otherwise behavior-preserving: same triggers, jobs, services, inline scripts, and
the required
Cloud Storage Status Check.Regenerate:
cargo x workflowsfromrust/cloud-storage(--checkverifies sync).