fix: sync Fern root config during devnote publish#714
Conversation
|
MkDocs preview: https://856a554f.dd-docs-preview.pages.dev Fern preview: https://nvidia-preview-pr-714.docs.buildwithfern.com/nemo/datadesigner
|
Greptile SummaryThis PR fixes the
|
| Filename | Overview |
|---|---|
| fern/scripts/fern-published-branch.py | Adds FERN_ROOT_CONFIG_PATHS, copy_required_path, and sync_fern_root_config; calls sync_fern_root_config at the top of patch_devnotes to overwrite the published docs.yml and fern.config.json with source-branch content while preserving and restoring the published branch's historical versions: block. |
| packages/data-designer/tests/docs/test_fern_published_branch.py | New regression test that exercises the stale-logo-config scenario end-to-end: source has global-theme: nvidia and one version; published has legacy layout keys and two versions. Verifies the root config keys are replaced and the historical v0.6.0 version is preserved. |
Sequence Diagram
sequenceDiagram
participant CI as CI / patch-devnotes
participant S as source checkout (main)
participant P as published branch (docs-website)
CI->>P: read fern/docs.yml → extract + normalize versions: block
CI->>S: copy_required_path(fern/docs.yml) → P/fern/docs.yml
CI->>S: copy_required_path(fern/fern.config.json) → P/fern/fern.config.json
CI->>P: restore preserved versions: block into P/fern/docs.yml
CI->>P: validate_redirect_targets(published_root)
CI->>S: copy FERN_DEVNOTE_SUPPORT_PATHS (assets, components, styles)
CI->>S: extract Dev Notes block from versions/latest.yml
CI->>P: rewrite + replace Dev Notes block in P/fern/versions/latest.yml
CI->>P: write publish metadata
Reviews (2): Last reviewed commit: "fix: sync Fern root config during devnot..." | Re-trigger Greptile
PR #714 Review: fix: sync Fern root config during devnote publishSummaryThis PR fixes a stale-config bug in the Fern devnote publish path. Before this change, The fix introduces a FindingsCorrectness
Code Quality / Conventions
Tests
Risk / Blast Radius
VerdictLGTM. Targeted fix, mirrors existing publish-path conventions, regression test pins the behavior. Optional nit: consider a small negative test for |
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
c3587b8 to
36c9d03
Compare
Incorporates johnnygreco's fix so the devnote publish path syncs the updated fern/docs.yml (global-theme) and fern/fern.config.json (CLI pin) to docs-website instead of combining new support files with stale root config — required for this PR's theme migration to propagate. # Conflicts: # fern/scripts/fern-published-branch.py
📋 Summary
Fixes the Fern devnote publish path so
docs-websiteadopts current Fern root config frommaininstead of combining current support files with stale root config. This lets root Fern configuration changes, including the NVIDIA global theme migration, propagate through devnote publishing while preserving the historical version archive.🔗 Related Issue
N/A — fixes failing CI job https://github.com/NVIDIA-NeMo/DataDesigner/actions/runs/26648943945/job/78541965075
🔄 Changes
fern/docs.ymlandfern/fern.config.jsonduringpatch-devnotes, while preserving the published branch's historicalversions:block.patch-devnotescontract: source root config wins, historical published versions survive, devnote assets are refreshed, and devnote pages are patched.🧪 Testing
make testpasses (not run; targeted docs publish script change)uv run --group dev pytest packages/data-designer/tests/docs/test_fern_published_branch.py -qorigin/main+origin/docs-websiteworktree andmake check-fern-docsAdditional validation:
uv run --group dev ruff check fern/scripts/fern-published-branch.py packages/data-designer/tests/docs/test_fern_published_branch.pyuv run --group dev ruff format --check fern/scripts/fern-published-branch.py packages/data-designer/tests/docs/test_fern_published_branch.pyuv run python scripts/update_license_headers.py --check✅ Checklist