Skip to content

[test] implement proper cleanup of reserved IPs in e2e tests - #603

Merged
moshevayner merged 1 commit into
mainfrom
reserved-ips-e2e-fix
Aug 4, 2026
Merged

[test] implement proper cleanup of reserved IPs in e2e tests#603
moshevayner merged 1 commit into
mainfrom
reserved-ips-e2e-fix

Conversation

@moshevayner

@moshevayner moshevayner commented Aug 3, 2026

Copy link
Copy Markdown
Member

Summary

Fixes intermittent reserved-IP leaks from e2e tests.

Reserved IPs created directly through the Linode API were not always released when setup or cleanup failed. This could exhaust the shared CI account's reserved-IP capacity.

Changes

  • Tag reserved IPs created by e2e tests with a unique CI run identifier.
  • Persist reserved-IP addresses before dependent API calls, so partial setup failures remain recoverable.
  • Add verified, retried deletion with HTTP-status logging.
  • Treat 404 as an idempotent successful release.
  • Add a tag-scoped fallback sweep to cleanup-cluster.
  • Ensure the fallback sweep runs even if earlier cluster cleanup commands fail.
  • Consolidate per-IP release and run-level sweep behavior into one cleanup script:
    • release <ip>
    • sweep

Safety

The fallback sweep only releases reserved IPs tagged for the current CI run. It does not touch unrelated account resources.

Validation

  • chainsaw lint for all modified e2e manifests
  • YAML parsing
  • Shell syntax checks
  • make -n cleanup-cluster

Signed-off-by: Moshe Vayner moshe@vayner.me

General:

  • Have you removed all sensitive information, including but not limited to access keys and passwords?
  • Have you checked to ensure there aren't other open or closed Pull Requests for the same bug/feature/question?

Pull Request Guidelines:

  1. Does your submission pass tests?
  2. Have you added tests?
  3. Are you addressing a single feature in this PR?
  4. Are your commits atomic, addressing one change per commit?
  5. Are you following the conventions of the language?
  6. Have you saved your large formatting changes for a different PR, so we can focus on your work?
  7. Have you explained your rationale for why this feature is needed?
  8. Have you linked your PR to an open issue

@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.76%. Comparing base (d3be9cb) to head (07efb86).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #603   +/-   ##
=======================================
  Coverage   73.76%   73.76%           
=======================================
  Files          19       19           
  Lines        3045     3045           
=======================================
  Hits         2246     2246           
  Misses        538      538           
  Partials      261      261           

☔ View full report in Codecov by Harness.
📢 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.

Comment thread e2e/test/scripts/cleanup-reserved-ips.sh Outdated
Comment thread Makefile
Signed-off-by: Moshe Vayner <moshe@vayner.me>
@moshevayner
moshevayner merged commit bdb89f6 into main Aug 4, 2026
12 checks passed
@moshevayner
moshevayner deleted the reserved-ips-e2e-fix branch August 4, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing for updates to the testing suite in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants