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

[jobs]Add max execution time #3191

Merged
merged 5 commits into from
Oct 25, 2024

Conversation

trasc
Copy link
Contributor

@trasc trasc commented Oct 4, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

[jobs] Add max execution time.

Adds a new label kueue.x-k8s.io/max-exec-time-seconds that can be used by any supported job to enforce
a maximum execution time for its workload.

Which issue(s) this PR fixes:

Related to #3125

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Support the Job-level API label, called `kueue.x-k8s.io/max-exec-time-seconds`, that users
can use to enforce the maximum execution time for their job. The execution time is only
accumulated when the Job is running (the corresponding Workload is admitted). 
The corresponding Workload is deactivated after the time is exceeded.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Oct 4, 2024
@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added 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 Oct 4, 2024
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Oct 4, 2024
Copy link

netlify bot commented Oct 4, 2024

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit 97fb529
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/671b7f0ff8fbb70008372acf

@trasc
Copy link
Contributor Author

trasc commented Oct 4, 2024

/test all

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 10, 2024
@trasc trasc force-pushed the max-exec-time-jobs branch from 108694f to 6d6c848 Compare October 23, 2024 14:57
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 23, 2024
@trasc
Copy link
Contributor Author

trasc commented Oct 23, 2024

/test all

@trasc trasc force-pushed the max-exec-time-jobs branch from 6d6c848 to 307167b Compare October 24, 2024 09:54
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Oct 24, 2024
@trasc
Copy link
Contributor Author

trasc commented Oct 24, 2024

/test all

@trasc trasc marked this pull request as ready for review October 24, 2024 10:17
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 24, 2024
@trasc
Copy link
Contributor Author

trasc commented Oct 24, 2024

/cc @tenzen-y

Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

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

Besically, lgtm

@tenzen-y
Copy link
Member

@trasc
Copy link
Contributor Author

trasc commented Oct 25, 2024

@tenzen-y
Copy link
Member

Additionally, could you add a max-exec label to https://github.com/kubernetes-sigs/kueue/blob/a9e198c295819db473c0bd3387fb564d1b829700/site/content/en/docs/reference/labels-and-annotations.md?

I have #3308 to cover the full implementation.

Oh, that makes sense. Let me review it, thank.

Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

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

Thank you!
/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 Oct 25, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: ab18488b313b1401017b4752198f3ba54d9aaffb

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tenzen-y, trasc

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 Oct 25, 2024
@k8s-ci-robot k8s-ci-robot merged commit 8b61732 into kubernetes-sigs:main Oct 25, 2024
16 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.9 milestone Oct 25, 2024
@trasc trasc deleted the max-exec-time-jobs branch October 25, 2024 12:11
@mimowo
Copy link
Contributor

mimowo commented Oct 28, 2024

/release-note-edit

Support the Job-level API label, called `kueue.x-k8s.io/max-exec-time-seconds`, that users
can use to enforce the maximum execution time for their job. The execution time is only
accumulated when the Job is running (the corresponding Workload is admitted).

@mimowo
Copy link
Contributor

mimowo commented Oct 28, 2024

/release-note-edit

Support the Job-level API label, called `kueue.x-k8s.io/max-exec-time-seconds`, that users
can use to enforce the maximum execution time for their job. The execution time is only
accumulated when the Job is running (the corresponding Workload is admitted). 
The corresponding Workload is deactivated after the time is exceeded.

PBundyra pushed a commit to PBundyra/kueue that referenced this pull request Nov 5, 2024
* [controllers][jobs] Add MaxExecutionTime to workloads.

* [webhooks][jobs] Validate MaxExecutionTime.

* [controllers][jobs] Update the workload when MaxExecutionTime changes.

* Rename `MaxExecTime` to `MaximumExecutionTimeSeconds`

* Review Remarks
kannon92 pushed a commit to openshift-kannon92/kubernetes-sigs-kueue that referenced this pull request Nov 19, 2024
* [controllers][jobs] Add MaxExecutionTime to workloads.

* [webhooks][jobs] Validate MaxExecutionTime.

* [controllers][jobs] Update the workload when MaxExecutionTime changes.

* Rename `MaxExecTime` to `MaximumExecutionTimeSeconds`

* Review Remarks
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.

4 participants