Skip to content

Commit 4733eb4

Browse files
committed
docs(deprecation policy): treat deprecation.d as the canonical source
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`.
1 parent 7eed9dc commit 4733eb4

1 file changed

Lines changed: 20 additions & 22 deletions

File tree

docs/DEPRECATION_POLICY.md

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -68,30 +68,28 @@ When possible, Vector will error at start-up when a removed configuration option
6868

6969
When introducing a deprecation into Vector, the pull request introducing the deprecation should:
7070

71-
- Add a note to the Deprecations section of the upgrade guide in `website/content/en/highlights` for
72-
the next release with a description and directions for transitioning if applicable.
73-
- Copy the same note from the previous step, to a changelog fragment, with type="deprecation". See the changelog
74-
fragment [README.md](../changelog.d/README.md) for details.
75-
- Add a deprecation note to the docs. Typically, this means adding `deprecation: "description of the deprecation"`
71+
- **Add a deprecation fragment** to [`deprecation.d/`](../deprecation.d/) following the format in
72+
[`deprecation.d/README.md`](../deprecation.d/README.md). Set `deprecated_since` to the current release version.
73+
Use the fragment body for the full migration guide (rationale, before/after examples, links). Then run
74+
`cargo vdev deprecation generate` to regenerate `website/data/deprecations.json` and commit both files.
75+
Run `cargo vdev deprecation show` to preview, and `cargo vdev deprecation check` to validate.
76+
- Add a changelog fragment with `type="deprecation"` ([`changelog.d/README.md`](../changelog.d/README.md)). A short
77+
one-line summary is sufficient — the deprecation fragment is the canonical migration guide and is rendered on the
78+
release page automatically.
79+
- Add a deprecation note to the component docs. Typically, this means adding `deprecation: "description of the deprecation"`
7680
to the `cue` data for the option or feature. If the `cue` schema does not support `deprecation` for whatever you
7781
are deprecating yet, add it to the schema and open an issue to have it rendered on the website.
78-
- For a component that is being renamed, the documentation page for the old name of the component is removed and a
79-
new page is added for the new name. An alias is added so the old name will redirect to the new name. The title of
80-
the new name will be appended with the text `(formerly OldName)`.
81-
- Add a log message to Vector that is logged at the `WARN` level starting with the word `DEPRECATION` if Vector detects
82-
the deprecated configuration or feature being used (when possible).
83-
- Add a deprecation notice file to [`deprecation.d/`](../deprecation.d/) following the format described in
84-
[`deprecation.d/README.md`](../deprecation.d/README.md). Set `deprecated_since` to the current release version.
85-
Then run `cargo vdev deprecation generate` to regenerate `website/data/deprecations.json` and
86-
commit both files. Run `cargo vdev deprecation show` to preview all current notices and
87-
`cargo vdev check deprecations` to validate.
82+
- For a component that is being renamed, remove the documentation page for the old name and add a new one for the new
83+
name. Add an alias so the old name redirects. The title of the new name should be appended with the text
84+
`(formerly OldName)`.
85+
- Add a `WARN`-level log message starting with the word `DEPRECATION` if Vector detects the deprecated configuration
86+
or feature being used (when possible).
8887

8988
When removing a deprecation in a subsequent release, the pull request should:
9089

91-
- Indicate that it is a breaking change by including `!` in the title after the type/scope
92-
- Remove the deprecation from the documentation
93-
- Add a note to the Breaking Changes section of the upgrade guide for the next release with a description and directions
94-
for transitioning if applicable.
95-
- Copy the same note from the previous step, to a changelog fragment, with type="breaking". See the changelog
96-
fragment [README.md](../changelog.d/README.md) for details.
97-
- Run `cargo vdev deprecation enact <slug> --version <removed-in-version>` and commit the result.
90+
- Mark the change as breaking by including `!` in the title after the type/scope.
91+
- Remove the deprecation from the component documentation.
92+
- Add a changelog fragment with `type="breaking"` ([`changelog.d/README.md`](../changelog.d/README.md)). A short
93+
one-line summary is sufficient — the enacted deprecation entry is the canonical record of what was removed.
94+
- Run `cargo vdev deprecation enact <slug> --version <removed-in-version>` and commit the result. This records the
95+
removal in `website/data/deprecations.json` and deletes the original fragment in one step.

0 commit comments

Comments
 (0)