Skip to content

Commit 62ce6a1

Browse files
change the parameter naming convention to something like effectiveRevision
Signed-off-by: katara-Jayprakash <[email protected]>
1 parent 89e979e commit 62ce6a1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

pkg/model-serving-controller/controller/model_serving_controller.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ func (c *ModelServingController) scaleDownRoles(ctx context.Context, ms *workloa
846846

847847
// scaleUpRoles handles Role scaling up.
848848
// It creates new Roles with increasing indices starting from the current max index + 1.
849-
func (c *ModelServingController) scaleUpRoles(ctx context.Context, ms *workloadv1alpha1.ModelServing, groupName string, targetRole workloadv1alpha1.Role, roleList []datastore.Role, expectedCount int, servingGroupOrdinal int, newRevision string) {
849+
func (c *ModelServingController) scaleUpRoles(ctx context.Context, ms *workloadv1alpha1.ModelServing, groupName string, targetRole workloadv1alpha1.Role, roleList []datastore.Role, expectedCount int, servingGroupOrdinal int, effectiveRevision string) {
850850
startingIndex := 0
851851
if len(roleList) > 0 {
852852
_, ordinal := utils.GetParentNameAndOrdinal(roleList[len(roleList)-1].Name)
@@ -870,13 +870,13 @@ func (c *ModelServingController) scaleUpRoles(ctx context.Context, ms *workloadv
870870
for i := 0; i < toCreate; i++ {
871871
newIndex := startingIndex + i
872872
// Create pods for role
873-
err := c.CreatePodsByRole(ctx, *targetRole.DeepCopy(), ms, newIndex, servingGroupOrdinal, newRevision)
873+
err := c.CreatePodsByRole(ctx, *targetRole.DeepCopy(), ms, newIndex, servingGroupOrdinal, effectiveRevision)
874874
if err != nil {
875875
klog.Errorf("create role %s for ServingGroup %s failed: %v", utils.GenerateRoleID(targetRole.Name, newIndex), groupName, err)
876876
} else {
877877
// Insert new Role to global storage
878878
roleID := utils.GenerateRoleID(targetRole.Name, newIndex)
879-
c.store.AddRole(utils.GetNamespaceName(ms), groupName, targetRole.Name, roleID, newRevision)
879+
c.store.AddRole(utils.GetNamespaceName(ms), groupName, targetRole.Name, roleID, effectiveRevision)
880880
// Emit event for new role entering Creating state
881881
message := fmt.Sprintf("Role %s/%s in ServingGroup %s is now Creating", targetRole.Name, roleID, groupName)
882882
c.emitRoleStatusEvent(ms, corev1.EventTypeNormal, "RoleCreating", message)

0 commit comments

Comments
 (0)