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

Add NodeSelectors to Build and BuildRun objects #1683

Merged
merged 3 commits into from
Oct 23, 2024

Conversation

dorzel
Copy link
Contributor

@dorzel dorzel commented Sep 17, 2024

Changes

Allows NodeSelector to be set on Build and BuildRun objects.

Fixes #1635

Submitter Checklist

  • Includes tests if functionality changed/was added
  • Includes docs if changes are user-facing
  • Set a kind label on this PR
  • Release notes block has been filled in, or marked NONE

See the contributor guide
for details on coding conventions, github and prow interactions, and the code review process.

Release Notes

Added NodeSelector on Build and BuildRun objects, which enables specifying the scheduling behavior of TaskRuns.

@openshift-ci openshift-ci bot added the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label Sep 17, 2024
@pull-request-size pull-request-size bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Sep 17, 2024
@adambkaplan adambkaplan self-assigned this Sep 26, 2024
@qu1queee
Copy link
Contributor

hi @dorzel. We will check soon your PR, sorry for the delay.

@dorzel
Copy link
Contributor Author

dorzel commented Sep 27, 2024

hi @dorzel. We will check soon your PR, sorry for the delay.

Ah, no problem and no rush at all. Looks like I have some test fixes to look into

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 2, 2024
@pull-request-size pull-request-size bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 2, 2024
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 2, 2024
@dorzel
Copy link
Contributor Author

dorzel commented Oct 2, 2024

/kind feature

@openshift-ci openshift-ci bot added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 2, 2024
pkg/reconciler/buildrun/resources/taskrun.go Outdated Show resolved Hide resolved
test/v1beta1_samples/build_samples.go Outdated Show resolved Hide resolved
pkg/reconciler/buildrun/resources/taskrun_test.go Outdated Show resolved Hide resolved
@openshift-ci openshift-ci bot added release-note Label for when a PR has specified a release note and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Oct 3, 2024
pkg/validate/nodeselector.go Outdated Show resolved Hide resolved
Copy link
Member

@SaschaSchwarze0 SaschaSchwarze0 left a comment

Choose a reason for hiding this comment

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

/approve

Copy link
Contributor

openshift-ci bot commented Oct 12, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SaschaSchwarze0

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 12, 2024
@dorzel
Copy link
Contributor Author

dorzel commented Oct 22, 2024

Hi @adambkaplan, would you be able to take a look now that we have tests passing? Thank you!

Copy link
Member

@adambkaplan adambkaplan left a comment

Choose a reason for hiding this comment

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

/lgtm

This looks great! No blocking items from me, let's bring this in!

Comment on lines +240 to +244
if len(taskRunNodeSelector) > 0 {
expectedTaskRun.Spec.PodTemplate = &pod.PodTemplate{
NodeSelector: taskRunNodeSelector,
}
}
Copy link
Member

Choose a reason for hiding this comment

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

style nit (not blocking): we should initialize the expectedTaskRun pod template to an empty instance earlier than here. This will help when future contributors add the other parts of SHIP-0039.

Copy link
Member

Choose a reason for hiding this comment

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

👍 nice test suite!

Copy link
Member

Choose a reason for hiding this comment

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

👍 nice test suite!

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 23, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit a2b53df into shipwright-io:main Oct 23, 2024
17 checks passed
@dorzel dorzel deleted the MULTIARCH-4975 branch October 23, 2024 18:39
@SaschaSchwarze0 SaschaSchwarze0 added the kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API label Nov 11, 2024
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. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note Label for when a PR has specified a release note size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

SHIP-0039: Allow node selector on Build and BuildRun to be set
5 participants