Repository navigation
ci: sticky preview runs cute-dbt --pr-diff on the PR's own dbt-project/ diff (#118) - #119
Conversation
…t/ diff Adds a `prdiff-preview` job to report-preview.yml that — only when a PR touches dbt-project/ — installs pinned dbt-fusion (standalone binary, no pip), compiles an EPHEMERAL manifest at the PR head, and runs `cute-dbt --pr-diff` on the PR's own `git diff --unified=0 base...head -- dbt-project/`, uploading a `report-preview-dbt-project` artifact the sticky-comment aggregator picks up (distinct label + status line). Empty diff = skip clean via an in-step guard (no new third-party action). The manifest is ephemeral (never committed) so the committed-manifest root_path leak concern does not apply. Syncs the consumer-recipe pointer (examples/cute-dbt-report-preview.yml) and documents the dbt-fusion + PrDiff-self-dogfood variant in the book recipe (github-actions-pr-review.md § 11). Implements #118. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
….result The prdiff-preview job has no job-level `if:`, so it always runs to completion and reports `result: success` even on PRs that don't touch dbt-project/. The old `case "$PRDIFF_RESULT"` therefore printed a "dbt-project (PrDiff) row below" claim with no such row in the table on every common-case (non-dbt) PR, and its `skipped)` branch was dead code. Expose `touched` as a job output and branch the comment on it instead. Also exclude `dbt-project/target/` from the diff so a PR touching only the committed manifest doesn't trigger a pointless fusion compile + empty-scope render. Addresses the review on PR #118. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 51 minutes and 3 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR implements a new ChangesPrDiff preview integration for sticky PR comment
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Code Review
This pull request adds a new section to the documentation describing how to compile a dbt project using dbt-fusion as a standalone binary in GitHub Actions. The feedback suggests a minor correction to avoid misleading readers about dbt-fusion's support for package management (dbt deps).
📄 Rendered report previewAll examples regenerated cleanly. This PR doesn't touch
Click Download to fetch the rendered HTML. Each artifact Alternative: GitHub CLI# gh CLI >= 2.63 extracts into ./report-preview-playground/.
gh run download 26730198829 -R breezy-bays-labs/cute-dbt -n report-preview-playground
open report-preview-playground/playground-report.htmlPosted by |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@book/src/recipes/github-actions-pr-review.md`:
- Around line 464-471: The GitHub Actions step "Install dbt-fusion" uses the
install script with the unsupported argument `--version "$FUSION_VERSION"`;
replace that argument with the official flag(s) used in the Fusion docs (e.g.,
use `--update` and pass the FUSION_VERSION value as the installer expects) so
the installer pins the intended preview release; update the run block that
invokes `curl ... | sh -s --` to pass the documented flag(s) for
installing/pinning a specific preview and keep the FUSION_VERSION env variable
intact.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: ecfd02c0-be5b-4e6b-80fe-025f89b205a9
📒 Files selected for processing (3)
.github/workflows/examples/cute-dbt-report-preview.yml.github/workflows/report-preview.ymlbook/src/recipes/github-actions-pr-review.md
…deps" Bot review on PR #119: - CodeRabbit (critical): the install uses `--version "$FUSION_VERSION"`, which IS the correct installer flag for pinning a specific release (installer usage: "--version VER Install version VER"; `--update` is for updating an existing install, wrong for a fresh CI runner). Added a post-install version assertion so CI fails loud if the pin ever lands the wrong release — making the concern moot mechanically. - Gemini: dropped "no dbt deps" from the § 7 fusion-variant pointer — fusion DOES support packages; the example skips `dbt deps` only because this project has none, not because of fusion. Mirrored the version assertion into the book § 11 recipe snippet. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Summary
Adds a
prdiff-previewjob to the sticky-comment workflow (report-preview.yml, cute-dbt#71) that — only when a PR touchesdbt-project/— installs pinned dbt-fusion, compiles an ephemeral manifest at the PR head, and runscute-dbt --pr-diffon the PR's owngit diff --unified=0 base...head -- dbt-project/, uploading areport-preview-dbt-projectartifact the existingsticky-commentjob globs (report-preview-*). So a PR editingdbt-project/self-shows its rendered PrDiff diff (inline SQL diff #111, block-precise updated-test detection + YAML drawer diff #96) in the same sticky comment — the payoff of the embedded example landed in #114.Closes #118
Design (locked)
Manifest = CI-recompiled ephemeral, not the committed one. Always correct regardless of whether the author recompiled; no leak risk — the manifest is ephemeral, never committed (the committed-manifest
root_pathscrub concern doesn't apply). Empty-diff is handled by an in-step guard (no new third-party action): on a PR that doesn't touchdbt-project/, the job runs the diff step, setstouched=false, and every downstream step skips — the job ends green with no artifact.What's in it
report-preview.yml: theprdiff-previewjob (pinned fusion2.0.0-preview.177via the standalone-binary installer, no pip; offlinedbt compile;fetch-depth: 0; SHA-pinned actions +persist-credentials: false+ least-privilegepermissions). The committeddbt-project/target/is excluded from the diff so a manifest-only PR doesn't trigger a pointless compile. Thesticky-commentjob gains a distinct dbt-project row label + a status line that branches on the job'stouchedoutput.examples/cute-dbt-report-preview.yml: kept as the minimal baseline starter; its variations pointer now lists the dbt-fusion + PrDiff-self-dogfood patterns (which live in the recipe page, per the file's own convention).book/src/recipes/github-actions-pr-review.md§ 11: documents the dbt-fusion standalone-binary variant (no pip, offline compile,uvx dbt-autofixnote) and cross-links this workflow as the worked dogfood example.Validation
actionlintclean on both workflow files (incl. shellcheck ofrun:blocks).cute-dbt --pr-diff --manifest dbt-project/target/manifest.json --project-root dbt-projectline, against a fusion-compiled manifest + a realdbt-project/diff → exit 0, inline-diff markup rendered. Fusion compile: 6 models / 29 success / 0 errors.mdbook build bookgreen..result(alwayssuccesssince the job has no job-levelif:), falsely claiming a dbt-project row on non-dbt PRs — is fixed (3388339): it now branches on the job'stouchedoutput.Scope / follow-up
ci:/ non-versioning.dbt-project/(this PR doesn't touchdbt-project/, so its own preview is correctly empty).Merge note
Keep the squash subject on the
ci:line so release-plz classifies it non-versioning (the branch also carries afix:commit for the review correction).Summary by CodeRabbit
New Features
Documentation