Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[kueuectl] Add EXEC TIME column on list workload command. #2977

Conversation

mbobrovskyi
Copy link
Contributor

@mbobrovskyi mbobrovskyi commented Sep 4, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

Add EXEC TIME column on kueuectl list workload command.

Which issue(s) this PR fixes:

Fixes #2972

Special notes for your reviewer:

Does this PR introduce a user-facing change?

CLI: Added EXEC TIME column on kueuectl list workload command.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 4, 2024
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 4, 2024
Copy link

netlify bot commented Sep 4, 2024

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit 82c50ef
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/66d87ec69e9dc200086e24aa

wantOut: `NAME JOB TYPE JOB NAME LOCALQUEUE CLUSTERQUEUE STATUS POSITION IN QUEUE AGE
wl1 j1 lq1 cq1 FINISHED 60m
wantOut: `NAME JOB TYPE JOB NAME LOCALQUEUE CLUSTERQUEUE STATUS POSITION IN QUEUE DURATION AGE
wl1 j1 lq1 cq1 FINISHED 60m 60m
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a test cases / or modify the exiting ones to cover the two scenarios:

  1. the workload is re-admitted
  2. the workload finished in the past (last transition time < now)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the workload finished in the past (last transition time < now)

We have a few tests with this condition. For example:

wantOut: `NAME JOB TYPE JOB NAME LOCALQUEUE CLUSTERQUEUE STATUS POSITION IN QUEUE DURATION AGE
wl1 j1 lq1 cq1 PENDING 60m
wl2 j2 lq2 cq2 ADMITTED 60m 120m
wl3 j3 lq3 cq3 FINISHED 60m 3h
`,

Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome, i missed that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the workload is re-admitted

I'm not clear on the difference between admitted and re-admitted, especially in the context of conditions. Are you asking if we should test with Admitted=false?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I think we don't need to test re-admission actually. My intention was to just test when lastTransitionTime for Admitted > creation time. Do we have that covered already too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Are you asking if we should test with Admitted=false?

This test cases I missed. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My intention was to just test when lastTransitionTime for Admitted > creation time.

I thought that it can't be possible... But I think we can add this case.
What should we need to print on this way? WDYT? Just empty line?

Copy link
Contributor

Choose a reason for hiding this comment

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

I just want to make sure the very basic scenario is covered, when Admitted=True, and the lastTransitionTime is later than creation time of the workload. This would be in practice almost all the time, but since we mock the timer, I'm not clear if this is tested.

@mimowo
Copy link
Contributor

mimowo commented Sep 4, 2024

/cc @trasc

@mimowo
Copy link
Contributor

mimowo commented Sep 4, 2024

I'm still thinking about a potentially better name for the column. Alternative names that come to my mind:

  • EXECUTION TIME
  • RUNTIME

I would be leaning towards EXECUTION TIME as more descriptive of the semantics, but the downside is that it is longer. Any preferences @alculquicondor @mwielgus @tenzen-y ?

EDIT: or maybe EXEC TIME?

@mwielgus
Copy link
Contributor

mwielgus commented Sep 4, 2024

I'm for EXEC TIME. RUNTIME is confusing (should it be "docker") and EXECUTION TIME unnecessarily long.

@alculquicondor
Copy link
Contributor

+1 on EXEC TIME

@mbobrovskyi mbobrovskyi changed the title [kueuectl] Add DURATION column on list workload command. [kueuectl] Add EXEC TIME column on list workload command. Sep 4, 2024
@alculquicondor
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 4, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 26dec89eb48fc8e540c86b2bb819c8bc3588389d

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alculquicondor, mbobrovskyi

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

The pull request process is described here

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 4, 2024
@k8s-ci-robot k8s-ci-robot merged commit 6701133 into kubernetes-sigs:main Sep 4, 2024
16 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.9 milestone Sep 4, 2024
@tenzen-y
Copy link
Member

tenzen-y commented Sep 4, 2024

I would be leaning towards EXECUTION TIME as more descriptive of the semantics, but the downside is that it is longer. Any preferences @alculquicondor @mwielgus @tenzen-y ?

EDIT: or maybe EXEC TIME?

SGTM

@mbobrovskyi mbobrovskyi deleted the feature/add-duration-column-on-list-workload-command branch September 4, 2024 16:52
kannon92 pushed a commit to openshift-kannon92/kubernetes-sigs-kueue that referenced this pull request Nov 19, 2024
…-sigs#2977)

* [kueuectl] Add DURATION column on list workload command.

* Add test cases with Admitted=false and Finished=false.

* Rename DURATION column to EXEC TIME.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[kueuectl] Show DURATION column with the Job runtime to complete
6 participants