Repository navigation
Conversation
✅ Deploy Preview for calico-docs-preview-next ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview succeeded!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The drift check omits several actively built versioned documentation trees.
Review effort: Balanced
Findings: 1
What changed in this PR
Adds reusable, validated feature lifecycle notices and includes cleanup from stacked PR #3051.
Changes:
- Adds the
LifecycleNoticecomponent and automatic front-matter insertion plugin. - Adds lifecycle-status drift validation and tests.
- Converts two pilot notices and removes obsolete tech-preview notices.
| File | Description |
|---|---|
src/theme/MDXComponents.js |
Registers the lifecycle component globally. |
src/remark/lifecycleNoticePlugin.js |
Inserts notices from front matter. |
src/remark/__test__/lifecycleNoticePlugin.test.js |
Tests notice insertion and validation. |
src/components/LifecycleNotice/index.tsx |
Implements lifecycle notice variants. |
src/components/LifecycleNotice/__test__/index.test.tsx |
Tests component rendering. |
src/components/LifecycleNotice/__test__/drift.test.ts |
Checks notices against feature-status data. |
src/components/FeatureStatusTable/featureStatus.ts |
Exposes status resolution for drift checks. |
docusaurus.config.js |
Enables the remark plugin. |
calico/reference/resources/felixconfig.mdx |
Removes an obsolete preview notice. |
calico/reference/felix/configuration.mdx |
Removes an obsolete preview label. |
calico/getting-started/kubernetes/self-managed-onprem/onpremises.mdx |
Removes obsolete CRD preview notices. |
calico-enterprise/threat/gateway-waf/overview.mdx |
Uses front-matter lifecycle metadata. |
calico-enterprise/reference/resources/felixconfig.mdx |
Uses an inline lifecycle notice. |
calico_versioned_docs/version-3.33/getting-started/kubernetes/self-managed-onprem/onpremises.mdx |
Removes obsolete versioned notices. |
.github/copilot-instructions.md |
Documents lifecycle-notice usage. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| const TREES: { dir: string; product: string; version: string | null }[] = [ | ||
| { dir: 'calico', product: 'calico', version: null }, | ||
| { dir: 'calico_versioned_docs/version-3.33', product: 'calico', version: '3.33' }, | ||
| { dir: 'calico-enterprise', product: 'calico-enterprise', version: null }, | ||
| { dir: 'calico-enterprise_versioned_docs/version-3.24-2', product: 'calico-enterprise', version: '3.24' }, | ||
| { dir: 'calico-enterprise_versioned_docs/version-3.23-2', product: 'calico-enterprise', version: '3.23' }, | ||
| { dir: 'calico-cloud', product: 'calico-cloud', version: null }, | ||
| { | ||
| dir: 'calico-cloud_versioned_docs/version-23-2', | ||
| product: 'calico-cloud', | ||
| version: ceVersionFromCloudversion('v3.23.1-4'), | ||
| }, | ||
| ]; |
f11292f to
640a6c6
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
The drift check excludes four documentation versions currently built and published.
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
Technology preview and deprecation notices were hand-typed prose repeated across 133 pages in at least eight wordings, which is why notices outlive the status they describe. This adds one way to write them. A page that is wholly about a feature declares the status in front matter: lifecycle-status: tech-preview lifecycle-feature: Gateway WAF lifecycle-id: gateway-waf A new remark plugin places the notice directly after the page title, where every hand-written notice already sat. It inserts the component rather than building an admonition, so the front matter form and the hand-placed form render through the same code and cannot drift apart. When only part of an otherwise generally available page is affected, or the notice needs extra guidance such as what to migrate to, the component is used directly in the page instead. The feature name is the admonition title rather than the subject of a sentence, so that one fixed body serves names that are plural, such as Native v3 CRDs, as well as singular ones. The notice reads nothing from data/feature-status.yaml at runtime, since it is a page-level editorial statement. A build-time check reconciles the two instead: lifecycle-id binds a page to a feature, and the test fails when a page and the data file disagree. It is seeded with the contradiction that shipped in 3.33, where the release notes called native v3 CRDs generally available while the install page still called it a technology preview. Converts two pages as pilots, one of each form. The remaining pages follow in later changes.
640a6c6 to
3425803
Compare
| const ALLOWED: Record<Declarable, CellStatus[]> = { | ||
| 'tech-preview': ['tech-preview'], | ||
| deprecated: ['deprecated', 'removed'], | ||
| }; |
| it('has something to check', () => { | ||
| // A rename or a moved tree would otherwise make this suite pass by checking nothing. | ||
| expect(TREES.filter((tree) => mdxFiles(tree.dir).length > 0)).toHaveLength(TREES.length); | ||
| }); |


Stacked on #3051, which is not merged yet, so this diff also shows that change. The commit to review here is the second one, "Add a component for feature lifecycle notices". Merge #3051 first and this diff reduces to that commit alone.
Technology preview and deprecation notices are hand-typed prose repeated across 133 pages in at least eight wordings. That is why notices outlive the status they describe, as DOCS-236, DOCS-616 and DOCS-375 all record, and as #3051 had to fix again. This adds one way to write them.
A page that is wholly about a feature declares the status in front matter and writes nothing in the body:
A new remark plugin places the notice directly after the page title, where every hand-written notice already sat. It inserts the component rather than building an admonition itself, so the front matter form and the hand-placed form render through the same code and cannot drift apart. A page that declares a status but has no title fails the build.
When only part of an otherwise generally available page is affected, or the notice needs extra guidance such as what to migrate to, the component is used directly in the page.
Two decisions worth a reviewer's attention.
The feature name is the admonition title rather than the subject of a sentence. Four of the names in data/feature-status.yaml are plural, so a template like "X is a technology preview feature" cannot serve all of them without a grammar flag per feature.
The notice reads nothing from data/feature-status.yaml at runtime, because it is a page-level editorial statement and coupling it would make every page edit a data file edit. A build-time check reconciles the two instead. The lifecycle-id binds a page to a feature, and the check fails when a page and the data file disagree for that tree's release. It is seeded with the contradiction that shipped in 3.33, so it is exercised whatever the content tree currently looks like. Pages without an id are not checked, so a feature with no entry in the data file costs nothing.
Verification:
Two pages are converted as pilots, one of each form. They are in the next tree, so the links are on the next preview host, because static/_redirects sends next paths away from the main preview.
The remaining pages follow in later changes, one product per change.
Related: DOCS-2999.