Skip to content

feat(vmop): add superseded phase#2492

Open
danilrwx wants to merge 2 commits into
mainfrom
feat/vmop/add-superseded-phase
Open

feat(vmop): add superseded phase#2492
danilrwx wants to merge 2 commits into
mainfrom
feat/vmop/add-superseded-phase

Conversation

@danilrwx

@danilrwx danilrwx commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Description

Add a dedicated terminal Superseded phase for VirtualMachineOperation resources.

Technical changes:

  • Added VMOPPhaseSuperseded to the API enum and CRD schema.
  • Changed VMOP supersede handling to set status.phase=Superseded while keeping conditions[Completed].reason=Superseded.
  • Updated terminal phase checks, VM condition projection, CLI wait/output logic, and VMOP metrics.
  • Added/updated tests for supersede behavior, terminal phase handling, and finished timestamp metrics.
  • Updated CRD documentation, including Russian localization.

Why do we need it, and what problem does it solve?

Previously, VMOPs interrupted by a newer operation were reported as Completed with conditions[Completed].reason=Superseded.
This made superseded operations look like successfully completed operations unless clients inspected condition details.

A dedicated Superseded phase makes the terminal state explicit for users, automation, metrics, and CLI output.

What is the expected result?

  1. Create a VMOP that can be superseded by a newer VMOP for the same VM.
  2. Create a newer VMOP that supersedes it.
  3. Verify that the older VMOP has:
    • status.phase: Superseded
    • conditions[Completed].status: "True"
    • conditions[Completed].reason: Superseded
  4. Verify that CLI waits do not hang on Superseded VMOPs and metrics expose the Superseded phase.

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Changelog entries

section: api
type: feature
summary: Add the Superseded phase for VirtualMachineOperation resources interrupted by newer operations.

@danilrwx danilrwx added this to the v1.10.0 milestone Jun 16, 2026
danilrwx added 2 commits June 16, 2026 09:40
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
@danilrwx danilrwx force-pushed the feat/vmop/add-superseded-phase branch from a62ae41 to 29ceb47 Compare June 16, 2026 07:40
@danilrwx danilrwx marked this pull request as ready for review June 16, 2026 07:40
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.

1 participant