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

Switch to distribution/distribution vs regex hacking for image url pa… #876

Merged
merged 9 commits into from
Oct 11, 2022

Conversation

jeff-mccoy
Copy link
Contributor

@jeff-mccoy jeff-mccoy commented Oct 10, 2022

This PR removes the Frankenstein regex we were using for parsing docker image references and instead uses the same code that the docker registry itself uses for parsing references to handle various edges cases. SHA1 hashes are also replaced with CRC32 for images and git URLs.

The image replacement also should support image digests, but more work will need to be done on the usage of crane for image push/pull as digests are not yet preserved.

@jeff-mccoy jeff-mccoy marked this pull request as ready for review October 11, 2022 03:52
@jeff-mccoy jeff-mccoy requested review from YrrepNoj and Racer159 and removed request for YrrepNoj October 11, 2022 06:56
Copy link
Contributor

@YrrepNoj YrrepNoj left a comment

Choose a reason for hiding this comment

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

I have some minor concerns with how we define the seed image tag. I don't have any real issues if this gets merged in as is, but I wanted to have a quick conversation about it first.

src/config/config.go Show resolved Hide resolved
@jeff-mccoy jeff-mccoy merged commit d860bb9 into master Oct 11, 2022
@bdfinst bdfinst deleted the external-services-cleanup branch February 1, 2023 13:47
Noxsios pushed a commit that referenced this pull request Mar 8, 2023
#876)

This PR removes the Frankenstein regex we were using for parsing docker
image references and instead uses the same code that the docker registry
itself uses for parsing references to handle various edges cases. SHA1
hashes are also replaced with CRC32 for images and git URLs.

The image replacement also should support image digests, but more work
will need to be done on the usage of crane for image push/pull as
digests are not yet preserved.
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.

2 participants