Skip to content

Ensure API E2E tests clean up after themselves#3588

Merged
dmjb merged 1 commit intomainfrom
api-e2e-state-cleanup
Feb 5, 2026
Merged

Ensure API E2E tests clean up after themselves#3588
dmjb merged 1 commit intomainfrom
api-e2e-state-cleanup

Conversation

@dmjb
Copy link
Member

@dmjb dmjb commented Feb 4, 2026

The code previously relied on API calls to clean up local test state. However, since the APIs are async, and the servers get spun up and down during the tests, a lot of workloads would end up in a partially deleted state. This change uses the CLI for final cleanup, ensuring that the cleanup is complete. In tests where delete endpoints are tested, it introduces some logic to wait for the deletion to finish.

This mostly affects local runs of the E2E tests.

@github-actions github-actions bot added the size/S Small PR: 100-299 lines changed label Feb 4, 2026
rdimitrov
rdimitrov previously approved these changes Feb 4, 2026
@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.78%. Comparing base (a360fa4) to head (491ad30).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/workloads/manager.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3588   +/-   ##
=======================================
  Coverage   65.77%   65.78%           
=======================================
  Files         411      411           
  Lines       40727    40727           
=======================================
+ Hits        26790    26791    +1     
- Misses      11853    11855    +2     
+ Partials     2084     2081    -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dmjb dmjb requested a review from blkt as a code owner February 4, 2026 10:22
@github-actions github-actions bot added size/S Small PR: 100-299 lines changed and removed size/S Small PR: 100-299 lines changed labels Feb 4, 2026
@dmjb dmjb force-pushed the api-e2e-state-cleanup branch from 15002a3 to 9808e1a Compare February 4, 2026 10:52
@github-actions github-actions bot added size/S Small PR: 100-299 lines changed and removed size/S Small PR: 100-299 lines changed labels Feb 4, 2026
@dmjb dmjb force-pushed the api-e2e-state-cleanup branch from 1c159c3 to 4d5db5d Compare February 4, 2026 18:54
@github-actions github-actions bot added size/S Small PR: 100-299 lines changed and removed size/S Small PR: 100-299 lines changed labels Feb 4, 2026
@jhrozek
Copy link
Contributor

jhrozek commented Feb 5, 2026

LGTM, but the linting should be fixed

@github-actions github-actions bot added size/S Small PR: 100-299 lines changed and removed size/S Small PR: 100-299 lines changed labels Feb 5, 2026
@dmjb dmjb force-pushed the api-e2e-state-cleanup branch from 0aa482d to b0fa3dc Compare February 5, 2026 12:05
@github-actions github-actions bot added size/S Small PR: 100-299 lines changed size/M Medium PR: 300-599 lines changed and removed size/S Small PR: 100-299 lines changed size/M Medium PR: 300-599 lines changed labels Feb 5, 2026
@dmjb dmjb force-pushed the api-e2e-state-cleanup branch from e4dd35c to ecaee3f Compare February 5, 2026 15:44
@dmjb dmjb marked this pull request as ready for review February 5, 2026 15:44
@github-actions github-actions bot added size/S Small PR: 100-299 lines changed and removed size/S Small PR: 100-299 lines changed labels Feb 5, 2026
rdimitrov
rdimitrov previously approved these changes Feb 5, 2026
@github-actions github-actions bot added size/S Small PR: 100-299 lines changed and removed size/S Small PR: 100-299 lines changed labels Feb 5, 2026
The code previously relied on API calls to clean up local test state.
However, since the APIs are async, and the servers get spun up and down
during the tests, a lot of workloads would end up in a partially deleted
state. This change uses the CLI for final cleanup, ensuring that the
cleanup is complete.

This mostly affects local runs of the E2E tests.
@dmjb dmjb force-pushed the api-e2e-state-cleanup branch from 13ee229 to 491ad30 Compare February 5, 2026 16:45
@github-actions github-actions bot added size/S Small PR: 100-299 lines changed and removed size/S Small PR: 100-299 lines changed labels Feb 5, 2026
@dmjb dmjb merged commit 01e5319 into main Feb 5, 2026
38 checks passed
@dmjb dmjb deleted the api-e2e-state-cleanup branch February 5, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Small PR: 100-299 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants