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

Replace strings.TrimRight with strings.TrimSuffix #262

Merged
merged 1 commit into from
Nov 11, 2021

Conversation

relu
Copy link
Member

@relu relu commented Nov 11, 2021

TrimRight was not correctly used. It takes a set of characters as the
second argument and any chars matching the set on the right side of the
string would be trimmed. TrimSuffix does exactly what I originally
intended.

Fixes #261

TrimRight was not correctly used. It takes a set of characters as the
second argument and any chars matching the set on the right side of the
string would be trimmed. TrimSuffix does exactly what I originally
intended.

Signed-off-by: Aurel Canciu <[email protected]>
@relu relu requested a review from hiddeco November 11, 2021 12:44
@hiddeco hiddeco added the bug Something isn't working label Nov 11, 2021
@hiddeco hiddeco merged commit 1f5d134 into main Nov 11, 2021
@hiddeco hiddeco deleted the fix-setters-image-trim branch November 11, 2021 12:56
@stefanprodan
Copy link
Member

We need to do a release ASAP, IAC is broken for all users right?

@relu
Copy link
Member Author

relu commented Nov 11, 2021

Only for some (not-so-)edge cases, I think it can be affecting a lot of users.
One example is that all images that have names ending in v that use semver v prefixed tags are affected.

@hiddeco
Copy link
Member

hiddeco commented Nov 11, 2021

Think as a follow up, it would be neat if we can add a test to ensure we do not reintroduce the bug again. As apparently the current tests do not cover properly for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Image name gets cut off in kustomization
3 participants