fix(ci): add frozen version content to preview build and fix error handling#1285
Conversation
…ndling Preview build was missing the git archive step for frozen version content (v1.2.0, v1.3.0, v1.4.0), so preview generation would fail once DOCS_FERN_TOKEN is provisioned. Uses warning instead of error for missing tags since preview shouldn't hard-fail. Preview comment swallowed fern errors — OUTPUT=$(...) with bash -e aborts before echo on failure. Switches to tee-based streaming, matching the publish workflow pattern. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds extraction of frozen docs from git tags during preview artifact collection, streams ChangesFern Preview Pipeline
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
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)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
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 @.github/workflows/fern-docs-preview-build.yml:
- Around line 69-71: The script currently accepts any ref via git rev-parse
"$version" and then git archive "$version", which can pick up branches or
commits; change both checks to explicitly resolve tag refs (e.g., use
"refs/tags/$version" with git rev-parse --verify and git archive against the tag
ref) so the archive always uses the tag object; update the existence check that
uses git rev-parse and the git archive invocation (the two places referencing
"$version") to reference "refs/tags/$version" instead.
🪄 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: Enterprise
Run ID: 16451141-4377-43bb-9bba-e9956975ef2d
📒 Files selected for processing (2)
.github/workflows/fern-docs-preview-build.yml.github/workflows/fern-docs-preview-comment.yml
git rev-parse and git archive with bare version names could resolve a branch instead of a tag if names collide. Use refs/tags/$version to ensure we always archive from the tag object. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
Good catch on the explicit tag refs — fixed in both preview-build and publish workflows. Thanks @coderabbitai. |
|
Tip For best results, initiate chat on the files or code changes.
|
Summary
Two fixes for the Fern preview pipeline:
Preview build missing frozen version content — Adds the
git archiveloop from the publish workflow so versioned docs (v1.2.0, v1.3.0, v1.4.0) are included in the preview artifact. Uses warning instead of error for missing tags.Preview comment swallows fern errors — Switches from
OUTPUT=$(fern generate ... 2>&1)totee-based streaming, matching the publish workflow pattern. Errors are now visible in CI logs.Same issues found and fixed in NVIDIA/topograph#322.
Fixes #1284
Type of Change
Component(s) Affected
Testing
Checklist
Summary by CodeRabbit