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

Removed no-empty validation of nodeSelectorTerm.matchExpressions. #62448

Merged
merged 1 commit into from
Apr 17, 2018

Conversation

k82cn
Copy link
Member

@k82cn k82cn commented Apr 12, 2018

Signed-off-by: Da K. Ma klaus1982.cn@gmail.com

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
part of #62002

Release note:

Pod affinity `nodeSelectorTerm.matchExpressions` may now be empty, and works as previously documented: nil or empty `matchExpressions` matches no objects in scheduler.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 12, 2018
@k82cn
Copy link
Member Author

k82cn commented Apr 12, 2018

/retest

@k82cn
Copy link
Member Author

k82cn commented Apr 14, 2018

/cc @liggitt

@k82cn k82cn changed the title WIP: Removed no-empty validation of nodeSelectorTerm.matchExpressions. Removed no-empty validation of nodeSelectorTerm.matchExpressions. Apr 14, 2018
@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 Apr 14, 2018
// if len(term.MatchExpressions) == 0 {
// return append(allErrs, field.Required(fldPath.Child("matchExpressions"), "must have at least one node selector requirement"))
// }

Copy link
Member

Choose a reason for hiding this comment

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

Remove rather than comment?

@liggitt
Copy link
Member

liggitt commented Apr 14, 2018

Nit on removing code rather than commenting it out… I don't anticipate this validation returning.

LGTM otherwise, this makes the code behave as documented, and be forward compatible with field selector additions. A second from @kubernetes/api-reviewers would also be good.

Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
@k82cn
Copy link
Member Author

k82cn commented Apr 14, 2018

/retest

@liggitt liggitt added this to the v1.10 milestone Apr 14, 2018
@liggitt
Copy link
Member

liggitt commented Apr 14, 2018

cc @kubernetes/sig-scheduling-api-reviews

@k8s-ci-robot k8s-ci-robot added sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API labels Apr 14, 2018
@liggitt liggitt added kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Apr 14, 2018
@k82cn
Copy link
Member Author

k82cn commented Apr 17, 2018

ping @kubernetes/api-reviewers for comments, some other feature dependent on that PR :)

@liggitt
Copy link
Member

liggitt commented Apr 17, 2018

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: k82cn, liggitt

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 Apr 17, 2018
@k82cn
Copy link
Member Author

k82cn commented Apr 17, 2018

/retest

@k8s-github-robot
Copy link

[MILESTONENOTIFIER] Milestone Pull Request Needs Approval

@k82cn @liggitt @kubernetes/sig-scheduling-misc

Action required: This pull request must have the status/approved-for-milestone label applied by a SIG maintainer. If the label is not applied within 4 days, the pull request will be moved out of the v1.10 milestone.

Pull Request Labels
  • sig/scheduling: Pull Request will be escalated to these SIGs if needed.
  • priority/important-soon: Escalate to the pull request owners and SIG owner; move out of milestone after several unsuccessful escalation attempts.
  • kind/bug: Fixes a bug discovered during the current release.
Help

@liggitt
Copy link
Member

liggitt commented Apr 17, 2018

/retest

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

1 similar comment
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@k82cn
Copy link
Member Author

k82cn commented Apr 17, 2018

/retest

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 62448, 59317, 59947, 62418, 62352). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 084715a into kubernetes:master Apr 17, 2018
@k82cn k82cn deleted the k8s_62002 branch April 17, 2018 23:31
@liggitt
Copy link
Member

liggitt commented Apr 18, 2018

Thanks. Can you pick this to 1.10 as well?

@k8s-ci-robot
Copy link
Contributor

@k82cn: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-e2e-gce d8e6dbf link /test pull-kubernetes-e2e-gce

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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.

k8s-github-robot pushed a commit that referenced this pull request Apr 20, 2018
…upstream-release-1.10

Automatic merge from submit-queue.

Automated cherry pick of #62448: Removed no-empty validation of nodeSelectorTerm.matchExpressions.

Cherry pick of #62448 on release-1.10.

#62448: Removed no-empty validation of nodeSelectorTerm.matchExpressions.
satyasm pushed a commit to satyasm/kubernetes that referenced this pull request Apr 25, 2018
Automatic merge from submit-queue (batch tested with PRs 62982, 63075, 63067, 62877, 63141). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Removed e2e test on empty NodeAffinity.

Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes kubernetes#63027 

**Special notes for your reviewer**:
In kubernetes#62448, we removed the validation on empty `nodeAffinity` which is already handled in scheduler: select no objects.

**Release note**:
```release-note
None
```
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/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. milestone/needs-approval priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. 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.

None yet

5 participants