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

Use strings.TrimRight to determine image name #257

Merged
merged 1 commit into from
Nov 8, 2021

Conversation

relu
Copy link
Member

@relu relu commented Nov 4, 2021

This is to prevent a slice bounds out of range error.

Fixes #243

@relu relu requested a review from squaremo November 4, 2021 20:35
@relu relu force-pushed the slice-bounds-range-image-name branch from cac285c to e85d5e6 Compare November 4, 2021 20:35
This is to prevent a slice bounds out of range error.

Fixes #243

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
@relu relu force-pushed the slice-bounds-range-image-name branch from e85d5e6 to bdf73cb Compare November 5, 2021 12:16
Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

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

This does not seem to do exactly the same as the previous logic: https://play.golang.org/p/nFtkz2oNQPl

@relu
Copy link
Member Author

relu commented Nov 8, 2021

@hiddeco image is expected to be in the form of <registry>/<image>:<tag> not <registry>/<image>.

https://github.com/fluxcd/image-automation-controller/pull/257/files#diff-7bb22be8862bbcb39aada7a12bde07d0efa255fcffc9e4645b2957bd7e531e98L145

image := policy.Status.LatestImage

@hiddeco hiddeco merged commit ab1b200 into main Nov 8, 2021
@hiddeco hiddeco deleted the slice-bounds-range-image-name branch November 8, 2021 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slice bounds out of range
3 participants