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 label and annotation selector code. #3279

Merged
merged 3 commits into from
Nov 29, 2020

Conversation

monopole
Copy link
Contributor

@monopole monopole commented Nov 25, 2020

See comments in api/internal/k8sgen/doc.go

Fermez #2893

@k8s-ci-robot k8s-ci-robot added do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 25, 2020
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Nov 25, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: monopole

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 Nov 25, 2020
Copy link
Contributor

@Shell32-Natsu Shell32-Natsu left a comment

Choose a reason for hiding this comment

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

I am curious is it the best solution to copy these files?

api/internal/k8sgen/generator/go.mod Outdated Show resolved Hide resolved
@@ -163,13 +164,21 @@ func (wn *WNode) MarshalJSON() ([]byte, error) {
}

// MatchesAnnotationSelector implements ifc.Kunstructured.
func (wn *WNode) MatchesAnnotationSelector(string) (bool, error) {
panic("TODO(#WNode) MatchesAnnotationSelector; implement or drop from API")
func (wn *WNode) MatchesAnnotationSelector(selector string) (bool, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not pretty confident about copying these files so we should have some tests for these functions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ack, will move down into kyaml as discussed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

WNode implementation is now just a delegation to RNode, consistent with the plans to ditch WNode as soon as #2506 closes.

Tests added for the RNode code.

Added more of an explanation to k8sgen/doc.go

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 25, 2020
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 25, 2020
@monopole monopole removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Nov 25, 2020
@monopole monopole marked this pull request as draft November 25, 2020 22:10
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 25, 2020
@k8s-ci-robot k8s-ci-robot added the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Nov 26, 2020
@monopole monopole force-pushed the addGeneratedCode branch 9 times, most recently from d7969b8 to 2014bbb Compare November 26, 2020 16:03
@monopole monopole removed do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Nov 26, 2020
@monopole monopole marked this pull request as ready for review November 26, 2020 16:11
@k8s-ci-robot k8s-ci-robot added the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Nov 26, 2020
@monopole monopole removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Nov 26, 2020
@monopole
Copy link
Contributor Author

/test

@k8s-ci-robot
Copy link
Contributor

@monopole: The /test command needs one or more targets.
The following commands are available to trigger jobs:

  • /test kustomize-presubmit-master

Use /test all to run all jobs.

In response to this:

/test

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.

@monopole
Copy link
Contributor Author

/test all

@k8s-ci-robot k8s-ci-robot added the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Nov 26, 2020
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Nov 26, 2020
@monopole
Copy link
Contributor Author

@Shell32-Natsu ready for review, thanks

@Shell32-Natsu
Copy link
Contributor

@monopole
Copy link
Contributor Author

Thanks. Sent out kubernetes/test-infra#20056, but don't want to wait for it as there are almost 100 pr's in the queue.

Disabled re-generation for now. The generate code is committed to source control regardless, so regenerating each time is just a test of the build environment on prow. Nice, but not vital.

@Shell32-Natsu
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 29, 2020
@k8s-ci-robot k8s-ci-robot merged commit e8c8545 into kubernetes-sigs:master Nov 29, 2020
@monopole monopole deleted the addGeneratedCode branch November 30, 2020 13:25
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants