Skip to content

fix(ci): fix TPU request job cleanup and idempotency on DWS timeout - #234

Open
nicolexin wants to merge 1 commit into
llm-d:mainfrom
nicolexin:fix/tpu-dws-232
Open

fix(ci): fix TPU request job cleanup and idempotency on DWS timeout#234
nicolexin wants to merge 1 commit into
llm-d:mainfrom
nicolexin:fix/tpu-dws-232

Conversation

@nicolexin

@nicolexin nicolexin commented Jul 28, 2026

Copy link
Copy Markdown

What does this PR do?

Problem

In reusable-ci-nightly-benchmark.yaml and reusable-nightly-e2e-gke-tpu.yaml, the tpu-request-job cleanup command (kubectl delete job tpu-request-job) was placed at the end of the Request TPUs (DWS) step after kubectl wait. When kubectl wait timed out due to TPU capacity constraints:

  1. The step failed immediately, skipping job deletion.
  2. llmdbenchmark was not installed, causing the teardown step to skip namespace cleanup.
  3. On subsequent runs, kubectl apply returned unchanged without spawning new pods, causing kubectl wait to immediately fail with error: no matching resources found, latching the pipeline red.

Solution

  1. Idempotent Pre-Cleanup: Added kubectl delete job tpu-request-job -n "$NS" --ignore-not-found before applying the job manifest.
  2. Guaranteed Release Step: Extracted job deletion into a separate Release TPU Request Job step with if: always() && steps.infra_request_tpus.outcome != 'skipped' so the job is deleted even if kubectl wait times out or fails.

Why is this change needed?

See #232

How was this tested?

Will need to verify in CI/CD. The change itself is very small though.

Checklist

  • Commits are signed off (git commit -s) per DCO
  • Code follows project contributing guidelines
  • Tests pass locally (make test)
  • Linters pass (make lint)
  • Documentation updated (if applicable)

Related Issues

@maugustosilva

Copy link
Copy Markdown
Collaborator

Hey @nicolexin. Apologies for the long delay in reviewing it (we just had the release v0.9.0 cut yesterday, 08/16/26). Can you please rebase? Thanks!

@nicolexin

Copy link
Copy Markdown
Author

Hi @maugustosilva I have rebased the change, PTAL and thank you!

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.

2 participants