Skip to content

istio: map Phase field to StopAfter checkpoints in pipeline runner#5943

Closed
trevorwilliams2025 wants to merge 3 commits into
Azure:mainfrom
trevorwilliams2025:istio-phase-mapping
Closed

istio: map Phase field to StopAfter checkpoints in pipeline runner#5943
trevorwilliams2025 wants to merge 3 commits into
Azure:mainfrom
trevorwilliams2025:istio-phase-mapping

Conversation

@trevorwilliams2025

@trevorwilliams2025 trevorwilliams2025 commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

What

Map the IstioUpgradeStep.Phase field to internal StopAfter checkpoints in the pipeline runner.

Why

The Phase field (added in Azure/ARO-Tools#264) enables splitting Istio upgrades into discrete pipeline steps. This PR adds the consuming code that maps "install" to StopAfterCanaryStart (installs new control plane, stops before workload migration) and lets "upgrade" or empty run the full lifecycle. Splitting gives each phase its own EV2 timeout budget and allows a Helm config step to run between control plane installation and workload migration. The pipeline wiring (svc-pipeline.yaml) will follow in a subsequent PR.

Testing

The switch statement is a straightforward mapping with an error default. The StopAfter checkpoint logic is already covered by existing tests in tooling/templatize/pkg/istio/upgrade_test.go. Integration validation was performed manually against pers-dev.

Special notes for your reviewer

Depends on Azure/ARO-Tools#264 (Phase field).

PR Checklist

  • PR is scoped to a single task (no mixed concerns)
  • Title follows Conventional Commits format
  • Summary explains the "Why" behind the change
  • Linked to relevant ticket/issue
  • Screenshots included (if graph/UI/metrics changes)
  • Self-reviewed the diff
  • CI/CD checks are passing (ignore Tide)
  • Draft PR used for WIP (if applicable)
  • Commit history is clean (rebased/squashed)
  • Tricky code blocks are commented
  • Specific reviewers tagged
  • All comment threads resolved before merge

If E2E tests are included:

  • E2E tests follow Principles of Good E2E Test Case Design
  • If new E2E use case is covered (via a new test or new check/verifier),
    demonstrate that the test is able to detect a defect/error and fail with
    proper error message and logs which communicates nature of the problem.

Copilot AI review requested due to automatic review settings July 7, 2026 03:58
@openshift-ci

openshift-ci Bot commented Jul 7, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: trevorwilliams2025
Once this PR has been reviewed and has the lgtm label, please assign janboll for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copilot AI left a comment

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.

Pull request overview

This PR updates the templatize pipeline runner’s Istio upgrade step handling to interpret the upstream types.IstioUpgradeStep.Phase field and translate it into internal Istio upgrade “stop-after” checkpoints, enabling split-phase upgrades (e.g., install control plane only vs full upgrade).

Changes:

  • Map Phase=="install" to opts.StopAfter = istio.StopAfterCanaryStart.
  • Treat Phase=="upgrade" or empty as “run full lifecycle” (no stop-after checkpoint).
  • Reject unknown phase values with an explicit error.

Comment thread tooling/templatize/pkg/pipeline/istio.go Outdated
Comment thread tooling/templatize/pkg/pipeline/istio.go Outdated
@trevorwilliams2025

Copy link
Copy Markdown
Collaborator Author

/test images

@openshift-ci

openshift-ci Bot commented Jul 7, 2026

Copy link
Copy Markdown

@trevorwilliams2025: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/verify 0594c20 link true /test verify
ci/prow/test-unit 0594c20 link true /test test-unit
ci/prow/e2e-images 094da0b link true /test e2e-images
ci/prow/lint 094da0b link true /test lint
ci/prow/periodic-healthcheck-images 094da0b link true /test periodic-healthcheck-images
ci/prow/image-updater-images 094da0b link true /test image-updater-images
ci/prow/config-change-detection 094da0b link true /test config-change-detection
ci/prow/e2e-parallel 094da0b link true /test e2e-parallel
ci/prow/images 094da0b link true /test images

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

When ActionResume fires with StopAfter=canary-start, the install
phase work is already done (both control planes running). Return
early instead of running the full post-install lifecycle, which
belongs to the upgrade phase step.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants