Skip to content

test(k8s): Drop the tests that repeat third-party version pins #6060

Closed
1 of 1 issue completed
Closed

Description

@dan-petty

Problem

Tests repeat the exact versions of third-party artifacts that the manifests pin: chart versions, image tags and digests, tool versions. When Renovate updates a pin, these tests fail, although no project code changed. On 2026-11-16 the Renovate pull requests #6046 (Helm chart patches) and #6029 (container image patches) failed on such tests: tests/invariants/test_k8s_argocd_apps.py:196 ('4.6.1' == '4.6.0'), the chart table of tests/core/test_k8s_local_path_placement.py, tests/commands/k8s/test_k8s_qdrant_security.py:99, and tests/invariants/test_k8s_searxng.py:87. About 19 test files under tests/invariants, tests/k8s, tests/core/test_k8s*, tests/commands/k8s and tests/gate/k8s_checks hold version or digest literals.

Owner, 2026-11-16: "I'm seeing unnecessary tests for items that are not project code, like pinned k8s manifest versions. This is breaking renovate workflows and adding to the rats nest that is the current test sprawl."

Expected behavior

  • A test checks project code and project rules, not the value of a third-party pin. Delete each assertion that repeats an exact third-party version, tag or digest (and the test, if that is all it does). Keep a check of a rule, for example "each image is pinned by digest", "a chart version is semver", or "the Application and the vendored chart agree" where the vendored copy is project code that the cluster runs.
  • A table in code or docs that repeats a pinned version reads it from the manifest, or drops the version.
  • A file derived from a pinned artifact (for example the SearXNG engine-names file, a vendored chart) is generated where it is used, or regenerated by a Renovate post-upgrade task after fix(k8s): Keep the Renovate token away from upgrade tasks #6020; a test does not hold it to the pin.
  • docs/TESTING.md states the rule, and a test-tree check (or an ast-grep rule) refuses a new test that compares with a literal version, tag or digest that a manifest of k8s/ pins.
  • The count of tests and test lines falls, and a Renovate update of a pin needs no test change.

Related

Sub-issues

Sub-issues

1 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. added
    type/test
    on Nov 16, 2026
  2. dan-petty commented on Nov 16, 2026

    @dan-petty
    OwnerAuthor
    • Priority: P1-High. Renovate PRs fail in CI on these tests, blocking dependency updates and adding manual work.
    • Related: build(k8s): move SearXNG to 2026.11.12 after searxng-check #5093, which asks for a different change. Both concern the SearXNG version pin, but #5093 updates the pin while the candidate removes the test that asserts it.
  3. added
    scope/k8s
    source/agent
    status/new
    value/medium
    effort/medium
    priority/p1-high
    on Nov 16, 2026
  4. dan-petty commented on Nov 16, 2026

    @dan-petty
    OwnerAuthor

    Owner, 2026-11-16 (wider than the issue text): "I don't want any tests that check that a manifest or config has any particular value. They should be testing the source code of the project."

    So the scope of this item is every test that reads a manifest, a ConfigMap template, a gateway or Renovate config, a workflow file or another config file and asserts a value in it, not only third-party version pins. That includes recent tests such as test_no_openrouter_route_uses_the_floor_variant (#5982), tests/config/test_roadmap_model_jobs.py (#6019), the automerge-scope test of tests/core/test_renovate_config.py (#6036), the per-job model and doubled-limit tests of tests/config/test_k8s_devops_runtime.py, and the value checks under tests/invariants/test_k8s_*, tests/k8s/, tests/core/test_k8s* and tests/commands/k8s/.

    What stays:

    • tests of project source code (for example the code that renders the ConfigMap, the settings models and their validation, the commands);
    • open validators that CI already runs for manifests and config (kustomize render, trivy config, promtool, renovate-config-validator), which check form and schema, not a chosen value.

    List each gray case (for example the gate checks of tests/gate/k8s_checks/, which run the admission policies) in the PR with a proposed decision for the owner, instead of deciding it alone.

  5. added
    owner/agent
    on Nov 16, 2026
  6. dan-petty commented on Nov 16, 2026

    @dan-petty
    OwnerAuthor

    Owner, 2026-11-16 (a second rule for docs/TESTING.md in this item): "we shouldn't create unit tests for things that are better measured with end to end and integration tests". A behavior that spans components (the Service and GitHub, a Job in the cluster, the gateway and a provider, a CLI command and its subprocesses) is measured by an integration or end-to-end test at the real edge or a contract-faithful fake of it (ADR 0007: tests double only process edges), not by unit tests that rebuild the flow with mocks. This item writes the rule and lists the clearest cases; it does not rewrite the unit suite.

  7. dan-petty commented on Nov 16, 2026

    @dan-petty
    OwnerAuthor

    Owner decisions, 2026-11-16 (answered directly to the owner's session):

    1. SearXNG gate: remove it. The SEARXNG_IMAGE equality gate in tests/gate/k8s_checks/devops_runtime.py and the SearXNG engine-names tests (tests/invariants/test_k8s_searxng.py, tests/k8s/test_searxng_check.py saved-reply test) go; a SearXNG image updates like any other image.
    2. ServiceAccount claim and token tables: drop the chart versions from the tables. The token rules of the tables stay, checked by code, not by a version match; a chart update no longer touches the tables.
    3. Config PRs fix(deps): give SearXNG its own Renovate branch behind approval #6052 and fix(deps): give a Helm chart update the fix prefix #6057: keep the Renovate config changes and drop their tests that read renovate.json values (renovate-config-validator in CI checks the form).
  8. dan-petty commented on Nov 16, 2026

    @dan-petty
    OwnerAuthor

    Owner, 2026-11-16 22:55Z (direct): "remove any tests or workflows that will block renovate updates". This approves the removal of each test, gate check (tests/gate/k8s_checks/, for example the CRAWL4AI_IMAGE equality assert) and CI workflow step that fails a Renovate pull request when the update breaks no project code. The SearXNG gate and the token-table versions are in the PR of the Renovate fixer (owner decisions above). Where a Renovate configuration change removes the failure (for example fix(deps) for an update of runtime files), the config change is used, per the owner rule of 21:45Z.

  9. 8 remaining items

  10. added
    status/in-review
    and removed
    status/in-progress
    on Nov 17, 2026
  11. removed
    status/in-review
    owner/agent
    on Nov 17, 2026
  12. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    Contributor
  13. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-17 03:03 UTC

  14. dan-petty commented on Nov 19, 2026

    @dan-petty
    OwnerAuthor

    Owner decision of 2026-11-19: the trivy-action input assertions (severity, ignore-unfixed and exit-code in test_mcp_server_image.py:49-67, test_runner_image.py:103-113 and test_service_image.py:111-141) go under the owner rule of 2026-11-16 (no config-value tests). #6405 deletes them when one image-scan action holds the threshold in one place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p1-highscope/k8ssource/agenttype/testvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions