Fix two silent defects in the documented CI template - #68
Merged
Conversation
…last successful run Co-Authored-By: brandon <brandon@flightcontrol.dev>
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
Summary
A user report (defects #1 and #3) found that the template in
/docs/config-as-code/ci-integrationpasses green on a config Ravion rejects, and permanently skips a merge whose apply run was cancelled or failed. Both are fixed here; defect #2 (unscopedproject config apply) is not addressed — it needs a CLI or product decision.1. The plan job no longer swallows the dry-run status.
--dry-runis the only pre-merge validation a config gets, and|| truethrew its exit code away, so a 422 was rendered into the PR comment as if it were a diff. The failure is now counted per resource, keeping the comment (the errors are the useful output), and a final step after the comment fails the job:2. The push diff base is the last successful run, not
github.event.before.beforeassumes every earlier push was applied; a cancelled queued run (any adopter addingconcurrency) or a failed apply left that commit outside every later diff, so live stayed behind the repo forever. The sharedlist_changed_resourcesstep now branches on the event:$HEADis excluded because a re-run of the current commit would otherwise diff it against itself, and an unfetchable sha (force push, expired retention) falls back togithub.event.before. Pull requests keep usinggithub.event.pull_request.base.sha. The workflow file name comes fromGITHUB_WORKFLOW_REFso adopters who rename the file don't have to edit the command, and both jobs gainactions: readplusGH_TOKENfor thegh run listcall.mint validatepasses; the YAML block parses with anchors intact and everyrunscript passesbash -n.Link to Devin session: https://app.devin.ai/sessions/3d501803e28b497e937c077a7f1ddb5b
Requested by: @flybayer
Greptile Summary
The documentation’s GitHub Actions template now preserves dry-run failures while still posting diagnostics and computes push changes from the last successful workflow run.
Confidence Score: 5/5
The pull request appears safe to merge, with no concrete changed-code defect identified.
The revised template correctly retains dry-run diagnostics before failing invalid plans and uses a guarded successful-run lookup with a fallback for push comparisons.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD PR[Pull-request config change] --> DryRun[Dry-run each changed resource] DryRun --> Comment[Post combined plan comment] Comment --> Result{Any dry-run failures?} Result -->|Yes| Fail[Fail plan check] Result -->|No| Pass[Pass plan check] Push[Push to default branch] --> History[Find last successful push run] History --> Fetch{Commit available?} Fetch -->|Yes| Diff[Diff successful commit to HEAD] Fetch -->|No| Fallback[Use push event base] Fallback --> Diff Diff --> Apply[Apply changed Ravion resources]Reviews (1): Last reviewed commit: "Fail the CI template's plan job on inval..." | Re-trigger Greptile
Context used: