Skip to content

feat(ci): refuse changes to environment paths after the switch - #6823

Merged
dan-petty merged 7 commits into
mainfrom
feat/6820-environment-path-freeze
Nov 23, 2026
Merged

dan-petty merged 7 commits into
mainfrom
feat/6820-environment-path-freeze

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Since step 11 of the switch to the homelab repository, Argo CD reads the environment from dan-petty/homelab. It reads only k8s/devops and the rules value file of prometheus from this repository. A change to another file of k8s thus changes nothing live, and the two copies drift apart. Part of #5134.

The k8s row of devops ci refuses a branch that changes an environment path: a file of k8s outside k8s/devops and k8s/overlays/homelab/devops, a new file included. Its message names dan-petty/homelab. A Markdown file deploys nothing, so the row allows it. A package rule turns off the Renovate updates of the environment paths, because homelab Renovate updates its copy. k8s/README.md and docs/CLUSTER.md say that Argo CD reads the environment from homelab, and that Bootstrap and Recovery use the files of a homelab checkout. Step 17 of the runbook deletes the check and the rule with the files.

Closes #6820

Change: openspec/changes/archive/2026-11-23-6820-environment-path-freeze/

@dan-petty dan-petty added type/feature Type feature: a new function scope/ci GitHub Actions workflows, pre-commit hooks, CI gates, and runners labels Nov 23, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Build notes for #6820 (step 12 of docs/HOMELAB_REPO_SWITCH.md).

Owner review points

  1. Place of the check. The check is a module of the k8s row (tests/gate/k8s_checks/environment_freeze.py), not a new row. It needs no change under src/, Static Analysis runs the row, and the scoped checks of the delivery agents (--only ...,k8s,...) run it before a push. Step 17 deletes one module and one test.
  2. Markdown exception. The pathspec of step 10 holds k8s/README.md. This pull request (step 12) and step 15 must change that file in devops-cli, so a check with the exact pathspec refuses its own pull request. The check allows the 2 Markdown files of the 150 environment files (k8s/README.md, k8s/llm/profiles/README.md), because a document deploys nothing. It refuses the other 148, and each new file under k8s outside the product folders.
  3. Renovate. A package rule with matchFileNames (k8s/**, !k8s/devops/**, !k8s/overlays/homelab/devops/**) and enabled: false, not ignorePaths. In Renovate 44.239.2, ignorePaths is not mergeable: a repository value replaces the 8 paths of :ignoreModulesAndTests (**/tests/** included), and it takes no negation.
  4. Soak cost. A change of src/devops_cli/grafana/service_dashboard.py that changes a committed dashboard of k8s/monitoring/dashboards/ waits for step 17, or goes to homelab.
  5. Default root app. devops argo cd apps bootstrap-gitops with no --root-app, run in a devops-cli checkout, applies the bootstrap file of devops-cli: that is the revert of the switch. The README now gives --root-app <homelab-checkout>/k8s/argocd/bootstrap/bootstrap.yaml. The code is not changed. In a homelab checkout, the profile fact kubernetes.dir gives the homelab file.
  6. Drift after the switch. After 00:08 UTC, three merges changed environment paths of devops-cli: fix(deps): update container images #6817 (image pins of 11 files), fix(k8s): start SearXNG when its metrics Secret is missing #6811 (k8s/README.md only) and feat(repos): report the drift of onboarded repositories nightly #6816 (comments of k8s/argocd/image-updater-values.yaml). The homelab copy does not get them from devops-cli. Homelab Renovate makes its own image updates.

Evidence

  • uv run devops ci --check --only lint,format,docs,constructs,openspec,test-settings,test-tree,startup-imports,swallowed-failures,k8s,domain: each row passes on the head. The k8s row passes while the branch changes k8s/README.md.
  • uv run devops ci test tests/invariants/test_environment_freeze_check.py: passes. It failed at collection before the check module existed.
  • A probe commit (not pushed) that changed k8s/llm/valkey.yaml, k8s/devops/kustomization.yaml and the new file k8s/new-app/deployment.yaml gave status 1 with 2 findings: k8s/llm/valkey.yaml and k8s/new-app/deployment.yaml.
  • npx --yes --package renovate@44.239.2 -- renovate-config-validator --strict --no-global .github/renovate.json: exit 0.
  • matchRegexOrGlobList of Renovate 44.239.2 with the patterns of the rule: k8s/llm/valkey.yaml and k8s/argocd/apps/argocd.yaml match; k8s/devops/renovate/cronjob.yaml, k8s/overlays/homelab/devops/kustomization.yaml and Dockerfile do not.

Person steps

  • Merge. Then do item 3 of step 12 (soak for at least 1 day and 1 release) and its checks.

@dan-petty
dan-petty marked this pull request as ready for review November 23, 2026 02:03
@dan-petty
dan-petty merged commit ad366bb into main Nov 23, 2026
29 checks passed
@dan-petty
dan-petty deleted the feat/6820-environment-path-freeze branch November 23, 2026 02:05
dan-petty pushed a commit that referenced this pull request Nov 23, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.198.0](v0.197.0...v0.198.0)
(2026-11-23)


### Features

* **ci:** refuse changes to environment paths after the switch
([#6823](#6823))
([ad366bb](ad366bb))
* **roadmap:** Add requirement text to the stage context
([#6826](#6826))
([615bbc4](615bbc4))
* **roadmap:** Require a rejected alternative with a fact
([#6836](#6836))
([5467e22](5467e22))
* **roadmap:** The stage plan states constant claims
([#6837](#6837))
([5ea6d02](5ea6d02))


### Bug Fixes

* **deps:** update ghcr.io/dan-petty/devtools Docker tag to v1.1.1
([#6834](#6834))
([ea1b00f](ea1b00f))
* **docs:** the error catalog lists the onboard errors
([#6829](#6829))
([1846b2d](1846b2d))
* **roadmap:** name a spent provider key, not a refused key
([#6827](#6827))
([3aedb2f](3aedb2f))
* **roadmap:** read a record below a block a person opens
([#6812](#6812))
([54a36e9](54a36e9))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/ci GitHub Actions workflows, pre-commit hooks, CI gates, and runners type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(ci): refuse changes to environment paths after the switch

1 participant