Skip to content

Conversation

@britaniar
Copy link
Collaborator

Description of your changes

I have:

  • Update the abandon state variable name to match description.

  • Update the controller to take into account when to initialize, execute, abandon.

  • Created a new file to include all abandon related functions in one place.

  • Updated integration tests.

  • Run make reviewable to ensure this PR is ready for review.

How has this code been tested

  • Integration tests.
    Will add e2e tests later.

Special notes for your reviewer

@britaniar britaniar marked this pull request as ready for review December 3, 2025 00:58
@britaniar britaniar marked this pull request as draft December 3, 2025 01:50
)

// abandon handles the abandoning of the update run.
func (r *Reconciler) abandon(
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

taking suggestions on naming this function and the following function as it can used by abandon and pause. Same goes for the file name.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking pause or halt would be best?

@britaniar britaniar marked this pull request as ready for review December 3, 2025 16:57
Signed-off-by: Britania Rodriguez Reyes <britaniar@microsoft.com>
Signed-off-by: Britania Rodriguez Reyes <britaniar@microsoft.com>
Signed-off-by: Britania Rodriguez Reyes <britaniar@microsoft.com>
Reason: condition.UpdateRunAbandonedReason,
Message: "The update run has been abandoned",
})
meta.SetStatusCondition(&updateRunStatus.Conditions, metav1.Condition{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if an updateRun is already Succeeded, and then user tries to abandon the updateRun ?

var stuckClusterNames []string
var clusterUpdateErrors []error
// Go through each cluster in the stage and check if it's updating/succeeded/failed/not started.
for i := 0; i < len(updatingStageStatus.Clusters) && clusterUpdatingCount < maxConcurrency; i++ {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to care about maxConcurrency here, since we are not updating any cluster just waiting for them to complete

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.

2 participants