Repository navigation
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
fa5bd6f to
3cc7520
Compare
4ee987c to
49b2f7c
Compare
| if err != nil { | ||
| return fmt.Errorf("build ModelServing revision data: %w", err) | ||
| } | ||
| controllerRevision, collisionCount, err := utils.RecordModelServingRevision(ctx, c.kubeClientSet, ms, revisionData) |
There was a problem hiding this comment.
This switches the revision identity from ModelServingRevision(ms) (hash of roles only) to RevisionDataHash over the full revision data, so an unchanged spec gets a different revision label after the controller upgrade (verified with the same fixture: 5c8649477c → 6bc4bb5bc9). For workloads created by a released controller (e.g. v1.0.0):
- Under the default
ServingGroupRollingUpdate,isServingGroupOutdatedcompares pod revision labels against the new value, so every existing serving group is treated as outdated and rolled even though nothing in its spec changed. - Under
RoleRollingUpdate,newRoleUpdateCheckunconditionally returns outdated for pre-V1 ControllerRevisions (norevision-data-versionannotation), so all roles are restarted as well.
If a one-time full restart on upgrade is intended, could this be called out in a release note / upgrade doc (the PR is currently marked release-note NONE)? Otherwise, consider keeping a legacy comparison path that hashes the roles stored in pre-V1 revisions so unchanged workloads are not restarted.
There was a problem hiding this comment.
I think for this part, restart.
Before the release, if this is unacceptable, we can create a patch
if it’s acceptable, we’ll include it in the release notes.
Signed-off-by: Zhou Zihang <z@mcac.cc>
Signed-off-by: Zhou Zihang <z@mcac.cc>
Signed-off-by: Zhou Zihang <z@mcac.cc>
Signed-off-by: Zhou Zihang <z@mcac.cc>
Signed-off-by: Zhou Zihang <z@mcac.cc>
5487641 to
b8da6b8
Compare
|
Annotate: within the inplace range. |
| if err := c.CreatePodsByRole(ctx, *roleToApply.DeepCopy(), workloadToApply, roleIndex, servingGroupOrdinal, replicaRevision, hashToUse); err != nil { | ||
| return fmt.Errorf("recreate pods for role %s/%s in ServingGroup %s: %w", targetRole.Name, roleObj.Name, groupName, err) |
There was a problem hiding this comment.
Increasing workerReplicas (for example, from 0 to 1) makes an existing, unprotected replica enter this missing-Pod branch. CreatePodsByRole then tries to create its entry Pod using the desired revision, but the same-named entry Pod still belongs to the previous revision, so createPod returns an identity-mismatch error.
There was a problem hiding this comment.
#1799 now covers most of this work, so I suggest consolidating there
| klog.V(4).Infof("scaleUpServingGroups: creating/updating PodGroup for ServingGroup=%s", groupName) | ||
| // Ensure a PodGroup exists for the new ServingGroup when gang scheduling is enabled. | ||
| if err := c.createOrUpdatePodGroupByServingGroup(ctx, ms, groupName); err != nil { | ||
| if err := c.createOrUpdatePodGroupByServingGroup(ctx, workload, groupName); err != nil { |
There was a problem hiding this comment.
Passing the historical workload here correctly initializes the recovered group's PodGroup, but syncServingGroupReplicas subsequently iterates over every non-deleting group and calls createOrUpdatePodGroupByServingGroup(ctx, ms, servingGroup.Name) with the current spec. Once the PodGroup is observed, that path overwrites its historical requirements.
|
Closing in favor of #1799 to consolidate the revision work into one implementation. The outstanding review findings and recovery coverage from this PR should be carried over there. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Extend the ModelServing revision core from #1643 with immutable ControllerRevision lifecycle handling, partition-protected historical recovery, durable revision retention during recovery and cleanup, and deterministic plugin rendering for historical workloads.
Which issue(s) this PR fixes:
Refs #1643 #1607
Bug evidence (required for bug-related PRs):
N/A
Special notes for your reviewer:
This is the second part of the implementation.
This PR was written in part with the assistance of generative AI.
Tested with:
Does this PR introduce a user-facing change?: