Skip to content

Skip the Compile When secrets.yaml Could Not Be Generated - #167

Merged
ptr727 merged 1 commit into
developfrom
recipe-stop-on-secrets
Sep 21, 2026
Merged

ptr727 merged 1 commit into
developfrom
recipe-stop-on-secrets

Conversation

@ptr727

@ptr727 ptr727 commented Sep 21, 2026 •

Copy link
Copy Markdown
Owner

What

Answers the finding Copilot raised against the promotion pull request #164 on the OPERATIONS.md "Compiling the Way CI Does" recipe.

When the secrets step failed, the recipe printed its failure message and then carried on into docker run, which failed later on a missing secret, a long way from the cause. The docker run is now gated on secrets.yaml existing, so a failed generation stops there with a non-zero status.

Why a gate rather than an exit

The recipe is pasted into an interactive shell rather than run as a script. An exit 1 would close the reader's terminal, and a return is not valid outside a function or a sourced file. [ -f "$config_dir/secrets.yaml" ] && docker run ... stops the compile without either.

Verification

The whole fenced recipe was run with docker stubbed as a function, under both bash and dash:

Case docker run Status
secrets.yaml generated Runs 0
A real secrets.yaml already present Runs, and the file is untouched 0
Template missing Skipped 1
openssl fails Skipped 1

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated the CI compilation instructions so the temporary compile container runs only when the required secrets.yaml file is present.

A failed secrets step printed its message and then carried on into docker
run, which failed later on a missing secret, a long way from the cause.
The run is now gated on secrets.yaml existing, so a failed generation
stops there with a non-zero status. An exit would close the terminal of
anyone pasting the recipe, which the gate avoids.
Copilot AI lite review requested due to automatic review settings September 21, 2026 04:15
@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

Understand this PR’s impact

Explore downstream dependencies and potential security impact with Blast Radius.

View blast radius →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 6954f4e7-687a-492f-b1a9-8617acb05caf

📥 Commits

Reviewing files that changed from the base of the PR and between 3415c8c and e014a09.

📒 Files selected for processing (1)
  • OPERATIONS.md

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The operations documentation now checks for secrets.yaml before it starts the throwaway compile container.

Changes

Conditional compile execution

Layer / File(s) Summary
Guard the compile command
OPERATIONS.md
The “Compiling the Way CI Does” snippet starts docker run only when config_dir/secrets.yaml exists.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

🚥 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 title clearly describes the main change: skip compilation when secrets.yaml is unavailable because generation failed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

Copilot AI 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.

Copilot review overview

🟢 Approval recommended

The change is a small, POSIX-compatible guard that cleanly prevents a known failure mode without altering the successful-path behavior.

Review effort: Lite
Findings: None

What changed in this PR

This PR updates the “Compiling the Way CI Does” shell recipe in OPERATIONS.md so that the compile container run is skipped (and the overall command returns non-zero) when secrets.yaml could not be generated, avoiding a later, less-informative failure inside docker run.

Changes:

  • Gate the docker run ... invocation behind [ -f "$config_dir/secrets.yaml" ] to stop immediately when secrets generation failed.
File Description
OPERATIONS.md Prevents the compile container run when secrets.yaml is absent, keeping failures closer to their root cause.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ptr727
ptr727 merged commit f2f1d22 into develop Sep 21, 2026
11 checks passed
@ptr727
ptr727 deleted the recipe-stop-on-secrets branch September 21, 2026 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants