Skip to content

fix(api, vm): add phase age printer column#2203

Open
danilrwx wants to merge 3 commits intomainfrom
fix/vm/add-uptime
Open

fix(api, vm): add phase age printer column#2203
danilrwx wants to merge 3 commits intomainfrom
fix/vm/add-uptime

Conversation

@danilrwx
Copy link
Copy Markdown
Contributor

@danilrwx danilrwx commented Apr 10, 2026

Description

Add the PhaseAge printer column to VirtualMachine brief output while keeping the existing Age column.

The new column is populated directly from the latest entry in .status.stats.phasesTransitions using the JSONPath expression .status.stats.phasesTransitions[-1].timestamp. This shows how long the VM has been in its current phase without introducing additional status fields.

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

Age is still useful because it shows resource lifetime, but it does not help answer an operational question: how long has the VM been in its current state.

PhaseAge complements Age by showing the duration of the current phase. This is useful for understanding whether a VM has just entered Running, has been stuck in Starting, or remains in another phase for too long.

What is the expected result?

  1. Create, start, stop, or restart a VirtualMachine.
  2. Run the brief VM listing.
  3. Verify the output contains both PhaseAge and Age.
  4. Verify PhaseAge reflects time since the latest phase transition.
  5. Verify Age still reflects time since resource creation.

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: module
type: fix
summary: "Add VM PhaseAge column while keeping Age in VirtualMachine brief output."

Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
@danilrwx danilrwx force-pushed the fix/vm/add-uptime branch from 0b0d65d to ecad030 Compare April 10, 2026 09:21
@danilrwx danilrwx added this to the v1.8.0 milestone Apr 10, 2026
@danilrwx danilrwx changed the title task(vm): show uptime in vm brief fix(api, vm): add phase age printer column Apr 10, 2026
@danilrwx danilrwx marked this pull request as ready for review April 10, 2026 11:56
@danilrwx danilrwx added the validation/skip/doc_changes Skip doc changes validation label Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

validation/skip/doc_changes Skip doc changes validation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant