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

running kubectl apply in higher level #211

Closed
wants to merge 1 commit into from

Conversation

xuzhenglun
Copy link
Contributor

@xuzhenglun xuzhenglun commented Mar 24, 2022

What this PR does / why we need it:

fix #201

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Additional documentation:

@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. 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 Mar 24, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @xuzhenglun. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 24, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: xuzhenglun
To complete the pull request process, please assign pwittrock after the PR has been reviewed.
You can assign the PR to them by writing /assign @pwittrock 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

@k8s-ci-robot k8s-ci-robot added the sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. label Mar 24, 2022
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 24, 2022
@xuzhenglun xuzhenglun force-pushed the fix-201 branch 2 times, most recently from 052672d to 4afb81d Compare March 25, 2022 02:48
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 25, 2022
@xuzhenglun xuzhenglun force-pushed the fix-201 branch 3 times, most recently from 8cad241 to b390bde Compare March 25, 2022 03:34
@xuzhenglun xuzhenglun changed the title [WIP] fix #201 running kubectl apply in higher level fix #201 running kubectl apply in higher level Mar 25, 2022
@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 Mar 25, 2022
@xuzhenglun
Copy link
Contributor Author

/hold cancel

@xuzhenglun xuzhenglun changed the title fix #201 running kubectl apply in higher level running kubectl apply in higher level Mar 25, 2022
@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 Mar 25, 2022
@xuzhenglun
Copy link
Contributor Author

@atoato88

please take a look at this PR too. thanks

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 28, 2022
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 28, 2022
panic("implement me")
}

func NewCmdApply(ioStreams genericclioptions.IOStreams) (*cobra.Command, *apply.ApplyOptions) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you copy some codes from k/kubectl?
IMHO, it's good not to copy, but use modules.
I think DirectApplier is implementend with something tricky way.

Recently, we started these topics related with prune functionality at #201.
We may have to have discussion at #201.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, It's copied from k/kubectl. In the NewCmdApply function, ApplyOptions is never returned, so I didn't find a way to reuse that piece of code.

In the previous implementation, some codes are copied from Complete too, with some customize modification, Which can be very easy to make mistakes. I agreedDirectApplier is implemented very trickly indeed.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 3, 2022
@k8s-ci-robot
Copy link
Contributor

@xuzhenglun: 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.

@xuzhenglun
Copy link
Contributor Author

I believe that #217 fixes #201 too, and we can close this PR now.

@xuzhenglun xuzhenglun closed this Jun 6, 2022
@jcanseco
Copy link
Contributor

jcanseco commented Jun 9, 2022

(Deleted reply; wrong thread)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No pruning with NewDirectApplier
4 participants