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

Fix image updater overreach #5258

Closed
wants to merge 1 commit into from

Conversation

mgazza
Copy link

@mgazza mgazza commented Aug 4, 2023

Stop image updater erroring when encountering fields named image but are not what it expects

closes #5257

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 4, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: mgazza / name: Mark Gascoyne (5d5dc43)

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mgazza
Once this PR has been reviewed and has the lgtm label, please assign natasha41575 for approval. For more information see the Kubernetes Code Review Process.

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 cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Aug 4, 2023
@k8s-ci-robot
Copy link
Contributor

Welcome @mgazza!

It looks like this is your first PR to kubernetes-sigs/kustomize 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/kustomize has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@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 Aug 4, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @mgazza. 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 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 4, 2023
Stop image updater erroring when encountering fields named image
but are not what it expects

closes kubernetes-sigs#5257
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Aug 4, 2023
@Aisuko
Copy link

Aisuko commented Sep 15, 2023

/assign

@Aisuko
Copy link

Aisuko commented Sep 15, 2023

/ok-to-test

@k8s-ci-robot
Copy link
Contributor

@Aisuko: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/ok-to-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.

@Aisuko
Copy link

Aisuko commented Sep 15, 2023

/test

@k8s-ci-robot
Copy link
Contributor

@Aisuko: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

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.

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 15, 2023
@annasong20
Copy link
Contributor

annasong20 commented Sep 27, 2023

@mgazza Thanks for initiating a fix! The problem is I can see users having the opposite problem as #5257. They expect the transformation to have applied when Kustomize does not throw an error, but are surprised to learn that Kustomize failed silently. I think the correct course of action is to announce that images will no longer operate on just any field named containers or initContainers with the legacy filter deprecation. Feel free to contribute to #5325!

Will leave this PR open for discussion, but if you agree, please close.

@mgazza
Copy link
Author

mgazza commented Sep 27, 2023

I agree, however, I think deprecation may take some time to reach my use case. Can we instead of erroring out in the meantime log a warning?

@natasha41575
Copy link
Contributor

natasha41575 commented Sep 29, 2023

@mgazza Changing the error to a warning will be a breaking change and will still have all the unintended consequences that @annasong20 described in #5258 (comment).

I empathize with your use case, but it seems like an unfortunate (and seemingly uncommon) edge case, and I don't think that there is a good reason here to break others' workflows and cause confusion. We briefly considered maybe making this a configurable option, but if we do that we would have to add, review, document, and then eventually also deprecate the new option. This would be just as much work if not more work than just completing #5325.

We already have a path forward here (#5325), and if you'd like that to move forward you can contribute to it directly. It is not a super big issue and shouldn't be more than 1-2 weeks of dedicated work, so I feel that it doesn't make sense to try to find quick fixes to work around it. Yes, it will take time to see it through to the end, but I would much rather have us spend a month fixing the issue the right way, than introduce a UX-impacting quick fix that has unintended consequences that take us many months to undo.

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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

Kustomize tries to patch images on unknown GVK's
5 participants