Skip to content

TT-17995: run nightly-marked API tests on every trigger - #539

Merged
konrad-sol merged 1 commit into
masterfrom
TT-17995/enable-nightly-api-tests
Aug 21, 2026
Merged

TT-17995: run nightly-marked API tests on every trigger#539
konrad-sol merged 1 commit into
masterfrom
TT-17995/enable-nightly-api-tests

Conversation

@konrad-sol

Copy link
Copy Markdown
Collaborator

What

Drops and not nightly from every apimarkers string in the TUI variation config — 5 occurrences in config/tui/prod-variations.yml, 5 in config/tui/test-variations.yml.

API test execution is fast enough now that there's no reason to hold the nightly-marked tests back to scheduled runs. This makes PR, push and workflow_dispatch runs pick up the ~58 @pytest.mark.nightly tests in tyk-analytics/tests/api as well.

Side effect: fixes the scheduled runs too

Envfiles accumulate down the variation tree rather than override (policy/variations.go:201 appends the parent's EnvFiles onto each child). So the schedule leaves were inheriting the branch-level and global-level envfiles — two of which still carried not nightly.

Concretely, prod-variation/tyk-analytics/master/schedule/api emitted 8 envfile combos, not the 6 declared, and 2 of the 8 skipped exactly the tests the nightly run exists to cover. That's gone now.

Verification

  • go build ./... — clean
  • go test ./policy/... — pass
  • gromit policy generate-tui regenerated cleanly; no nightly remains anywhere in the generated .gho output

Rollout

pages.yml triggers on pushes to master touching config/tui/**, so merging republishes the static TUI site and test-controller picks it up on the next run. No downstream release.yml regeneration needed. Reverting is a one-commit rollback.

Follow-ups (not in this PR)

  • The nightly marker in tyk-analytics/tests/api/pytest_ci.ini and its 58 decorators are now inert. They should be removed, otherwise people keep adding @pytest.mark.nightly expecting a PR-skip that no longer happens.
  • github-actions/.github/actions/tests/test-controller/db-variations.yml still carries not nightly in 2 places, but nothing references that file — the action fetches from the TUI API. Dead file, worth deleting.
  • The PR marker is the mirror-image problem: registered as "run only in PR builds" and applied widely, but no apimarkers string says not PR, so those tests run in scheduled runs too.
  • Worth checking: the api-tests action passes -m "$api_markers" on the command line while pytest_ci.ini addopts already has -m "not upgrade and not resilience". pytest's -m is single-valued and the command line wins, so that exclusion is likely being dropped in CI.

🤖 Generated with Claude Code

API test execution is fast enough now that there is no need to hold the
`nightly`-marked tests back to scheduled runs only. Drop `and not nightly`
from every `apimarkers` string in both TUI variation files (5 occurrences
each), so PR, push and workflow_dispatch runs pick up the ~58
`@pytest.mark.nightly` tests in tyk-analytics/tests/api too.

This also fixes an inconsistency in the scheduled runs: because envfiles
accumulate down the variation tree rather than override, the schedule
leaves inherited the branch- and global-level envfiles, two of which
still carried `not nightly`. Those combos were skipping the very tests
the nightly run exists to cover.

Follow-ups (separate tickets):
- remove the now-meaningless `nightly` marker and its decorators from
  tyk-analytics/tests/api
- delete the unreferenced db-variations.yml in github-actions

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@konrad-sol
konrad-sol requested a review from a team as a code owner August 21, 2026 10:46
@konrad-sol
konrad-sol enabled auto-merge (squash) August 21, 2026 13:36

@probelabs probelabs Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. The removal of 'and not nightly' from apimarkers makes sense to run these tests on every trigger as described.

@konrad-sol
konrad-sol merged commit fed6a85 into master Aug 21, 2026
14 of 15 checks passed
@konrad-sol
konrad-sol deleted the TT-17995/enable-nightly-api-tests branch August 21, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant