Skip to content

fix: improve Kubernetes job timeout handling - #556

Merged
MohcineTor merged 3 commits into
mainfrom
fix_job_timeout
Oct 16, 2026
Merged

MohcineTor merged 3 commits into
mainfrom
fix_job_timeout

Conversation

@MohcineTor

Copy link
Copy Markdown
Collaborator

No description provided.

@MohcineTor
MohcineTor requested review from sellisd and a balanced review from Copilot October 9, 2026 14:23

Copilot AI 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.

🟡 Changes recommended

A stalled Kubernetes status request can bypass the new overall timeout indefinitely.

1 open finding
What changed in this PR

Replaces kubectl wait with Kubernetes API polling for PostgreSQL jobs.

Changes:

  • Adds shared polling and timeout settings.
  • Detects successful and failed job conditions.
  • Reuses polling for script, initialization, and teardown jobs.
File Description
Babylon/​commands/​macro/​helpers/​workspace/​kubernetes_helper.py Implements unified Kubernetes job polling and timeout handling.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.


while time.monotonic() < deadline:
try:
job = batch_api.read_namespaced_job_status(name=job_name, namespace=env.environ_id)
@MohcineTor
MohcineTor merged commit 5f33ee4 into main Oct 16, 2026
7 checks passed
@MohcineTor
MohcineTor deleted the fix_job_timeout branch October 16, 2026 16:07
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.

3 participants