mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-30 04:06:34 +09:00
f17cd76d5e37175a84ff4f0b57eec6d41f305d96
648
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
fba9fa8278 |
docs(release): add the v1.7.0 release notes (#5163)
## What this PR does
This PR adds `docs/releasenotes/v1.7.0.md`, short hand-written release
notes used as v1.7.0 release body. File is the same as in
[
|
||
|
|
bfc9aec823 |
docs(release): add changelog for v1.7.0 (#5162)
This PR adds the changelog for release `v1.7.0`.
✅ Changelog has been automatically generated in
`docs/changelogs/v1.7.0.md`.
|
||
|
|
94c79925f8 |
feat(api): add the credentials API with mint and revoke subresources (#4921)
## What this PR does Tenants read application passwords from Secrets today, and a leaked password can't be taken back. This PR adds the platform side of the user secrets API design (cozystack/community#137, ADR 0002): a password comes out once from a mint, the next mint replaces it, and a revoke kills it. The engines are converted in the PRs stacked on top, starting with Postgres in #4922. How it works: - A kind's chart renders one `CredentialTemplate` (`cozystack.io/v1alpha1`) per account: the username, the stored format (`scram-sha-256`, `mysql-native`, `sha256` or `plaintext`), labels for the account Secret, and an optional `valuesPath` for an operator that reads no Secret. - cozystack-controller keeps the account Secret `<template>.account`. It seeds it on a release the API marked for seeding, adopts an unowned Secret with the same username, leaves a foreign one alone with a `SecretConflict` condition, and mirrors the record (origin, time, actor, history) into the template status. For a `valuesPath` template it maintains an optional `valuesFrom` entry on the release. - `core.cozystack.io/v1alpha1` serves `credentials` as a read-only view of the templates, plus `mint` and `revoke` subresources. A mint checks the caller's `resourceVersion` precondition against the mirrored status, builds the whole Secret and writes it in one request, or answers 409. It never reads the Secret back. One API request writes one object; the best-effort Event is the only extra write. - The Application API marks a new release for seeding, keeps the account `valuesFrom` entries when it rewrites a release, and refuses to delete a suspended release that still has accounts, since Flux would skip its uninstall. - The dashboard gets a Credentials tab on the application page. It lists accounts with origin and history; an administrator can mint or revoke, and a viewer sees no buttons. The application charts are untouched here: a kind starts using this only when its chart renders templates. The `CredentialFormat` webhooks that ADR 0002 describes are not in this PR, so `format.name` accepts only the four built-in names for now. ### Screenshots <img width="1440" height="900" alt="01-admin-tab" src="https://github.com/user-attachments/assets/8c48086c-8f6c-4908-82c1-40e9078afe57" /> <img width="1440" height="900" alt="02-mint-dialog" src="https://github.com/user-attachments/assets/802b2963-3f57-4c0b-ab84-f74bad28c343" /> <img width="1440" height="900" alt="03-mint-result" src="https://github.com/user-attachments/assets/0e9ae3cc-7a3c-4daf-9a09-d4abf53bf70b" /> <img width="1440" height="900" alt="04-viewer-tab" src="https://github.com/user-attachments/assets/10e940f2-4ceb-469d-a0f9-6c9d20a62919" /> ### Downstream repositories - [ ] No downstream repository is affected by this change - [ ] [cozystack/website](https://github.com/cozystack/website) - follow-up: needed, cozystack/website#753 should document the `Credential` mint/revoke flow and the dashboard tab - [ ] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: needed later, a way to mint from Terraform; nothing breaks in this PR alone - [ ] [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: none, the design is cozystack/community#137 ### Release note ```release-note feat(api): Add the credentials API. Applications that support it expose their accounts as `credentials.core.cozystack.io`; an administrator mints a password once with the `mint` subresource, and `revoke` invalidates it without issuing a new one. The dashboard shows a Credentials tab for such applications. No application uses it in this release on its own; see the per-engine changes. ``` |
||
|
|
74e103d6f2 |
ci(workflows): run push and schedule workflows only in cozystack/cozystack (#5186)
## What this PR does GitHub runs no CI in a security advisory's temporary private fork, and merging from the advisory skips branch protection, so an embargoed fix currently reaches `main` with nothing having run on it. This PR prepares the repository for verifying such a fix in a separate private copy of the repository (an embargo mirror), and documents that process. - Every job of a workflow that a push or a schedule starts now runs only in `cozystack/cozystack`. A mirror receives all workflow files on each sync, and without the guard it would build, publish, prune and cut releases from that copy on every sync and cron tick. Workflows that also run on `pull_request` keep running on pull requests, which is what the mirror is for. Every job carries the guard rather than only the root jobs, because a job whose condition calls a status function such as `!cancelled()` runs even when the job it needs was skipped. - `hack/workflow-repo-guard.bats` holds every current and future push or schedule workflow to that guard, accepting it only as the leading conjunct so nothing ORed after it can reopen the job. - `docs/security/incident-response.md` describes the verification flow: sync the mirror on demand, open the fix PR inside it, record the green run in the advisory, then merge from the advisory. It also records why the mirror must not hold the public registry credentials: pull request CI pushes every image and the packages artifact (the full chart tree) to a registry that is anonymously readable, tag listing included, so a run there would publish the fix before the release. Behaviour in `cozystack/cozystack` is unchanged: the guard is true there, and each existing condition is kept intact inside the new conjunction. Contributor forks with Actions enabled stop running these workflows too. Out of scope, as a follow-up: letting pull request CI push to a private registry and pull from it in the E2E cluster, so the mirror can run the E2E suite and not only planning, pre-commit and the unit tests. Verification: - `hack/workflow-repo-guard.bats` was red before the workflow changes (30 unguarded jobs) and is green after; removing the guard from `tags.yaml` `rc-e2e`, dropping the pull request clause from `zizmor.yml`, or adding an unguarded scheduled workflow each turns it red. - Every changed workflow is identical to `main` once job `if` fields are removed (`yq 'del(.jobs[].if)'`). - `zizmor --offline` reports no findings; `actionlint` reports the same findings on the changed files as on `main`. - `hack/stitch-multiarch_test.bats` pinned the exact `if` of two `tags.yaml` jobs and is updated to the guarded form. ### Screenshots Not a UI change. ### Downstream repositories - [x] 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: The trigger map entry that touches this diff is `cozystack/ccp` for `tags.yaml`: its `package-bump` skill describes the release pipeline of `cozystack/cozystack`, which this PR does not change. ### Release note ```release-note ci(workflows): push- and schedule-triggered workflows run only in cozystack/cozystack, so a private mirror used to verify embargoed security fixes does not build, publish or release from its copy. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **CI** * Scheduled, release, and maintenance workflows now run only in the canonical repository. Pull-request checks continue to run where configured. * Build, validation, and security workflows now follow repository-specific run conditions. * **Documentation** * Updated incident-response guidance with steps for verifying fixes in a private advisory mirror, including CI limitations, check requirements, and credential restrictions. * **Tests** * Added workflow checks to verify repository guards and event-specific conditions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
6115d2d6ad |
docs(security): describe verifying an embargoed fix in a private mirror
GitHub runs no CI in an advisory's temporary private fork, and merging from the advisory skips branch protection, so a security fix reached main with nothing having run on it. The incident-response process now records where the fix is verified instead, how the mirror is kept in step with the public branches, and why the mirror must never hold the public registry credentials: pull request CI pushes the full chart tree to an anonymously readable registry, which would publish the fix before the release. Without those credentials a mirror run of any code change is red at the registry login, so the process names the jobs that must pass instead of asking for a green run. It records the main commit the run was based on and asks for a rerun when main has moved before the merge, because a change elsewhere on main can break the fix without a merge conflict. It also records what a sync still starts: a release line carries the workflows it was cut with, so pushing one runs its build there, and a tag cut before the guard runs tags.yaml unguarded, which is why tags are never synced. Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io> Assisted-by: LLM |
||
|
|
d0c0134eb8 |
docs(operations): describe the audit trail of credential issuance
Attribution of a mint or a revoke comes from the kube-apiserver audit log, which records the caller and the subresource but never the body of a request it proxies to an aggregated API, so the password shown once cannot land in it. A distribution that ships no audit policy records nothing and loses attribution silently, so the page gives a policy for it, says where fluent-bit expects the log, how to find an issuance in VictoriaLogs, and how to ship the log to a SIEM. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> Signed-off-by: Andrei Kvapil <kvapss@gmail.com> |
||
|
|
16da53637e |
feat(kubernetes): give each new cluster an etcd of its own
A tenant Kubernetes cluster could only start once an ancestor Tenant had an etcd module turned on, which nobody creating a cluster may do, and every cluster below that tenant then shared one etcd, one CA and one disk. Anything that orders clusters on a tenant's behalf had to flip the tenant's etcd on first. A new cluster now renders its own EtcdCluster and DataStore, from the cozy-lib shapes the etcd chart uses, and is created and deleted with them. The awaiting-etcd state goes, since a datastore always exists. An existing cluster stays on the DataStore its live KamajiControlPlane names, and renders what it rendered before. Changing that name starts a Kamaji datastore migration, which freezes the tenant's writes and leaves every worker kubelet needing a restart, so no upgrade may do it. _namespace.etcd cannot decide this: tenant-root publishes one to every tenant whether or not an etcd runs behind it. On uninstall, Kamaji's datastore finalizer drops the tenant's role, prefix and user from an etcd this release deletes next, and it never completes while that etcd is down. The pre-delete hook therefore removes it from a TenantControlPlane on the cluster's own DataStore that outlives the wait, and deletes the etcd's PKI, which cert-manager issues without an owner. If the finalizer stays on, or the TenantControlPlane cannot be read, the hook fails before the PKI goes, so the uninstall is retried with the etcd still in place. A TenantControlPlane on a shared DataStore is left to Kamaji as before. A Cilium deny policy keeps the rest of the tenant namespace, ancestor tenants and off-cluster sources off the etcd ports; the Kubernetes backup strategy's dump Job carries the label it admits. The tenant etcd's scrape now selects its own members by instance, because every member etcd-operator runs carries app.kubernetes.io/name: etcd. The platform waits for etcd-operator before offering the application. The defrag job both charts share pulls its image through the configured registry, pinned by digest to the multi-architecture index, so a mirrored installation does not depend on ghcr.io for it. Tested with helm-unittest on both the own and the shared branch, the pre-delete hook's bats suite run against a stub kubectl for both, and a render of an existing cluster that matches main byte for byte. The guest e2e runs the defrag CronJob once, and probes the etcd client port from a labelled Pod, an unlabelled one and one in tenant-root. Co-authored-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com> Assisted-by: LLM Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com> Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
5daa04ea6e |
feat(networking): cozyplane eBPF CNI + cozyplane-kpr networking variant (drops Cilium) (#3149)
## What this PR does Adds an **opt-in** `bundles.system.networkingVariant: "cozyplane"` for the `isp-full` (Talos) bundle: it replaces kube-ovn, Cilium and kube-proxy with the [cozyplane](https://github.com/lllamnyp/cozyplane) eBPF CNI, its aggregated `sdn.cozystack.io` API server, and the `cozyplane-kpr` socket-LB kube-proxy replacement. The default `kubeovn-cilium` path renders identically to main; the selector is refused outright on every other bundle variant (slim variants included), where it would half-apply. Components: three wrapper charts around cozyplane's upstream charts — the CNI (`packages/system/cozyplane`), the kube-proxy replacement (`cozyplane-kpr`) and the aggregated apiserver with its etcd-operator-managed, PVC-backed etcd (`cozyplane-apiserver`) — plus the Cilium policy CRDs shipped inert so stock charts install (`cozyplane-cilium-crds`), a `cozystackAPI.serveSDN` toggle in cozystack-api, and the platform wiring. The wiring threads the platform's `networking.podCIDR`/`serviceCIDR` (and `clusterDNS`, the service network's address plus 10 when unset) into the cozyplane component, drops the packages that assume the replaced stack (kubeovn-webhook/-plunger, multus, securitygroup-controller, the virtualprivatecloud app), refuses the default `cilium` gateway class and `networking.encryption.enabled` on the variant, and turns off sdn serving in cozystack-api. Bootstrap ordering: the CNI installs first with the kube API as its only dependency and ships only the LOCAL group's CRDs (`local.sdn.cozystack.io`, underlay IPAM); the tenant kinds (VPC, Port, SecurityGroup, …) have **no CRDs** and are served only by the aggregated apiserver, which installs later behind cert-manager, etcd-operator and storage. Until it lands, `sdn.cozystack.io` is simply not served; there is no takeover. On Talos the agent and kpr bootstrap against KubePrism, since with no kube-proxy the `kubernetes.default` ClusterIP is unserved until kpr itself runs. Each cozyplane package follows the umbrella pattern: the upstream chart is vendored verbatim under `charts/<name>` by `make update` from a ref pinned in the wrapper's Makefile, and everything Cozystack-specific lives in the wrapper — the Talos overlays, the apiserver's etcd storage class and replica count, and two ClusterRoles that carry cozyplane's own tenant roles into the `cozy:tenant` tiers by aggregation, so the list of tenant kinds stays upstream's to maintain. Image pins are the digests upstream pins for that ref, with multi-arch legs verified there. The wrappers carry helm-unittest suites pinning the platform contract, the egress args the platform threads included, and the platform suite covers the variant's package set, the guards and the CIDR threading. The variant is experimental: it has no e2e lane yet and is not for production clusters, which the operator-facing values comment says. **CiliumNetworkPolicy objects apply but are not enforced on this variant** — tenant network isolation on the default network, the Cilium host firewall and the platform components' own Cilium policies (several of them `ingressDeny` rules native NetworkPolicy cannot express) are not in effect, as stated in the values comment, the networking source and the threat model; rebuilding them on what cozyplane does enforce (native NetworkPolicy, its operator-only HostFirewall) is a follow-up. cozystack-api's SecurityGroup (a restricted interface over CiliumNetworkPolicy) is not served on the variant; cozyplane's own SecurityGroup is the first-class tenant instrument for traffic inside and across VPCs. The tenant-facing VPC application lands in #4508, stacked on this PR. ### Screenshots Not a UI change. ### Downstream repositories The trigger map fires for cozystack/website (a new platform variant and new `platform.values` keys); cozystack/website#815 documents both. It arguably fires for terraform-provider-cozystack too (the SecurityGroup spec differs per variant); that box is left unticked so a human decides. - [ ] No downstream repository is affected by this change - [x] [cozystack/website](https://github.com/cozystack/website) - follow-up: cozystack/website#815 - [ ] [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 ```release-note feat(platform): opt-in networkingVariant "cozyplane" for the Talos bundle — replaces kube-ovn, Cilium and kube-proxy with the cozyplane eBPF CNI, its aggregated sdn.cozystack.io API server and a socket-LB kube-proxy replacement; CiliumNetworkPolicy objects are not enforced on this variant ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Added an opt-in Cozyplane networking variant with cluster DNS configuration, CNI, and service routing. * Added a Cozyplane API service for tenant networking resources, with tenant edit and view permissions. * Added control over whether the existing SDN API is served. * Gateway configurations using an unavailable class are now rejected with guidance. * **Important Limitations** * Cozyplane does not enforce existing Cilium network policies or platform Cilium rules. Tenant traffic isolation may require native NetworkPolicies; some platform rules require operator-managed HostFirewall policies. * Cozyplane networking does not support encryption or the default Cilium Gateway class, and requires pod and service CIDRs. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
10bd82cc58 |
docs(release): make changelog check B find changed image build files (#4952)
## What this PR does Check B of the changelog pre-publish verification in `docs/release.md` lists changed image build files with `git diff --name-only $PREV..$NEW -- 'images/*/Dockerfile'`. That pathspec never matches anything: there is no `images/` directory at the repository root, since image build files live under `packages/*/*/images/`. The check therefore printed nothing on every release and passed without looking at anything. It also skipped `Containerfile`, which first-party images such as `otelcol-tracing` and the dashboard `console` use. This PR changes the pathspec to `'*Dockerfile' '*Containerfile'`, which matches both file names at any depth. I checked it in a scratch repository: the old pathspec returned no files for a changed Dockerfile and Containerfile, and the new one returned both. Every Dockerfile and Containerfile currently in the repository lives under `packages/*/*/images/`, so the broader pathspec does not pick up files from vendored charts. Closes #4892 ### Screenshots N/A: documentation-only change, no UI impact. ### Downstream repositories - [x] 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 ```release-note docs(release): make changelog verification check B find changed image build files by matching Dockerfile and Containerfile at any depth ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Chores** * Pre-publish verification now checks for changes to Dockerfiles and Containerfiles throughout the release range, including files outside image-specific directories. This expands the container build-file changes covered by release checks; previously, verification was limited to Dockerfiles in image directories. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
cfb5119c0b |
feat(build): attach a provenance attestation beside the SBOM (#5043)
## What this PR does Follow-up to #4997 (merged as |
||
|
|
d15fb0fc35 |
docs(platform): mark the cozyplane variant experimental
Once merged the variant is one value away, and the values comment is what an operator reads before choosing it, so it now says the variant has no e2e coverage and is not for production. The threat model's note also lists what the variant leaves unenforced beyond tenant isolation: the platform components' own Cilium policies, several of them ingressDeny rules that native NetworkPolicy cannot express. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
f0d1a802f0 |
feat(platform): cozyplane networking variant
An opt-in bundles.system.networkingVariant for the isp-full (Talos) bundle: "cozyplane" swaps kube-ovn, Cilium and kube-proxy for the cozyplane eBPF CNI, its aggregated sdn.cozystack.io apiserver and the cozyplane-kpr socket-LB proxy. The default "kubeovn-cilium" renders identically to main. The variant drops the packages that assume the replaced stack — kubeovn-webhook/-plunger, multus, securitygroup-controller, the virtualprivatecloud app — and turns off sdn aggregation in cozystack-api, since cozyplane owns the group. The selector is validated before any branch is taken: accepted off isp-full it would half-apply, stripping the kube-ovn control plane and the sdn APIService while the Cilium networking package keeps running; and the default "cilium" gateway class is refused on cozyplane, where nothing serves it. The platform's networking.podCIDR and serviceCIDR (and clusterDNS, derived from the service CIDR when not set explicitly) are threaded into the cozyplane component, so the egress masquerade and the VPC gateways' internal denies match the cluster rather than the chart defaults. CiliumNetworkPolicy objects apply but are not enforced on this variant; the values comment, the networking source and the threat model say so, and the threat model records the SecurityGroup split: cozyplane's is a first-class tenant instrument for traffic inside and across VPCs, not cozystack-api's projection onto CiliumNetworkPolicy. Tenant isolation rebuilt on native NetworkPolicy + HostFirewall is a follow-up. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
d88322197f |
chore(deps): roll up Renovate updates and raise dependencies to latest stable (#4869)
## What this PR does One PR instead of separate Renovate PRs. Go modules, Dockerfile base images and GitHub Actions move to newer versions that build and pass the tests. Where a newer version is known to break something, it stays behind, and `.github/renovate.json` holds it with the reason in the rule description. The tests come first, in their own commits: - `make go-unit-tests` runs the Go tests under `pkg/` and `cmd/`, except the backport-batch suite, which keeps its own target. The apiserver serializer and fuzz tests, the generated OpenAPI and applyconfiguration suites, the apis packages and the controller, operator and observability-proxy commands did not run in CI before. - The apps API surface that apiserver libraries shape is pinned: server-side apply, content negotiation, Table output on watch, the served OpenAPI v2 and v3 documents, and building the server without etcd. Two answers look wrong and are pinned as they are today: applies from different field managers never conflict (#4857), and protobuf is refused with 406 even when the client offers JSON as a fallback (#5297). - New tests cover the kubeovn webhook patch, the token proxy session cookie and the mount-utils behaviour the kubevirt CSI node service relies on. - `hack/image-smoke.bats` checks the tools the CSI, LINSTOR, multus, Harbor and redis-backup images take from their base images or build stages, and that the kubevirt CSI node plugin and its sidecars need no more than x86-64-v2. Each PR build job runs it against the images it pushed; forks and the unit lane run no container. The tests found two bugs: - The kubeovn webhook dereferenced a nil pointer on an admission review without a request, so the caller got a dropped connection instead of a 400. - The token proxy cookie refresh never fired: securecookie decodes the session times as int64 and the refresh looked for float64, so the `--cookie-refresh=1h` the chart sets did nothing. A refreshed cookie keeps the token's expiry. A session too large to encode now shows an error at sign-in and leaves the current cookie alone on refresh. What moved: - GitHub Actions to their Node 24 majors. The flux action stays on the tag of the Flux CLI it installs. The release job's checkout no longer persists credentials, so its staging branch push uses the App token. - Go 1.27.2 for the toolchain and builders. Builds that reproduce an upstream release keep the Go upstream uses: Harbor, cilium-operator, SeaweedFS and the chainsaw stage of the e2e sandbox. - controller-runtime v0.25.2, gateway-api v1.6.3 on the minor of the installed v1.6.1 CRDs, cel-go v0.30.0, grpc v1.84.0, etcd v3.7.2, cert-manager v1.21.2, kubevirt csi-driver f10ae94 on Kubernetes v0.37.1. - Node 24 for the dashboard console. Held back, each with its reason in the Renovate rule: - cel-go stays below v0.31: the old repository has no tags past v0.30.0, and v0.32 moves to cel.dev/cel-go, which k8s.io/apiserver does not import. - kube-openapi stays on the commit its dependencies require, and structured-merge-diff stays on v6, because k8s.io/apimachinery v0.37 does not compile against v7. - The Flux API modules stay on the Flux v2.8 line the platform installs. - gomodules.xyz/jsonpatch stays on v2, which controller-runtime's admission.Patched takes. - jwx stays on v3: v4 removes jwk.Cache, which the token proxy's JWKS refresh is built on. - kubevirt.io/api and the CDI API stay where upstream csi-driver builds. - The kubevirt CSI driver image stays on AlmaLinux 9, because AlmaLinux 10 builds its amd64 userland for x86-64-v3. - shadowbox stays on node 18, which outline-server declares in its engines. - The e2e sandbox stays on Ubuntu 24.04. 26.04 ships uutils coreutils, whose `date` costs about 4x per call, and the test harness forks it per traced line, which adds about ten minutes to the install phase. - clastix/kubectl stays on v1.32 for the cleanup hooks, within kubectl's one-minor skew. The cert-manager Go module (v1.21.2) is one minor ahead of the installed chart (v1.20.2). The Certificate objects the gateway controller writes serialize the same either way. `api/apps/v1alpha1` now requires Go 1.27.2, which applies to every module that imports the published types. The Linux run with Go 1.27.2 was done before the rebase onto current main, and the rebased head has not been through it yet. There the five modules built, vetted, tested and tidied cleanly, and the repository unit, controller and envtest lane passed. `go test -race` passed in four modules. In the root module it failed only on a pre-existing data race in the workload monitor tests (#5296), which main has too. The image smoke checks run in this PR's CI. ### Screenshots No UI change. ### Downstream repositories `api/apps/v1alpha1` moves to `go 1.27.2`, and cozystack/terraform-provider-cozystack imports it, so that repository is affected but needs no action. Its box stays empty for that reason, and so does the "not affected" one. - [ ] 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: none needed, because its Renovate raises the go directive together with the pin bump and its CI takes Go from `go.mod`; the only effect is that the provider's minimum Go becomes 1.27.2. - [ ] [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 ```release-note chore(deps): move the toolchain and builder images to Go 1.27.2 and raise Go modules, base images and GitHub Actions to newer working releases; the dashboard token proxy now refreshes its session cookie, and the kube-ovn webhook rejects an admission review without a request instead of dropping the connection. ``` |
||
|
|
a3e60ec372 |
feat(kafka)!: run on Strimzi 1.2.0 and Kafka 4.x (#4900)
<!-- 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 - 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 This upgrades the Kafka operator to Strimzi 1.2.0. Kafka 4.3 is the application default, with 4.2 also available. Upgrades must pass through Cozystack v1.7 and finish the ZooKeeper-to-KRaft migration first. The upgrade now stops while any Kafka lacks KRaft evidence. Every Kafka must report a nonempty `kafkaMetadataVersion` and the `KRaft` metadata state. The API conversion deletes that state, so without it a Kafka needs `Ready=True` or the `cozystack.io/kraft-verified` annotation, which migration 61 writes on every Kafka it accepts before it stops the operators. Any other explicit state blocks, and the error gives the reason for each Kafka. On every variant, the platform chart refuses to switch package sources while Strimzi still serves `v1beta2` and a Kafka fails that check. On variants without the migration hook, it also refuses while any Strimzi CRD still stores `v1beta2`, so `/migrations/61` has to run first. Migration 61 checks the same evidence again, including on repeat runs, and blocks unfinished broker-pool drains. A manual change that bypasses the managed package source is outside this check. Existing Kafka 3.x applications move to v4.3. Kafka 4 no longer accepts clients older than Kafka 2.1. Kafka 4 also rejects the topic settings `message.format.version`, `message.downconversion.enable` and `message.timestamp.difference.max.ms`, and a `segment.bytes` below 1 MiB (1048576), which Kafka 3.x accepted down to 14 bytes. A Kafka 4 broker whose log holds such a topic does not start. The chart now refuses to render a topic that sets any of these. The platform upgrade refuses to start while a Kafka application sets one, and migration 61 also checks KafkaTopic resources, so topics created outside the chart are caught too. A topic created through the Kafka admin API without a KafkaTopic is not visible to these checks. Restoring a topic-metadata backup taken on Kafka 3.x skips the three removed settings and raises a smaller `segment.bytes` to 1 MiB, with a warning for each. In-place downgrades are unsupported. The default 10-minute Helm timeout can leave a long broker roll Failed until its retry succeeds. The migration does not run automatically on every platform variant. Only the `isp-*` variants run it automatically. On other variants, run `/migrations/61` from the matching migrations image before upgrading, as the Kafka README describes. This includes clusters that run no Kafka but have the kafka-operator package, from the `paas` bundle or `bundles.enabledPackages`. Their Strimzi CRDs still store `v1beta2` even with no objects. The migration converts Strimzi resources and stored Helm references to `v1`. It stamps platform version 62. Running it manually also skips earlier migrations on a later move to an `isp-*` variant. Before it stops the operators, migration 61 refuses objects that the Strimzi 0.51 conversion tool would reject and names each one, for example a Kafka with `.spec.kafka.resources` or with OAuth, Keycloak or OPA settings. A failed conversion can leave the old operators stopped until the migration succeeds and the operator release upgrades. The failed conversion Job stays for diagnosis, but its ClusterRole, binding and ServiceAccount are removed. A Job that is still running when the wait times out keeps them, because the retry waits for it. Known limitations. Migration 61 converts with the old operator stopped, while Strimzi's conversion guide expects a running operator of 0.49 or later. I stop it because 0.45 keeps writing the Kafka status through `v1beta2`, but I have not checked this on a live cluster. Objects Strimzi created keep `ownerReferences` to `v1beta2` until Strimzi 1.2 reconciles them. Deleting a Kafka before that can leave dependents behind, and the chart's pre-delete hook covers only StrimziPodSets. The conversion image is pulled from quay.io by digest with no values override, so an air-gapped cluster has to mirror it under the same name. The full offline unit run passed on Linux on `1171d63adfafb45be34214fb9a0f565723e255fd`: 2,576 cases, no failures, errors or skipped tests. Later changes were checked on `69c704499fa4` with the Bats tests for migration 61, the migration runner, the Kafka hooks and the Kafka backup scripts (102), the platform Helm suite (310 tests) and the Kafka Helm suite (91 tests). After the rebase onto `main` at `5a5d5cd3d85f`, `a48a2f259947` passes the same Bats tests (115) and the platform and Kafka Helm suites (326 and 103 tests). It also passes the new check against added `documentIndex` selectors. I have not validated this revision on a live cluster. Closes #4365 ### 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. --> Not a UI change. ### 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 - [x] [cozystack/website](https://github.com/cozystack/website) - follow-up: https://github.com/cozystack/website/issues/805 - [ ] [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: The Terraform provider does not model the Kafka `version` field. The website issue covers the upgrade notes the `default` variant needs. ### 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 feat(kafka)!: upgrade to Strimzi 1.2.0 and Kafka 4.3 by default, with Kafka 4.2 also available. Platform migration 61 converts Strimzi resources to v1 and moves Kafka 3.x applications to v4.3. Every Kafka must have confirmed KRaft state before the upgrade, including on repeat runs. Upgrade through Cozystack v1.7 first. Kafka 4 drops clients older than Kafka 2.1 and the message.format.version, message.downconversion.enable and message.timestamp.difference.max.ms topic settings, and requires segment.bytes of at least 1 MiB; the chart and the upgrade refuse a topic that breaks either rule, and a topic-metadata backup taken on Kafka 3.x restores without the removed settings and with segment.bytes raised to 1 MiB. In-place downgrades are unsupported. ``` |
||
|
|
dbd6acba95 |
Merge branch 'main' into docs/release-check-b-image-pathspec
Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
5a92f1fc4e |
Merge branch 'main' into feat/build-provenance-attestation
Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
3b65cebea3 |
feat(kafka)!: run on the Strimzi v1 API and Kafka 4.x
Strimzi 1.2 serves only the v1 API and runs Kafka 4.2 and 4.3. The node-pool hook no longer drives the ZooKeeper to KRaft migration or the drain that freed the shared "kafka" pool name: Strimzi 1.x has no ZooKeeper support, and the platform migration refuses to upgrade while a ZooKeeper cluster is left. A cluster migrated earlier keeps its "kafka" broker pool. Without the drain the hook takes seconds, so the seven-hour install timeout goes too. Kafka 4 rejects the topic configs it removed and a segment.bytes below 1 MiB, which Kafka 3.x accepted. A KafkaTopic that sets one stays NotReady while the release reports Ready, so the chart refuses to render such a topic. It reads segment.bytes the way Kafka does: trimmed, with an optional sign, leading zeros decimal. BREAKING CHANGE: the Kafka application accepts version v4.3 (default) and v4.2; v3.8 and v3.9 are gone, and the platform migration moves existing applications to v4.3. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
c55c3928cb |
docs(agents): reword the section-banner comment rule
The rule is meant to reject a comment that only names the code below it and adds nothing, such as a heading over a ClusterRole whose kind and name already say what it is. "Banners a section" reads instead as an objection to decoration, so it gets applied to the shape: `# == view role ==` is rejected while `# view role`, which says exactly as little, passes, and a heading that does orient the reader in a long file can be rejected for its `==`. Both places the rule appears, the in-code comments blocker and the list of machine-authorship tells, now describe the content that is wrong rather than its formatting. What the rules enforce is unchanged. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
9cd2d3ac0f |
test(ci): smoke-test the tools that built images take from their base
The CSI, LINSTOR, multus, Harbor and redis-backup images call tools at runtime that their base images or build stages install: mkfs and mount.nfs, drbd, lvm and zfs, the CNI plugins, nginx and trivy under a fixed uid, redis 8. A base or tool bump that drops one still builds, and only fails once the image runs in a cluster. The kubevirt CSI node plugin and its sidecars run inside tenant VMs on whatever vCPU they are given, so their filesystem tools, libc and Go entrypoints must not require more than x86-64-v2. C objects declare that level in a GNU property note and Go binaries in their GOAMD64 build setting; a file that records neither fails the check. Each PR build job runs the checks against the images it pushed, found by diffing the tree's image references before and after the build. Fork PRs are skipped because their images are not in a registry yet, and the unit lane runs no container. A change to kubevirt-csi-node alone, where the node sidecar tags live, now runs the kubevirt CSI build too, and the check fails when either sidecar is missing or the reference file cannot be read. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
854a3f40e4 |
fix(ci): limit the drifted-file bare-ref overlay to first-party images
Main can bump a third-party image together with its config, so a PR behind it must keep the committed pair rather than take main's image alone. Only ghcr.io/cozystack/cozystack refs, matched against an artifact line for the same first-party image, are replaced now. State the trade-off for first-party refs that do exist, and name the packages that took main's images in their own annotation. Assisted-by: LLM Signed-off-by: Maxim Belyy <maximbel2003@gmail.com> |
||
|
|
54b76fcdf1 |
docs(agents): say how PR CI stamps a bare ref in a drifted file
Assisted-by: LLM Signed-off-by: Maxim Belyy <maximbel2003@gmail.com> |
||
|
|
aa1448e20b |
docs(agents): add development principles to AGENTS.md and agent docs (#4859)
<!-- 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 - 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 <!-- Link the issues this PR addresses. For a complete fix targeting the default branch, use Closes #N (Closes owner/repository#N for another repository). Otherwise use a non-closing reference; release-branch PRs need manual issue linking and closure when appropriate. --> The same mistakes kept coming back in reviews of agent-written changes. A failure was blamed on whatever changed just before it, with no mechanism behind the claim. Commands ran against the current kubectl context while the work moved between the management cluster and tenant clusters. Prose edits got invented failing tests, and behavior changes landed without any. References and review feedback were the other source. Review corrections were stacked as new commits instead of rewriting the change. Closing keywords went into commits for partial fixes, while the PR itself did not link the issue. Feedback in review bodies and conversation comments was missed because only inline threads were read. A rerun of the fork E2E workflow was taken as proof that an unmerged edit to that workflow works. I wrote these down as rules, so a review does not have to teach the same thing again. They go into `AGENTS.md` and `docs/agents/`, which agents and people both read, and the PR template now asks to link the issue a PR addresses. This also fixes my earlier advice on negated Bats assertions: such an assertion can pass silently, but `bats` does fail it when it is the last command of the test. ### 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 The ccp package commit template and the community contributor guide restate parts of these rules. Both follow-ups are open issues, to be done once this lands. <!-- 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: - [x] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: [issue #29](https://github.com/cozystack/ccp/issues/29) - [ ] [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: - [x] [cozystack/community](https://github.com/cozystack/community) - follow-up: [issue #125](https://github.com/cozystack/community/issues/125) ### 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(agents): write recurring review findings down as agent rules covering root-cause evidence, explicit cluster targets, tests for behavior changes, commit and issue references, and review feedback outside inline threads. ``` |
||
|
|
a427ceb582 |
ci: run only the backport-batch tests for a backport-batch change (#5287)
## What this PR does Stacked on #5288, merge that one first. PR touching only `cmd/backport-batch` was treated as code change, so it rebuilt every image, installed platform in e2e sandbox and ran full chainsaw suite plus whole unit lane. #5283 (one-line test fix) spent 3.5 hours in that e2e and hit job timeout. And backport-batch go tests were running on every code PR, whatever it touched. - plan job `code` output is now false when every changed path is under `docs/`, `cmd/backport-batch/` or `cmd/api-gate/` (CI-only tools, no image builds them). Builds, finalize and e2e are skipped and `E2E Tests` posted green, same as for docs-only PRs. `e2e-fork.yaml` skips on same prefixes, `hack/gate-concurrency-contract.bats` fails if two lists diverge. - `hack/build-matrix.sh` and `hack/select-e2e.sh` don't escalate to full rebuild or full suite because of these two dirs, so mixed PR is scoped by its other paths. Other `cmd/` dirs still escalate. - `test-backport-batch` removed from `make unit-tests`. Checks job runs it only when diff touches path from `cmd/backport-batch/test-inputs.txt` (tool itself, in-repo packages it imports, docs pages its tests read, `go.mod`, `go.sum`). `TestInputsListed` compares this list with `go list -deps -test` and fails when import is missing there. - new `docs` output keeps bats lane for docs changes and drops it for tool-only ones. - includes test fix from #5283 (pin run attempt in `TestReportDedupAndTrust`), this PR replaces it. ### Screenshots ### Downstream repositories - [x] 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 ```release-note ci: changes only in docs/, cmd/backport-batch/ or cmd/api-gate/ don't build images and don't run e2e anymore, backport-batch tests run only when their inputs change. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * CI now skips builds, E2E tests, and full-pipeline checks for changes limited to documentation and designated CI-only tools. * Backport-batch tests run when relevant files change, without being included in the general unit-test target. * Changes to other command-line tools continue to trigger the appropriate build and E2E checks. * **Documentation** * Clarified how documentation, dashboard, and backport-batch changes affect test selection. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
aa36d3fad6 |
fix(kubernetes)!: remove the talos block and other leftovers of the worker pool split (#5191)
## What this PR does Cleanup after the Kubernetes app was split into `Kubernetes` (control plane and addons) and `KubernetesNodes` (one release per worker pool): what the split left behind in values, docs, templates and tests. ### Kubernetes The `Kubernetes` application has no `talos` field any more. Worker pools are `KubernetesNodes` resources and take their Talos release, image, installer and registry mirrors from their own `talos` and `osImage`, so the cluster's copies did nothing. The last one, `talos.version`, fed a duplicate of the Talos to Kubernetes support-matrix check. The pool chart already runs that check against the Talos release each pool actually boots, including one picked through an `osImage` override; the cluster's copy compared the Kubernetes version against a release no node runs. A stored spec that still carries `talos.*` keeps rendering, because the values schema does not close the object and the API does not validate `spec` against it, and a unit test pins that. The pool's check now has render coverage. Its own suite pins the pairings it must accept, and a bats test renders the refusals through `talos.version`, `osImage.factory.version` and `osImage.builtin.version` with schema validation skipped, since the schema offers no Kubernetes version the matrix refuses. I fixed the README and field descriptions that described behavior the chart no longer has, or never had: a dedicated etcd cluster, a `blockSize.matchVolume` setting that does not exist, a default `md0` pool, the host default, the substrate mismatch behavior, and rollout phase names. The README's Breaking Changes section becomes a pointer to the per-release upgrade notes on cozystack.io. Unused helpers and stale comments are removed; the chart renders the same bytes. ### KubernetesNodes Five field descriptions and the `talos` block told users to keep them in sync with parent fields that do not exist. NOTES warned about colliding with a parent-managed `md0` pool, although the parent renders no pools and `md0` is the normal name of a pool. The installer image was credited to an upgrade Job that never runs one. The values descriptions, README intro and NOTES now say what the chart renders today, including which fields have no effect on `substrate: proxmox`: `storageClass`, `diskSize`, `instanceType`, `talos.imageFactoryURL` (beyond its format check) and `talos.imageFactoryCA`. The render error for a pool whose MachineDeployment belongs to another release told users to remove the pool from the parent's `nodeGroups`, which cannot clear the conflict. It now names a remedy that works. Split-era history is gone from Helm and test comments, along with two `storageClass` fallbacks that can only return the value they fall back from, a constant variable, and two `.helmignore` rules that match nothing. The tenant pod and service CIDRs are literals in both charts, and nothing checked that they agree. A new bats test renders both charts and fails when they differ. No rendered manifest of the pool chart changes. I rendered it for the snapshot values, GPU, kubelet-override, factory/CA, storageClass variants and three Proxmox variants on main and on every commit, and the output is byte-identical. The snapshot and TalosConfigTemplate hash tests pass unchanged, so no worker rolls. YAML comments inside the hashed machine config and machine template are left as they are for that reason. ### The rule `docs/agents/overview.md` gains a rule so this does not come back with the next change: app READMEs and field descriptions describe current behavior, a change users must act on goes to the website's upgrade page, and a description does not ask the reader to keep it in sync with another chart. ```release-note [kubernetes] The Kubernetes application no longer has a `talos` field. Talos settings for workers, and the Talos to Kubernetes compatibility check, live on each KubernetesNodes pool. Existing clusters that still store `talos` values keep working; the values are ignored. KubernetesNodes field descriptions, README and install notes now describe the worker pool as it works today, including which fields have no effect on Proxmox pools. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Configuration** * Worker OS image, installer, and registry-mirror settings are configured per worker pool; these settings are no longer available at the cluster level. * Kubernetes and Talos version compatibility is checked for each worker pool. A worker Kubernetes version cannot be ahead of its parent cluster. * Worker pools support KubeVirt and Proxmox, with pool-specific sizing and disk settings. * Rendering is refused when a pool uses a different substrate from its cluster or conflicts with an existing worker pool owned by another release. * The default cluster hostname now includes the `kubernetes-` prefix. * Existing cluster configurations that still include Talos settings receive a warning; those settings are no longer used. * **Documentation** * Updated guidance for cluster and worker-pool settings, storage, upgrades, and version compatibility. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
8d29097e34 |
Merge branch 'main' into ci/skip-tooling-paths
Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
868b97dbe6 |
fix(kubevirt): let tenant admins upload a VMDisk image with virtctl (#5114)
## What this PR does A VMDisk created with `source: upload` waits in `UploadReady` for an image, but no tenant role can fill it. `virtctl image-upload` reads the disk PVC and CDI's PVC Prime and requests an upload token, and the tenant roles grant neither `get` on persistentvolumeclaims nor `create` on `upload.cdi.kubevirt.io/uploadtokenrequests`, so the command stops on a forbidden PVC read. `cozy:tenant:admin:base` now grants both. Tenant admins and super-admins get them in their own namespaces through the existing RoleBindings, the use and view tiers do not. Reading the DataVolume is already granted for the disk's own name by the vm-disk chart's dashboard role, so no DataVolume rule is added. The vm-disk notes print the command with `--no-create`, because the chart has already created the DataVolume, and the security self-assessment and threat model list the new grants. This is the RBAC part of #3847, split out so tenants can upload while the console upload panel and the upload proxy certificate stay in review there. The rules, their tests, the notes change and the docs lines are from @myasnikovdaniil, who is co-author on the commit. Checked live on a cluster with KubeVirt v1.8.4 and CDI v1.66.1, with virtctl v1.8.4 impersonating a user in the `<tenant>-admin` group. - With the stock roles `virtctl image-upload dv vm-disk-<name> --no-create` fails with `persistentvolumeclaims "vm-disk-<name>" is forbidden`. - With exactly these two rules added as a temporary Role, the same command reads `prime-<uid>`, uploads a 16 MiB image and the DataVolume reaches `Succeeded`. `get` on the DataVolume came from the vm-disk dashboard role. - The upload went through a port-forward to `cdi-uploadproxy` with `--insecure`. A trusted certificate on the published proxy is the other half of #3847 and is not changed here. Unit tests with `helm unittest` 1.1.2, the version CI pins. `packages/system/cozystack-basics` passes 72 of 72, against 66 on main, and `packages/apps/vm-disk` 117 of 117, against 116. Removing the upload token rule fails one case, and dropping `--no-create` from the notes fails one case. Fixes #3759 ### Screenshots Not a UI change. ### Downstream repositories Walked the trigger map in `docs/agents/contributing.md` against the diff. Two tenant RBAC rules, their tests, the vm-disk notes and two docs files. No values key, schema, default, README or package change, so no trigger map entry applies. - [x] 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 ```release-note fix(kubevirt): tenant admins can upload an image into a VMDisk created with source upload using virtctl image-upload. The tenant admin and super-admin roles get get on persistentvolumeclaims and create on upload.cdi.kubevirt.io/uploadtokenrequests, and the vm-disk notes print the command with --no-create. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Tenant administrators can now upload images into existing VM disks. * **Improvements** * The displayed upload command now explicitly targets the release namespace and avoids creating a new disk. * **Documentation** * Security guidance now clarifies the access needed for uploads and notes that persistent-volume permissions remain limited by namespace scope. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
f3bf92acc1 |
docs: add changelog for v1.7.1
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com> |
||
|
|
95364b8ba0 |
Merge branch 'main' into fix/tenant-cdi-upload-rbac
Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
48eae9ad36 |
ci: run only the backport-batch tests for a backport-batch change
A pull request that changed only cmd/backport-batch built every image, installed the platform for e2e and ran the whole unit lane, so a one-line test fix waited hours on suites that cannot exercise it. The backport-batch tests themselves ran on every code pull request, although only a change to the tool, to what it imports or to the pages its tests read can break them. Their inputs are listed beside the tool and checked against its import graph, because a hand-kept list that fell behind would switch the tests off without anyone noticing. Assisted-by: LLM Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com> |
||
|
|
39d134b3ef |
docs(agents): clarify E2E execution targets
Fork workflow edits are exercised only after they reach the default branch. State that boundary so a rerun is not mistaken for testing an unmerged workflow change. Point install checks at the shared readiness helper rather than duplicating its implementation in the instructions. Validation: markdownlint (MD013 excluded) and git diff --check pass. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
7475c5af5d |
docs(agents): define contribution and review requirements
Keep commit history self-contained and issue links visible on the PR. Distinguish commit-reference trailers from issue-closing references, and reserve closing keywords for complete fixes. Include review bodies, conversation and commit comments alongside inline threads without imposing the same review depth on every change. Verify feedback against current code before acting on it. Validation: markdownlint passes with MD013 excluded, and MD041 excluded for the PR template, whose existing first heading is level two. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
1e7ba63c57 |
docs(agents): define testing and authoring conventions
Require tests for behavior changes without inventing failures for prose
or unchanged upstream updates. Keep new image build filenames explicit
and preserve the existing lookup policy.
Correct the assertion guidance: Bats can fail on a final negation,
while cozytest appends a successful return. Separate numeric validation
from text coercion and account for null parent maps in Helm values.
Validation: markdownlint (MD013 excluded) and git diff --check pass.
Fixes:
|
||
|
|
a97b1ee924 |
docs(agents): keep app READMEs and field descriptions about the present
App READMEs and values.yaml descriptions drifted into release logs: a Breaking Changes section that collected entries from several releases, descriptions that explained a limit by a default that no longer exists, a roadmap phase in an API type title, and fields documented by what they replaced. The text reaches users through the dashboard, the API schema and the website, where history only misleads, and nothing told an author where the history goes instead. The rule names the place for a change users must act on, the website's per-version upgrade page announced by a "!" title, and asks a change that touches a README or a description to fix what is wrong there. Assisted-by: LLM Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com> |
||
|
|
90f0b043a6 |
fix(kubernetes)!: remove the talos block the chart no longer uses
The kubernetes chart declared a talos block (version, schematicID, imageFactoryURL, installerRepository, registryMirrors). Workers are KubernetesNodes pools and take every one of these from their own talos values, so an operator who set them on the cluster got no error and no effect. The only reader left was a copy of the Talos to Kubernetes support-matrix check, and the pool chart already runs that check itself, against the Talos release each pool actually boots, including one an osImage override selects. The cluster's copy compared the Kubernetes version against a Talos release no node runs. The block leaves the API schema, hence the "!". Stored specs that still carry it keep rendering: the values schema does not close the object and the API does not validate spec against it. A helm-unittest case pins that. Readers outside the chart moved with it. The e2e install read talos.schematicID from this chart's values.yaml in a best-effort block that only warns, so removing the field would have stopped the image cache being seeded without failing anything; it now reads the pool chart, as the proxmox template script already does. The e2e no longer writes a talos block into the Kubernetes CR, the spec test checks the pool chart for the key it emits, the release checklist diffs the pool chart's pins as well, and the catalog guard drops the two tests that compared or read the parent's block. The null-normalization Go tests used talos keys of the real Kubernetes schema as their fixtures; they use oidc.mode, the same required-with-default shape under an optional root section, and addons.cilium.valuesOverride for the free-form case. Assisted-by: LLM Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com> |
||
|
|
885752eb5a |
feat(release): announce a parked original once on the open batch
A park is a decision a maintainer has to act on: port what applies as a pull request of its own, or drop the original. Listing every park in every notify comment would make that list noise within a week, and a park nobody hears about is a fix that silently never ships. notify now names each park the open batch's record holds that is not yet marked announced, and once its comment is written marks those parks in the record with gh pr edit --body-file. It writes only while the pull request is open and its body still carries the record notify read, so a run that rewrote the body in between loses nothing; a mark that fails exits 2 and the next notify names the park once more. run carries the mark into the next record, a merged or closed carrier's too, only while the park is the same event: merge, kind, prerequisites, commits and files. A park that changed is news and is named again. With no batch open nothing is named (M2); the next batch's first notify does it. Assisted-By: LLM Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com> |
||
|
|
ce4ab1fd2c |
feat(release): park an original whose dependency never reaches its line, and hold one whose dependency is pending
On 1.6, the fix in #5071 conflicts on every run: it modifies files that the feat in #3940 added on main, and that feat never reaches the line. The fix in #5082 builds on #5071 and on code that never comes either. Trying them on each run says nothing a maintainer can act on, and a conflict reads as work to do. Edges come from the dependencies the previous commit reads. One whose prerequisite the line or the open batch carries, whatever its rule or label, that this run picked or found empty, or whose evidence is present at the branch head once earlier picks moved it, is satisfied and dropped first. A direct push, an original rules 2-4, the start, a skip label or a drop keep out, or one itself parked never comes and parks the original. A prerequisite still to come (a conflict, a deferral, a workflow wait, rule 6) holds it as deferred{needs}, the strongest kind deciding: missing, workflow, deferred, rule 6; a chain inherits. run, check and the metadata operations share one order: partial unit on the batch, a direct reason, an unpicked partial, the workflow exception, a dependency park, a wait, then the original's own state. In the scheduled mode a workflow original whose remaining never-dependencies are only tests or docs waits for a maintainer instead of parking, which is the case of the release fix in #5142. check takes the mode the open record saved, and the scheduled one with no batch open, where a closed record's workflow waits wait on nothing any more and the original is judged as the scheduled run judges it. check and the record-only operations keep a partial park the open record holds while the batch head still shows it, since only the run's picker sees it after the picks before it. Records refuse waits and parks that form cycles, point at later merges or contradict each other. notify lists a wait after what decides it, from the record alone. backport/include lifts neither park nor wait. Assisted-By: LLM Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com> |
||
|
|
6696953d26 |
fix(release): set aside the note of a pick that differs from its original
A release note describes what the original does on main. A pick git had to fit to a line that already had part of the change, a resolution, or a unit whose first commit came out empty no longer does the same thing, yet its note went into the batch's release-note block with the rest, and the changelog took it from there. A unit now counts as changed when a surviving pick's patch-id differs from its source or the unit's net patch-id differs from the original merge's; the latter catches an empty first commit, which leaves no pick to compare. A changed original's note moves under "Check these notes", fenced and neutralised as before, with a range-diff per differing pick and the two diffs to compare. The range-diff uses a creation factor of 999 because the default leaves a pick that lost most of its change, #5088's test-only pick for one, unpaired. The record and the report list such originals as changed. Assisted-By: LLM Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com> |
||
|
|
c617a99453 |
fix(release): withhold or refuse a unit that does only part of its original on the line
A clean cherry-pick says nothing about whether the original landed whole: git deletes a file the line never had without a conflict and leaves a file the line lacks untouched. #5088 reached the 1.6 batch that way, carrying only its test while the two deletions that are the fix had no effect. Every M and D path of an original is now judged at its counterpart on the line, followed through renames on main, on the line, or both. A modified path missing before and after, or left unchanged when the line holds neither the original's blob nor a clean git merge-file result, is omitted; a deleted path absent before is omitted. Content merge-file refuses, mode changes and skipped rename detection become diagnostics and never count as omissions; I/O failures stop the command. The same guard runs in four places: the picker, which resets a partial pick and parks the original; a check-time pass over every unit on the open batch at its own first parent, whatever its label, which fails check --cut and verify; the same pass over every unpicked original's clean net merge, which parks a partial one with no record needed; and fold. contained accepts the renamed path, so a fix of a renamed file passes verify and fold. The unit mapping also closes the found() gap: a merged original whose first pick came out empty is on the batch, not missing. The record moves to version 3 with parked entries and partial units, and reports to format 2 with typed parked entries; format 1 reports still read. Assisted-By: LLM Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com> |
||
|
|
2c1cb2f41c |
feat(release): drop an original from one line with run --drop
A fix the rules take for every line can still be wrong for one of them, typically because it builds on code that line does not have. The only ways to keep it out were backport/skip, which keeps it off every line, and --defer, which holds it out of one batch: the next batch tried it again, and a conflict that would never resolve came back every run. run --drop N --reason R records a drop in the line's record, bound to the original's merge commit on main, and every later record carries it, a new batch's included. What the open batch carries of a dropped original comes off it the way --defer takes one off; any other drop changes only the record, so a batch on a line that moved since stays where it is. --undrop withdraws one. Both need an open batch, as every write to the record does. A drop comes after the rules and the carries: backport/skip, rules 2 to 4 or the line itself decide first and the drop stays on record, and backport/include does not lift it. check notes a dropped original, the body lists it, fold refuses it, and a record whose drop names another original's merge stops every command. Each report keeps the record's drops with the merge commit each is bound to and its reason, held on read to the same rules, so an earlier report still says why after an undrop. A reason now travels from a body to terminals, bodies and comments, so a reason or a file name in a record is believed only in the form a run writes it, one clean line, and so is a report's diagnostic. Output that repeats a reason, file names, a report ID or a state GitHub reports escapes it. Assisted-By: LLM Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com> |
||
|
|
79b335e461 |
fix(release): close the batch --defer leaves empty, recording why while it is open
docs/release/backport-tasks/failed-ci.md says to defer the culprit with run --defer --push. When the culprit was all the batch carried, the push stopped with "close batch pull request #N instead", and closing it by hand left nothing that said why: once closed, the deferred original was simply missing. The run now closes the batch itself, and does every write while the pull request is open: the report, then the body, whose record keeps the deferrals and says the batch is closing, at the head the rebuild started from. The close and the deletion of the branch go only while GitHub and the remote still show that head, and the deletion is leased on it. A close that stops part way is finished by the next run --push, before anything else, and by no other command; a head the close did not freeze is refused, never adopted. The run that finishes it stops there, and fails when it was asked for --defer, since no open batch is left to defer on. Recovery never writes the closed pull request. A same-day batch that reuses the branch name and fails to open its pull request leaves a branch the next run names for a person to delete. Assisted-By: LLM Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com> |
||
|
|
5a997fb7d4 |
feat(release): post an immutable report of every classification and write record version 2
Each run rewrote the batch body whole, so the only account of what a run found was gone at the next run, and a merged batch kept only its last one. Nothing said what a classification was made of either: not the heads it read, the policy, the tool or the flags. A run now makes a report: every original merged into main since the line branched, in exactly one category, with what the run read. Its ID hashes the classification and names no pull request, so a new batch's report is whole before GitHub numbers the pull request, and a run that finds the same as the last one makes the same report, which is posted once and keeps its first bytes. The body carries the latest report under the record; a comment the tool never edits keeps each one, so report reads any of them back, from merged batches too. The comment goes up before the push and the body edit on an open batch, and after the pull request a new batch opens with the report in its body; a later run posts a report the body kept but no comment did, byte for byte, before its own. Every write is preceded by a read of the pull request, and nothing is written once it is merged or closed. Both the comment and the body are rendered and measured before the first write, so an oversized one stops the run with nothing written. The record becomes version 2: what it was built from, with the run's --no-workflow-files, which --defer keeps rather than resets, and the report it goes with. Assisted-By: LLM Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com> |
||
|
|
5945d2ddd1 |
feat(release): read a line's record from its newest batch pull request in any state
The deferrals a batch recorded were read only from the open batch pull request. Once it merged, a conflict it had deferred showed as missing and failed check and the cut, until some later run picked something else and opened a new batch; a run that picked nothing opened none. run, check, fold and notify now find the line's record in the newest batch pull request whatever its state: one opened from a batch branch of this repository by an author the batch trusts. A record that is in doubt stops the command instead of letting it fall back to an older one: a block by an author no longer trusted, a bot's batch whose block was removed, a record that does not read whole, a closed record newer than the open batch, or no record within the pages read. The record is still written only to the open batch, and a merged or closed batch is never written again, so a run that picks nothing with no batch open keeps nothing and says so. The reader takes the version 2 record the next change writes; the writer stays at version 1. Assisted-By: LLM Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com> |
||
|
|
35c47f20c1 |
fix(release): fail check --cut while a workflow original waits alone
check --cut returned 0 whenever nothing was missing and nothing was only on the batch, so a workflow original waiting for a maintainer passed the cut once the pick beside it was labelled backport/skip or reached the line by hand. The waiting original was not even printed: the case that held it swallowed the warning the plain check gives. check now sorts every original into one disposition and exits once, so a wait fails the cut on its own. A backport/skip original the open batch still carries is named with the run --defer that takes it out. Assisted-By: LLM Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com> |
||
|
|
1ceaeb8b6e |
docs(security): support the two latest minor releases
The security policy promised three supported lines and said no rule decides which of them a fix reaches. The backport batch runs for the two newest lines with a stable release, by the rules on the backport policy page, and the maintainers agreed to make that the support window. SECURITY.md, the incident-response summary and the technical review now name the two latest minor releases, say that the older one drops out when a new minor ships, and send a reader to the backport policy for which fixes reach them. Assisted-By: LLM Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com> |
||
|
|
c12dcdddb4 |
docs(release): make backports automatic, by written rules
Backports were asked for pull request by pull request with labels and opened by a bot, so whether a fix reached a release line depended on someone remembering to ask, and the lines drifted apart. The policy page states the rules instead: a fix or security fix merged into main goes to every line the batch runs for, unless it is breaking, touches platform migrations or a CRD, or changes the API in a way the API review gate calls sizeable. Two labels let a maintainer override the rules for one pull request. The task pages give a maintainer the steps for a deferred conflict and for a failed batch CI. The backports route in AGENTS.md, the contributing and changelog guides and the PR template point at the policy, and the commit format lists the security type the policy takes. Assisted-By: LLM Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com> |
||
|
|
35a4f7c5d9 |
docs(release): split the release document into one page per topic
docs/release.md had grown into one page that mixed the release model, the CI pipeline, changelogs, signatures, nightlies and the fires seen at release time. A reader looking for one of them read all of it, and an edit to one part reflowed the rest. It now indexes one page per topic under docs/release/. The pages already describe how fixes reach a release line through the backport batch, which the following commits add. Workflows, scripts and tests that named docs/release.md now point at the page that holds the text they mean. Assisted-By: LLM Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com> |
||
|
|
4087218a02 |
docs: move the repo-only guides onto the website (#5034)
## What this PR does Seven guides under `docs/` were operator facing and written alongside the code, and left in the source tree where no user looks. They are on the website now, so this deletes them here and repoints every reference. ``` docs/operations/backup-classes.md -> operations/services/backup-classes docs/operations/resource-presets.md -> guides/resource-management docs/storage-immutability.md -> operations/storage-class-immutability docs/operations/system-memory-limits.md -> operations/configuration/system-memory-limits docs/gateway-classes.md -> networking/gateway-classes docs/observability/distributed-tracing.md -> operations/services/monitoring/distributed-tracing docs/operations/seaweedfs-capacity-for-backups.md -> operations/services/object-storage/capacity-for-backups ``` `docs/release.md`, `docs/deprecating-applications.md` and the two SeaweedFS runbooks in `docs/operations/` stay. A workflow, `AGENTS.md`, a migration and a bats suite read them by path, which is the test from #3777. References point at `https://cozystack.io/docs/v1/...`. The site rewrites that short prefix to the latest version in `layouts/404.html`, so the links follow releases and pin none. Backup Classes, resource management and `storageClass` immutability exist in the latest version already. The other four pages are only in `next/` until 1.7.0 is promoted, and their links start to resolve then. The generated mongodb files come from `values.yaml` through `make generate` with cozyvalues-gen v1.7.0, the version pinned in `.github/workflows/pre-commit.yml`. Tests: helm unit tests for mongodb (151), postgres (209), vm-disk (114) and kubernetes-nodes (223), go tests for backupcontroller, presets and the operator, rd-presets-check, the migration-50 bats suite. ### Downstream repositories - [x] [cozystack/website](https://github.com/cozystack/website) - follow-up: cozystack/website#763 Walked the rest of the trigger map against the diff. No provider follow-up: the mongodb `values.schema.json` diff is one `description` string, with no field added, removed or renamed, no enum, no default, and no `kind`, `plural` or `release.prefix` change. `packages/core/platform/values.yaml` changed in comments only and no key, so the hand written platform-package table on the site is unaffected. Please merge after cozystack/website#763, the links in the code only resolve once those pages deploy. ### Release note ```release-note docs: seven guides move from the docs/ directory of this repository to cozystack.io (Backup Classes, resource presets, storageClass immutability, system component memory limits, GatewayClass selection, distributed tracing, SeaweedFS capacity for backups), and in-repo references point there. ``` |
||
|
|
e31f518df7 |
ci(api-review-gate): publish the gate as a commit status (#3440)
## What this PR does Publishes the `API Review Gate` merge context as a commit status, so a skipped or cancelled run cannot pass it or poison it, and gives fork PRs the same gate through a privileged `workflow_run` workflow. ### Why The merge context was a job name. A required job that skips counts as passed, and check runs are not deduplicated per name, so one cancelled run on a head keeps the context failed until the next push. Measured on this repo: `41d1153c` has four check runs with the gate's job name (one `cancelled`, three `success`). Commit statuses are deduplicated per context and the newest wins, so a run with no verdict posts nothing and the previous status stays. ### What changes Same-repo PRs get status from `api-gate-report`. A `pending` opener marks the head before the evaluation on approve, dismiss and request-changes reviews, so an old `success` is not mergeable for the minute the evaluation takes. `COMMENTED` reviews no longer count as a reviewer's latest review, so an owner who approved and then commented keeps the approval. Concurrency is split, so bot comment run cannot cancel live evaluation. Fork PRs: `api-review-gate-fork.yaml` runs from the default branch and reaches the verdict itself, the fork's run is only a trigger. `resolve` finds PR by head SHA in open PR list (review runs on a fork report base repo as head repository and have no pull requests). `detect` fetches the head as data and runs the detector in a job with `contents: read` only. `conclude` applies the approval rule and posts. A sweep every 15 minutes moves the status of fork PRs whose runs wait for a maintainer in `action_required`, those never fire `workflow_run`. This is lllamnyp's patch, applied whole, with these changes on top: - two open fork PRs on one head fail closed in `resolve` and in the sweep, a head carried by a same-repo PR stays with `api-gate-report` - detector is built from default branch only, merge base is picked by PR author and an old one would mean an old detector - the fork `detect` step runs under `bash -e` and detector exit 2 ended it before the code was read, so it has `set +e` like the same-repo job - head is checked out with links as links, like the same-repo gate does, because flattening them hid a CRD behind a file link from the detector while Helm still ships it ### Limits - A fork PR whose push run waits for a maintainer's approval has no status until that run executes, same as `E2E Tests`. - A fork PR on a head that a same-repo PR also carries shows the verdict standing there, one commit status cannot hold a verdict per base. - The sweep can publish a stale `success` if it reads an approval, stalls, and the owner withdraws it meanwhile. The next sweep flips it back, so the window is up to 15 minutes. - Two copies of one first-party CRD and CRDs behind directory links are gaps of the detector on main, same for same-repo PRs, they are in https://github.com/cozystack/cozystack/issues/5170. ### Testing `actionlint` is clean on both workflows. `zizmor` is clean too, but `dangerous-triggers` and `template-injection` are disabled repo-wide in `.github/zizmor.yml`, so that says little about a privileged workflow. I ran the `github-script` bodies under node with a mocked API (every conclusion, approval and shared head case) and the run steps under `bash -e` with a stub detector exiting 0, 2 and 1. `make unit-tests` passes with `LC_ALL=C` (a kafka bats test depends on the locale, nothing to do with this PR). Not exercised live: the fork path and the sweep run only from the default branch, so their first run is after merge. ### Repo admin Branch protection requires the old job name `Require API owner review for sizeable API changes`. This PR renames that job, so after merge the required context has to be changed to the `API Review Gate` status. ### Downstream repositories - [x] 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 ```release-note NONE ``` |
||
|
|
b5e3b37a9a |
ci(api-review-gate): build the fork detector from the default branch
The merge base is the commit the fork's author branched from, so a branch cut from an old commit selected an old detector, and a fix to the detector never reached the PRs an attacker controls. The workflow itself comes from the default branch, so the detector now does too. The head is also checked out with its links intact. Flattening them hid a CRD behind a file link from the detector while Helm still shipped it, and made the verdict differ from the one the same-repo gate reaches. Assisted-by: LLM Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com> |
||
|
|
662fcf83de |
feat(build): attach a provenance attestation beside the SBOM
An image built with SBOM=1 says what is in it and nothing about how it was built: BUILDX_ARGS set --provenance=false for every build, from when any attestation broke the single-platform stitch. SBOM=1 now also passes --attest type=provenance,mode=min, which BuildKit writes into the same attestation manifest as the SBOM, so the index shape the stitch and the gate read since #4997 is unchanged and a signature over the index covers it. mode=min records the build times, the platform, the frontend and the BuildKit version and leaves out build arguments and secrets, which is what lets it ride every release image. A build without SBOM=1 keeps --provenance=false: the default docker driver cannot attach it, and a PR image turned into an index would buy nothing. Refs #3278 Assisted-by: LLM Signed-off-by: Marian Koreniuk <moriarti@cp.if.ua> |