mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-05 14:42:05 +09:00
docs(contributing): define what counts as a breaking change (#5253)
<!-- Thank you for making a contribution! Here are some tips for you: - Use Conventional Commits for the PR title: `type(scope): description` - Types: feat, fix, security (a fix that comes through a security advisory), docs, style, refactor, perf, test, build, ci, chore - Scopes are not an exhaustive list — pick the most specific scope for the change and extend the list when a genuinely new area appears. Examples: - System components: dashboard, platform, operator, cilium, kube-ovn, linstor, fluxcd, cluster-api - Managed apps: postgres, mariadb, redis, kafka, clickhouse, virtual-machine, kubernetes - Development and maintenance: api, hack, tests, ci, docs, maintenance - Breaking changes: append `!` after type/scope (`feat(api)!: ...`) or add a `BREAKING CHANGE:` footer, a `fix` included. What counts as breaking: https://github.com/cozystack/cozystack/blob/main/docs/agents/contributing.md#what-counts-as-breaking - If it's a work in progress, consider creating this PR as a draft. - Don't hesistate to ask for opinion and review in the community chats, even if it's still a draft. - Fixes merged to `main` reach the release lines the backport batch runs for automatically, so do not open backport PRs by hand: https://github.com/cozystack/cozystack/blob/main/docs/release/backports.md --> ## What this PR does Contributing guide and PR template say how to mark a breaking change, `!` after type/scope or a `BREAKING CHANGE:` footer, but nothing says what makes a change breaking. This PR adds that to `docs/agents/contributing.md`: after the upgrade an existing install, client or consumer is refused, loses something it used, or has to be edited to keep working. The case that showed the gap is [#4973](https://github.com/cozystack/cozystack/pull/4973). It was a `fix` that made a values shape the previous version ran fail at render time. It merged with a release note about it and without `!`, and no written rule decided it either way. The definition follows what maintainers already mark with `!` on merged fixes, it is not a new policy: [#4847](https://github.com/cozystack/cozystack/pull/4847) (runtime refusal), [#4639](https://github.com/cozystack/cozystack/pull/4639) and [#4796](https://github.com/cozystack/cozystack/pull/4796) (refusal only for new or changed objects, existing ones keep working). Not breaking: a change that only accepts more, makes something broken work, refuses only what never worked even if it rendered or deployed, or changes how a working install runs while it keeps working. Refusing what never worked is how [#4973](https://github.com/cozystack/cozystack/pull/4973) treats its own no-sizing pool, and it is why [#4567](https://github.com/cozystack/cozystack/pull/4567) was a plain `fix`. I walked the text against [#4973](https://github.com/cozystack/cozystack/pull/4973) and [#5083](https://github.com/cozystack/cozystack/pull/5083) (breaking, both merged without `!`) and against [#4220](https://github.com/cozystack/cozystack/pull/4220), [#4974](https://github.com/cozystack/cozystack/pull/4974), [#3935](https://github.com/cozystack/cozystack/pull/3935) (not breaking). One place it differs from a marker: [#4569](https://github.com/cozystack/cozystack/pull/4569) has `!`, but its value rendered and KubeVirt never admitted it, so by this text it is not breaking. The text also says the `fix` type does not exempt a change, and an `Action required` line in the release note does not replace the marker. PR template tip line links to the new section (link works after merge, same as the backports one next to it). A default change that degrades a working install without failing it is not covered. If it should be, please say so here. `contributors/README.md` in [cozystack/community](https://github.com/cozystack/community) repeats the marker syntax and has no definition either. No follow-up there yet, so the downstream boxes stay empty. Not in this PR: `labels.yml`, `pr-labeler.yaml`, the release docs, and a check for `Action required` without the marker. ### Screenshots <!-- REQUIRED for UI changes: attach screenshots or screen recordings demonstrating the visual impact of your changes. PRs with UI changes without screenshots will not be merged. --> ### Downstream repositories <!-- Cozystack is upstream for repositories that are NOT kept in sync with it automatically, and nothing in CI compares the two sides, so a change here can break them silently. Which change forces what, and which file to touch, is the trigger map in docs/agents/contributing.md under "Downstream Repositories". Walk it before you tick anything. IF YOU ARE AN AI AGENT OR AN LLM, THIS IS PART OF THE TASK, NOT A FORM TO FILL IN: 1. Walk the trigger map against the actual diff of this PR, file by file. Do not decide from the PR title or from your memory of what you changed. 2. For every repository you tick, open the follow-up PR there and link it on the same line. A ticked box with no link claims work that does not exist, which is worse than an empty box. Search that repository for an open PR or issue covering it first, and link that instead of filing a duplicate. 3. When the follow-up is out of scope, or needs a decision that is not yours to make, open an issue in that repository instead, link that, and say so in the PR body. Do not push a speculative PR into another repository just to fill a line here. 4. Do not tick "No downstream repository is affected" to make the checklist go away. If you are unsure, leave every box empty and say so in the PR body, so a human decides. --> - [ ] No downstream repository is affected by this change - [ ] [cozystack/website](https://github.com/cozystack/website) - follow-up: - [ ] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: - [ ] [cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack) - follow-up: - [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: - [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up: - [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) - follow-up: - [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) - follow-up: - [ ] [cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server) - follow-up: - [ ] [cozystack/external-apps-example](https://github.com/cozystack/external-apps-example) - follow-up: - [ ] [cozystack/examples](https://github.com/cozystack/examples) - follow-up: - [ ] [cozystack/community](https://github.com/cozystack/community) - follow-up: ### Release note <!-- Write a release note: - Explain what has changed internally and for users. - Start with the same `type(scope):` prefix as in the PR title - Follow the guidelines at https://github.com/kubernetes/community/blob/master/contributors/guide/release-notes.md. --> ```release-note docs(contributing): the contributing guide now defines a breaking change (after the upgrade an existing install, client or consumer is refused, loses something it used, or has to be edited to keep working), says the `fix` type does not exempt a change and an `Action required` line in the release note does not replace the `!` marker. The PR template links to it. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Documentation** * Added clearer guidance on what qualifies as a breaking change, including examples of changes that are not breaking. * Defined breaking changes by whether an upgrade prevents previously working installs, clients, or consumers from working, or removes something they use. * Linked the pull request template’s breaking-change guidance to the contributing documentation. * Clarified that commit markers and release notes are separate requirements, and that commit type or prior buggy behavior does not determine whether a change is breaking. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
2 files changed
+10
-2
No files matched your search
@@ -5,7 +5,7 @@
|
||||
- System components: dashboard, platform, operator, cilium, kube-ovn, linstor, fluxcd, cluster-api
|
||||
- Managed apps: postgres, mariadb, redis, kafka, clickhouse, virtual-machine, kubernetes
|
||||
- Development and maintenance: api, hack, tests, ci, docs, maintenance
|
||||
- Breaking changes: append `!` after type/scope (`feat(api)!: ...`) or add a `BREAKING CHANGE:` footer
|
||||
- Breaking changes: append `!` after type/scope (`feat(api)!: ...`) or add a `BREAKING CHANGE:` footer, a `fix` included. What counts as breaking: https://github.com/cozystack/cozystack/blob/main/docs/agents/contributing.md#what-counts-as-breaking
|
||||
- If it's a work in progress, consider creating this PR as a draft.
|
||||
- Don't hesistate to ask for opinion and review in the community chats, even if it's still a draft.
|
||||
- Fixes merged to `main` reach the release lines the backport batch runs for automatically, so do not open backport PRs by hand: https://github.com/cozystack/cozystack/blob/main/docs/release/backports.md
|
||||
|
||||
@@ -62,7 +62,7 @@ git commit --signoff --message "type(scope): brief description"
|
||||
- Apps, e.g.: `postgres`, `mariadb`, `redis`, `kafka`, `clickhouse`, `virtual-machine`, `kubernetes`
|
||||
- Other, e.g.: `api`, `hack`, `tests`, `ci`, `docs`, `agents`, `maintenance`
|
||||
|
||||
Breaking changes: append `!` after type/scope (`feat(api)!: ...`) or add a `BREAKING CHANGE:` footer.
|
||||
Breaking changes: append `!` after type/scope (`feat(api)!: ...`) or add a `BREAKING CHANGE:` footer. What counts as breaking is defined in [What counts as breaking](#what-counts-as-breaking).
|
||||
|
||||
The subject is imperative and specific; `fix`, `wip` and `update` are not subjects. The body, when there is one, explains why the change is made and only that: the diff already shows what changed and how. Write for a reader who has only `git log`, so no review-iteration or planning vocabulary (`address review comments`, `pass 2`, `batch 1`, `as discussed`) and no bare issue or ticket number in place of the explanation.
|
||||
|
||||
@@ -84,6 +84,14 @@ A commit that fixes a defect introduced by an earlier commit carries a kernel-st
|
||||
|
||||
Use `Closes: #N` only when the change fully resolves the issue. For partial work, use a non-closing reference such as `Refs: #N`; a closing commit trailer can close the issue when it reaches the default branch even if the PR body uses a non-closing link. For an issue in another repository, qualify the reference as `owner/repository#N`, including in a closing trailer (`Closes: owner/repository#N`). Reference trailers go after the body and before `Assisted-by:` and `Signed-off-by:`.
|
||||
|
||||
### What counts as breaking
|
||||
|
||||
A change is breaking when, after the upgrade, an existing install, client or consumer is refused, loses something it used, or has to be edited to keep working. That covers a refusal at render, admission or runtime of something that worked before, including a refusal that hits only new or changed objects while existing ones keep working. Losing something covers a removed or renamed key, field or name, and a name or format a consumer reads.
|
||||
|
||||
A change is not breaking when it only accepts more, makes something broken work, changes how a working install runs while it keeps working and there is nothing for the user to do, or refuses only what never worked, even if that rendered or deployed. The commit type does not exempt a change, and neither does the old behaviour having been a bug, as long as an install was running on it.
|
||||
|
||||
The `release-note` block describes the consequence and what to do about it; it does not stand in for the marker. A release note that asks the operator to act, with an `Action required` line for instance, is a prompt to apply the definition above, and a change the definition calls breaking carries the `!` or the footer as well as the note.
|
||||
|
||||
### AI Agent Attribution
|
||||
|
||||
When an AI agent authors or materially assists with a commit, add exactly one trailer line next to the `Signed-off-by:` trailer that `--signoff` produces:
|
||||
|
||||
Reference in new issue
Block a user