Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

WIP: kustomize edit fix command will copy and compare output #3891

Closed

Conversation

natasha41575
Copy link
Contributor

@natasha41575 natasha41575 commented May 11, 2021

This addresses a small part of #3849. kustomize edit fix should compare the new output against the old, and throw an error if they don't match.

I was struggling to write a test case in which this throws an error, because I was having trouble thinking of an existing scenario when kustomize edit fix wouldn't produce the same output. Some suggestions for potential tests will be helpful, and there will be more tests for failure cases after the next PR, which will convert vars to replacements.

ALLOW_MODULE_SPAN

EDIT: There is a lint issue: #3663; and fixed for kyaml by this commit here. The first commit in this PR brought up the same problem, but for the kustomize module. The second commit in this PR fixes it by downgrading golangci-lint for the kustomize module to v1.17.0.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 11, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: natasha41575

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 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 11, 2021
@k8s-ci-robot k8s-ci-robot requested review from KnVerey and pwittrock May 11, 2021 19:45
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 11, 2021
@natasha41575
Copy link
Contributor Author

/retest

@natasha41575 natasha41575 force-pushed the KustomizeFix branch 3 times, most recently from 9948ce2 to b0504b4 Compare May 11, 2021 21:18
@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 May 11, 2021
@natasha41575 natasha41575 changed the title update kustomize fix command to copy and compare output kustomize edit fix command will copy and compare output May 11, 2021
@natasha41575 natasha41575 force-pushed the KustomizeFix branch 7 times, most recently from afc5298 to ab8f7ca Compare May 11, 2021 22:12
@natasha41575 natasha41575 requested a review from monopole May 11, 2021 22:17
@natasha41575 natasha41575 changed the title kustomize edit fix command will copy and compare output WIP: kustomize edit fix command will copy and compare output May 11, 2021
@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 May 11, 2021
@natasha41575 natasha41575 changed the title WIP: kustomize edit fix command will copy and compare output kustomize edit fix command will copy and compare output May 12, 2021
@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 May 12, 2021
@monopole
Copy link
Contributor

Please pull the golang lint change to it's own PR.

@natasha41575 natasha41575 changed the title kustomize edit fix command will copy and compare output WIP: kustomize edit fix command will copy and compare output May 13, 2021
@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 May 13, 2021
@natasha41575
Copy link
Contributor Author

closing this PR until we have a better solution

# for free to join this conversation on GitHub. Already have an account? # 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. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. 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.

3 participants