Skip to content

feat(upgradepipeline): add upgrade pipeline step support#1178

Open
ndk wants to merge 2 commits into
mainfrom
akarpov/nex-2532/upgrade-pipeline-steps
Open

feat(upgradepipeline): add upgrade pipeline step support#1178
ndk wants to merge 2 commits into
mainfrom
akarpov/nex-2532/upgrade-pipeline-steps

Conversation

@ndk
Copy link
Copy Markdown
Contributor

@ndk ndk commented May 21, 2026

Resolves: NEX-2532

Add UpgradePipelineStep for upgrade pipeline steps.

I'm not sure preconditions add much value here. Kubernetes reconciliation is eventually consistent, so temporary failures caused by a service not being ready would be retried anyway and should work once the dependency is available.

My main concern is that this could block adoption. It also gets less clear when the services aren't managed by the operator.

@ndk ndk marked this pull request as ready for review May 21, 2026 05:47
@ndk ndk requested a review from a team as a code owner May 21, 2026 05:48
@ndk ndk force-pushed the akarpov/nex-2532/upgrade-pipeline-steps branch from 42fed97 to d7f3744 Compare May 21, 2026 07:43
}

func (r *UpgradePipelineStepController) lookupStep(ctx context.Context, cr *v1alpha1.UpgradePipelineStep) (*upgradepipeline.StepOut, error) {
out, err := r.avnGen.UpgradePipelineStepList(ctx, cr.Spec.OrganizationID)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Based on the response type:

type UpgradePipelineStepListOut struct {
	First      *string   `json:"first,omitempty"` // First page
	Last       *string   `json:"last,omitempty"`  // Last page
	Next       *string   `json:"next,omitempty"`  // Next page
	Prev       *string   `json:"prev,omitempty"`  // Previous page
	Steps      []StepOut `json:"steps"`
	TotalCount *int      `json:"total_count,omitempty"` // Total number of results
}

I assume that the pagination is possible, so we need to handle it.

Comment thread controllers/upgradepipelinestep_controller.go

func (*UpgradePipelineStepController) applyStatus(cr *v1alpha1.UpgradePipelineStep, step upgradepipeline.StepOut) {
cr.Status.ID = step.StepId
cr.Status.LastValidation = &v1alpha1.UpgradePipelineStepLastValidationStatus{
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I noticed in some of our CRD statuses we set many empty fields. Does it make sense to check that fields are not-empty? WDYT?

@ndk ndk force-pushed the akarpov/nex-2532/upgrade-pipeline-steps branch from d7f3744 to 73e01e9 Compare May 25, 2026 05:02
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