Repository navigation
Count the admission and warmup grace periods from component creation - #4
Open
mike-ainsel wants to merge 1 commit into
Open
mike-ainsel wants to merge 1 commit into
mike-ainsel wants to merge 1 commit into
Conversation
|
Automatic reviews are disabled for this repository. Configure in Code Review Settings. |
mike-ainsel
changed the base branch from
feat/v1.2.3-concurrency-quay-ci
to
milab
November 25, 2026 12:46
mike-ainsel
force-pushed
the
fix/admission-grace-from-component-creation
branch
from
November 25, 2026 12:48
6087ca7 to
b824dab
Compare
The Running phase measured both grace periods from the AppWrapper's
ResourcesDeployed condition. That condition is set when the AppWrapper
starts Resuming, before the controller creates the components. A busy
controller can take a long time to get from that point to creating the
wrapped Job, and all of that time was counted against the admission grace
period: the workload then failed with InsufficientPodsReady
("0 pods pending; 0 pods running; 0 pods succeeded") although the cluster
had a fraction of the grace period to create its pods.
Count from the latest creation time of the components instead: the
LastTransitionTime of each component's ResourcesDeployed=True condition.
A component deleted on reset has that condition set to False, so a
redeployment records a new time. When no component reports a creation
time, the AppWrapper's ResourcesDeployed time is used as before.
The Resuming phase still measures retries of a failed create from
ResourcesDeployed: that is the time spent trying to create.
New envtest: an AppWrapper whose ResourcesDeployed is two minutes old
but whose JobSet was just created stays Running with no pods under a 1m
admission grace period, and fails with InsufficientPodsReady once its
component is two minutes old. The test fails on the previous code.
mike-ainsel
force-pushed
the
fix/admission-grace-from-component-creation
branch
from
November 25, 2026 13:10
b824dab to
e18cad7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Base:
milab(after #1 and #2). Rebased onto #2: in the Running-phase grace check it uses #2's locked status write (statusPatch) together with the new start time (graceStart);MILAB.mdkeeps both new rows.Problem
In the Running phase, both grace periods (admission: pods not created yet; warmup: pods not ready yet) count from the AppWrapper's
ResourcesDeployedcondition. That condition is set when the AppWrapper starts Resuming, before the controller creates the components. A busy controller can take a long time to get from there to creating the wrapped Job, and that time is counted against the admission grace period. The workload then fails withInsufficientPodsReady("0 pods pending; 0 pods running; 0 pods succeeded") although the cluster had only part of the grace period to create the pods. The timer measures the controller's own backlog, not the cluster.#1 (parallel reconciles) shortens that backlog; this PR stops counting it at all.
Change
componentsCreatedAt: the latestLastTransitionTimeof the components'ResourcesDeployed=Trueconditions (set when each component is created, reasonComponentCreatedSuccessfully). The Running phase measures both grace periods from it.False, so the next create records a new time.ResourcesDeployedtime is used, as before.ResourcesDeployed(that is the time spent trying to create).MILAB.md: new row.Tests
ResourcesDeployedbackdated by 2m and a 1m admission grace period staysRunningafter its JobSet is created; once the component's creation time is backdated by 2m, it fails withInsufficientPodsReady.go test -race ./internal/... ./pkg/...passes on the rebased code (envtest 1.37.0).CI (
milabworkflow) is green on the rebased head.