Skip to content

fix(tests): a default run deselects every test under tests/k8s #5910

Description

@dan-petty

Problem

A default test run deselects every test under tests/k8s/: 819 tests, offline tests included. _deselect_by_marker(config, items, "k8s") in tests/conftest.py (from #4007, commit 729dbeb, 2026-11-15) checks "k8s" in item.keywords. pytest puts the name of each parent package in the keywords, so the package tests/k8s matches, and not only the tests marked k8s. With -m k8s the tests are deselected too, because they carry no mark.

Evidence on origin/main (0.159.0):

  • uv run pytest -n 0 --co -q tests/k8s/ prints no tests collected (819 deselected).
  • uv run devops ci test tests/k8s/test_k8s_configmap.py prints 21 deselected / 0 selected.
  • uv run pytest -n 0 -m "k8s or not k8s" tests/k8s/test_k8s_configmap.py runs the 21 tests.

So CI has run no test of tests/k8s/ since 2026-11-15, and a change that breaks one passes the checks. #5903 found this when it changed k8s/devops/configmap.example.yaml.

Expected behavior

  • A default run deselects only the tests that carry the mark k8s, for example with item.get_closest_marker("k8s").
  • The offline tests under tests/k8s/ run in CI again.
  • A test fails if a default run deselects a test that has no k8s mark.

Source: #5903

Activity

  1. added
    type/bug
    source/agent
    status/new
    effort/low
    value/high
    scope/tests
    on Nov 16, 2026
  2. dan-petty commented on Nov 16, 2026

    @dan-petty
    OwnerAuthor
    • Priority: P1-High. CI has run zero tests under tests/k8s since 2026-11-15, so regressions in that area pass unchecked. The regression commit 729dbeb does not set P0: the author has no write access, and no caller attached it as evidence. A person can set P0 with the label priority/p0-critical.
    • Related: fix(ci): narrowed test workers fall back and slow runs #5606, which asks for a different change. Both affect CI test execution, but #5606 fixes a collection exit-code fallback while this fixes a marker-detection bug that silently skips 819 tests.
  3. added
    priority/p1-high
    on Nov 16, 2026
  4. added
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 16, 2026
  5. removed
    status/in-review
    on Nov 16, 2026
  6. added a commit that references this issue on Nov 16, 2026
  7. devops-cli-service commented on Nov 16, 2026

    @devops-cli-service
    Contributor
  8. devops-cli-service commented on Nov 16, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-16 03:02 UTC

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/lowpriority/p1-highscope/testssource/agenttype/bugvalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions