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

Controlling max parallel jobs per pipeline[WIP] #3112

Closed
wants to merge 1 commit into from

Conversation

NikeNano
Copy link

This PR adds logic to allow for a maximum nbr of parallel task to run concurrency. This is done by validating how many task is runing before a new task is runing. If there are more than the set maximum the controller omit creating a new.

Changes

This PR updates the PipelineRun controller to check how TaskRuns are running for the PipelineRun and if it is more concurrent jobs than a limit specified in the PipelineRunSpec the TaskRun will not be created.

This is related to: #2591 and more specifically this comment: #2591 (comment)

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes tests (if functionality changed/added)
  • Includes docs (if user facing)
  • Commit messages follow commit message best practices
  • Release notes block has been filled in or deleted (only if no user facing changes)

See the contribution guide for more details.

Double check this list of stuff that's easy to miss:

Reviewer Notes

If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.

Release Notes

This PR adds logic to allow for a maximum nbr of parallel task to run concurrency. This is done by validating how many task is runing before a new task is runing. If there are more than the set maximum the controller omit creating a new.
@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Aug 18, 2020
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign afrittoli
You can assign the PR to them by writing /assign @afrittoli in a comment when ready.

The full list of commands accepted by this bot can be found 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

@tekton-robot tekton-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 18, 2020
@tekton-robot
Copy link
Collaborator

Hi @NikeNano. Thanks for your PR.

I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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/test-infra repository.

@NikeNano NikeNano marked this pull request as draft August 18, 2020 12:32
@NikeNano
Copy link
Author

@jlpettersson I read your comment on how to solve #2591, do you have to possibility to review this WIP? Thanks

@jerop
Copy link
Member

jerop commented Aug 24, 2020

@NikeNano this issue might need a TEP so that we can discuss the change

cc @bobcatfish

@NikeNano
Copy link
Author

Thanks @jerop, I will create a TEP

@NikeNano this issue might need a TEP so that we can discuss the change

@NikeNano
Copy link
Author

FYI: Have to do this after vacation so will take a week or two.

@jerop
Copy link
Member

jerop commented Oct 5, 2020

@NikeNano do you plan to write a TEP for this? there's more related discussion in #1305 that could be helpful -- happy to help with the TEP if needed

/kind feature

@tekton-robot tekton-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 5, 2020
@NikeNano
Copy link
Author

NikeNano commented Oct 6, 2020

Thank you for the ping @jerop! Missed this after the vacation. Will pick it up, would be great with some help. I will create a draft and tag you.

@ghost
Copy link

ghost commented Nov 13, 2020

/retest

@tekton-robot
Copy link
Collaborator

@NikeNano: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-tekton-pipeline-unit-tests 4dd4a63 link /test tekton-pipeline-unit-tests
pull-tekton-pipeline-build-tests 4dd4a63 link /test pull-tekton-pipeline-build-tests
pull-tekton-pipeline-integration-tests 4dd4a63 link /test pull-tekton-pipeline-integration-tests

Full PR test history. Your PR dashboard.

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/test-infra repository. I understand the commands that are listed here.

@tekton-robot
Copy link
Collaborator

@NikeNano: PR needs rebase.

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/test-infra repository.

@tekton-robot tekton-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 5, 2020
@tekton-robot
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale with a justification.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 5, 2021
@NikeNano NikeNano closed this Mar 8, 2021
@javlonsodikov
Copy link

hello Team

Any news on this issue? we need parallel runs in the project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants