feat(releasing): add deprecation.d fragment system#25442
feat(releasing): add deprecation.d fragment system#25442thomasqueirozb wants to merge 7 commits into
Conversation
|
Your preview site for the vector.dev will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
2 similar comments
|
Your preview site for the vector.dev will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
|
Your preview site for the vector.dev will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
|
Your preview site for the vector.dev will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
4 similar comments
|
Your preview site for the vector.dev will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
|
Your preview site for the vector.dev will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
|
Your preview site for the vector.dev will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
|
Your preview site for the vector.dev will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
|
Your preview site for the Rust Doc will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
|
Your preview site for the VRL Playground will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
|
Your preview site for the vector.dev will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
|
Your preview site for the Rust Doc will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
|
Your preview site for the VRL Playground will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
d2b0864 to
0bc71cc
Compare
|
Your preview site for the vector.dev will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
|
Your preview site for the Rust Doc will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
|
Your preview site for the VRL Playground will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0bc71ccdd4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Your preview site for the VRL Playground will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
|
Your preview site for the vector.dev will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
|
Your preview site for the VRL Playground will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
|
Your preview site for the Rust Doc will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
Introduces a structured deprecation tracking system parallel to changelog.d: - `deprecation.d/` holds Markdown fragments with YAML frontmatter (`what`, `deprecated_since`, optional `description`), one per pending deprecation. README explains the policy and lifecycle. - `cargo vdev deprecation show [--version X.Y.Z]` lists fragments grouped into announced/planned/enacted buckets for a target release. - `cargo vdev deprecation enact <slug> [--version X.Y.Z]` records an enacted entry in the generated JSON and removes the fragment. - `cargo vdev deprecation generate` regenerates `website/cue/reference/generated/deprecations.json` from fragments. - `cargo vdev check deprecations` validates fragments and ensures the generated JSON is up to date. Wired into a GitHub Actions workflow triggered when `deprecation.d/` or the generated JSON change. - CUE schema (`#DeprecationEntry`, `#EnactedDeprecationEntry`) and Hugo templates (`releases/deprecations.html`, `partials/releases/deprecations.html`, `shortcodes/deprecations.html`) render deprecations on the release pages and on `/releases/deprecations`. - Existing deprecations from `docs/DEPRECATIONS.md` migrated to fragment files; the legacy doc is deleted. `docs/DEPRECATION.md` renamed to `docs/DEPRECATION_POLICY.md` for clarity (links updated). - Minor-release issue template updated to call out the new `vdev deprecation show`/`enact` steps. The website build pipeline runs `vdev deprecation generate` before `cue-build` so the generated JSON is always consumed alongside the cue sources.
Previously the per-release deprecations partial used HasPrefix on the major.minor pair, so a fragment with `deprecated_since: 0.56.1` would also render on the 0.56.0 release page (and similarly for enacted `removed_in`). Use exact equality against the page version, falling back to the shorthand `X.Y` form for fragments that omit the patch.
- "Removed" step now tells contributors to run `cargo vdev deprecation enact`, not to delete the fragment manually. Manual deletion drops the entry from `past_deprecations` instead of moving it there. - Validation command renamed: `cargo vdev check deprecations` → `cargo vdev deprecation check`.
The process and removal sections previously asked authors to copy the same migration text into the upgrade guide, the changelog fragment, and the deprecation.d/ fragment. With the fragment now rendered on the release page automatically, that duplication is wasted work. Reframe: - Deprecation.d fragment is the canonical, full migration guide. - Changelog fragment can be a short one-liner; it doesn't need to repeat the migration body. - Removed the "add a note to the upgrade guide highlights" requirement; highlights remain optional for richer treatment, not duplicate text. - Validation command renamed: `cargo vdev check deprecations` → `cargo vdev deprecation check`.
8fadf02 to
4733eb4
Compare
|
Your preview site for the vector.dev will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
|
Your preview site for the VRL Playground will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
|
Your preview site for the Rust Doc will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4733eb45bc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The deprecations index lived at /releases/deprecations/ because the content file was under content/en/releases/. That coupled the URL to the releases section even though the page is its own concept (an always-current catalog of active and past deprecations, not a release artifact). Move: content/en/releases/deprecations.md -> content/en/deprecations.md layouts/releases/deprecations.html -> layouts/_default/deprecations.html New URL: /deprecations/. Updated the intra-link in the per-release deprecations partial to point at the new path.
|
Your preview site for the vector.dev will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
|
Your preview site for the Rust Doc will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
|
Your preview site for the VRL Playground will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
…t flow The "Deprecation" and "Removal" sections still promised that we notify users via the release upgrade guide, but the rewritten Process section treats the deprecation.d fragment (rendered on the release page and the deprecations index) as the canonical user-facing notification. Update both lifecycle sections to match: the fragment / enacted entry is the default; the upgrade guide remains an option for richer treatment when warranted, not a per-deprecation requirement.
|
Your preview site for the vector.dev will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
|
Your preview site for the VRL Playground will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
|
Your preview site for the Rust Doc will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
| generate-deprecations-json: | ||
| $(VDEV) deprecation generate | ||
|
|
||
| structured-data: generate-vrl-docs generate-deprecations-json cue-build config-examples |
There was a problem hiding this comment.
Reminder to update the vdev version in website amplify configuration
| - Add a changelog fragment with `type="deprecation"` ([`changelog.d/README.md`](../changelog.d/README.md)). A short | ||
| one-line summary is sufficient — the deprecation fragment is the canonical migration guide and is rendered on the | ||
| release page automatically. | ||
| - Add a deprecation note to the component docs. Typically, this means adding `deprecation: "description of the deprecation"` |
There was a problem hiding this comment.
| - Add a deprecation note to the component docs. Typically, this means adding `deprecation: "description of the deprecation"` | |
| - Add a deprecation note to the component docs if applicable. Typically, this means adding `deprecation: "description of the deprecation"` | |
| to the cue file or `#[configurable(deprecated = "use <alternative> instead")]` to the parameter. |
| - Add a changelog fragment with `type="breaking"` ([`changelog.d/README.md`](../changelog.d/README.md)). A short | ||
| one-line summary is sufficient — the enacted deprecation entry is the canonical record of what was removed. |
There was a problem hiding this comment.
Should we even include a changelog? This will be its own section in the release. I think we can fully remove this entry from this doc
| #DeprecationEntry: { | ||
| what: string | ||
| deprecated_since: string | ||
| description?: string | ||
| } | ||
|
|
||
| #EnactedDeprecationEntry: { | ||
| what: string | ||
| deprecated_since: string | ||
| removed_in: string | ||
| description?: string | ||
| } |
There was a problem hiding this comment.
| #DeprecationEntry: { | |
| what: string | |
| deprecated_since: string | |
| description?: string | |
| } | |
| #EnactedDeprecationEntry: { | |
| what: string | |
| deprecated_since: string | |
| removed_in: string | |
| description?: string | |
| } | |
| #DeprecationEntry: { | |
| what: string | |
| deprecated_since: string | |
| description: string | |
| } | |
| #EnactedDeprecationEntry: #DeprecationEntry | { | |
| removed_in: string | |
| } |
We should likely require description and I think this works/makes it shorter
| - [ ] Run `cargo vdev deprecation show --version "${NEW_VECTOR_VERSION}"` to review new deprecation announcements in this release. | ||
| - [ ] Run `cargo vdev deprecation enact <slug> --version "${NEW_VECTOR_VERSION}"` for any deprecations being removed in this release, then commit all resulting changes (deleted fragment and updated `website/data/deprecations.json`). |
There was a problem hiding this comment.
Maybe we delete this from the release template? This would have been done in a previous PR and should likely not be part of the release. If it is then we did something wrong beforehand
| - [ ] Run `cargo vdev deprecation show --version "${NEW_VECTOR_VERSION}"` to review new deprecation announcements in this release. | |
| - [ ] Run `cargo vdev deprecation enact <slug> --version "${NEW_VECTOR_VERSION}"` for any deprecations being removed in this release, then commit all resulting changes (deleted fragment and updated `website/data/deprecations.json`). |
|
Your preview site for the vector.dev will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
|
Your preview site for the VRL Playground will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
|
Your preview site for the Rust Doc will be ready in a few minutes, please allow time for it to build. Heres your preview link: |
Summary
Introduces a
deprecation.d/fragment system that tracks deprecations as structured markdown files with YAML frontmatter, replacing the hand-maintaineddocs/DEPRECATIONS.mdtable.Each fragment carries:
what— short description of what's deprecateddeprecated_since— concrete semver (e.g.0.56.0)description— free-form Markdown migration guidanceNew
vdevcommandscargo vdev deprecation show [--version X.Y.Z]— list fragments grouped into announced / planned / enacted buckets for a target releasecargo vdev deprecation enact <slug> [--version X.Y.Z]— record an enacted entry in the generated JSON and remove the fragmentcargo vdev deprecation generate— regeneratewebsite/cue/reference/generated/deprecations.jsonfrom fragmentscargo vdev check deprecations— validate fragments and ensure the generated JSON is up to dateCI
A new GitHub Actions workflow (
.github/workflows/deprecation.yaml) runsvdev check deprecationswhendeprecation.d/or the generated JSON change.Website
CUE schema additions (
#DeprecationEntry,#EnactedDeprecationEntry) and Hugo templates render deprecations on:/releases/deprecationsindex page{{< deprecations >}}shortcode for ad-hoc inclusionThe website build pipeline runs
vdev deprecation generatebeforecue-build.Migration
docs/DEPRECATIONS.mdmigrated to fragment filesdocs/DEPRECATIONS.mddeleteddocs/DEPRECATION.mdrenamed todocs/DEPRECATION_POLICY.md(links updated inCONTRIBUTING.md,docs/REVIEWING.md)vdev deprecation show/enactstepsVector configuration
NA
How did you test this PR?
cargo test -p vdev— 59 tests passcargo clippy -p vdev— cleancargo vdev check deprecations— validates all 5 migrated fragments and confirms generated JSON is up to datecargo vdev deprecation show— verified bucket outputChange Type
Is this a breaking change?
Does this PR include user facing changes?
no-changeloglabel to this PR.References