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

feat(TaskRunSpec) : Add SchedulerName to TaskRunSpec #1790

Merged
merged 3 commits into from
Feb 18, 2020

Conversation

waveywaves
Copy link
Member

@waveywaves waveywaves commented Dec 25, 2019

Changes

Set scheduler in TaskRunSpec to execute Tasks with specific schedulers.
fixes #1739

Submitter Checklist

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

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

  • API changes
    SchedulerName added to TaskRunSpec
  • Any changes in behavior
    SchedulerName set in TaskRunSpec recorded by Pod so that the Pod is dispatched by the mentioned schduler.

@googlebot googlebot added the cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit label Dec 25, 2019
@tekton-robot tekton-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 25, 2019
@tekton-robot
Copy link
Collaborator

Hi @waveywaves. 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.

@imjasonh
Copy link
Member

/ok-to-test

Please add a test in pod_test.go to ensure this behaves as you expect.

@tekton-robot tekton-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 25, 2019
@waveywaves waveywaves changed the title feat(TaskRunSpec) : Add SchedulerName to TaskRunSpec feat(TaskRunSpec) : WIP : Add SchedulerName to TaskRunSpec Dec 26, 2019
@tekton-robot tekton-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 6, 2020
@waveywaves
Copy link
Member Author

@imjasonh I have added the tests, should I add the documentation as well ?

@waveywaves waveywaves changed the title feat(TaskRunSpec) : WIP : Add SchedulerName to TaskRunSpec feat(TaskRunSpec) : Add SchedulerName to TaskRunSpec Jan 6, 2020
@vdemeester
Copy link
Member

@imjasonh I have added the tests, should I add the documentation as well ?

@waveywaves yes pleas 👼 🤗


// SchedulerName specifies the scheduler to be used to dispath the Pod
// +optional
SchedulerName string `json:"schedulerName"`
Copy link
Member

Choose a reason for hiding this comment

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

I think we should put this in PodTemplate, that's where we've been putting fields that are specific to how the underlying pod will be configured.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have updated the PR accordingly.

@waveywaves waveywaves force-pushed the feat/scheduler-name branch 2 times, most recently from 36c2d7b to c842b3f Compare January 14, 2020 06:58
@waveywaves
Copy link
Member Author

/retest

@@ -87,4 +87,8 @@ type PodTemplate struct {
// default.
// +optional
PriorityClassName *string `json:"priorityClassName,omitempty" protobuf:"bytes,7,opt,name=priorityClassName"`

// SchedulerName specifies the scheduler to be used to dispath the Pod
//+optional
Copy link

Choose a reason for hiding this comment

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

two minor nits:

dispath -> dispatch

//+optional -> // +optional

Copy link
Member Author

Choose a reason for hiding this comment

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

I will make these changes. Thanks for checking thi out.

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbwsg

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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 7, 2020
@ghost
Copy link

ghost commented Feb 7, 2020

@waveywaves thanks for the PR! Once this is rebased on top of latest master and nits addressed I'll /lgtm and we should be able to get this merged. thanks again

Set scheduler in PodTemplate to execute Tasks with specific schedulers.
This test checks if the schedulerName has passed down from the
TaskRunSpec to the PodSpec
@waveywaves
Copy link
Member Author

@vdemeester Can you PTAL at the docs ? Let me know if there need to be any changes.

@waveywaves
Copy link
Member Author

@sbwsg I have updated the PR with the necessary changes. Let me know if I need to make more changes.

@ghost
Copy link

ghost commented Feb 18, 2020

/lgtm

@tekton-robot tekton-robot assigned ghost Feb 18, 2020
@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 18, 2020
@ghost
Copy link

ghost commented Feb 18, 2020

/test pull-tekton-pipeline-integration-tests

@tekton-robot tekton-robot merged commit bf1f620 into tektoncd:master Feb 18, 2020
@kfox1111
Copy link

Just curious, has anyone tested this with kube-batch/volcano?

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. cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support custom Pod scheduler
6 participants