Skip to content

🐛 fix(kubejob): make TestRunContextTimeoutDeletesTheJob deterministic - #14512

Merged
hivecommons-hive[bot] merged 1 commit into
v5from
scanner/fix-14485
Oct 27, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
v5from
scanner/fix-14485

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Root cause: the test used a fixed 40ms context deadline. On a slow CI runner it could expire before the Job POST completed, so Run returned before any Job existed to delete and the delete assertion failed.

Fix: the fake API now has an onJobGet hook; the test cancels the context from it on the first Job GET, so the cancel is synchronized with Run being mid-poll. No sleeps, no production change (Run deletes synchronously before returning).

Closes #14485

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

The 40ms deadline could expire before the Job was created on a slow runner, so Run returned without a Job to delete. End the context from the fake API on the first Job GET instead.

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 27, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign nicholasjackson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-actions

Copy link
Copy Markdown
Contributor

Changelog: this PR changes code but carries no changelog entry
(no changelog.d/ fragment and no CHANGELOG.md edit).

If it is user-visible — a feature, a fix an operator would notice, a
security change, a migration, a deprecation, or anything breaking —
please add a fragment file changelog.d/<category>-<pr-or-slug>.md
containing exactly your entry (see changelog.d/README.md; the
category is one of added/changed/deprecated/fixed/security). Please
do not append to CHANGELOG.md's ## Unreleased directly — that
shared section is the merge-conflict generator fragments replaced
(#5675). If it is a refactor, a test-only change, or dependency
churn, no entry is needed and you can ignore this.

This is a reminder, not a gate; it never blocks a merge.

@kubestellar-prow kubestellar-prow Bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

No conflicting open PRs or same-file overlaps were found.

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 27, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit 99e0464 into v5 Oct 27, 2026
84 of 89 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/fix-14485 branch October 27, 2026 02:40
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#145122d487d5` sha256:b7ed89c5b190db8ae614ccac8d3a5cbd58676e91a860e8ede688f7643f2cd8cb — download from the dashboard or `hivectl review evidence #14512`.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) labels Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR copilot dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci-flake: github.com/hivecommons/hive/crux/kubejob.TestRunContextTimeoutDeletesTheJob

0 participants