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

Pull container image when out of date #272

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

JamieMagee
Copy link
Contributor

@JamieMagee JamieMagee commented Feb 8, 2024

This change adds an additional step to the pullImage function to query the relevant container registry and find the current digest for the tag we specify. We then compare it with the digest of the image we have locally. If they don't match, we attempt to pull the image.

internal/infra/run.go Outdated Show resolved Hide resolved
@jakecoffman
Copy link
Member

I just tested this locally, since I build local ARM versions I'd have to remember to add --pull=false to test things I am building locally. Is it as this point we add a dependabot config command to set ~/.dependabot configurable defaults?

@JamieMagee
Copy link
Contributor Author

No, that's going to add too much complexity IMO. I'll have to do:

Exists locally Doesn't exist locally
Exists remotely Compare digest Pull
Doesn't exist remotely Continue with local image 🤷

@JamieMagee JamieMagee force-pushed the jamiemagee/always-pull-container-image branch 4 times, most recently from fd5ce42 to 603cbbe Compare February 12, 2025 19:09
@JamieMagee JamieMagee changed the title Always pull the container image Pull container image when out of date Feb 12, 2025
@JamieMagee
Copy link
Contributor Author

I've updated this PR to compare digests first, instead of just blindly pulling the latest container.

@JamieMagee JamieMagee marked this pull request as ready for review February 12, 2025 21:15
@JamieMagee JamieMagee requested a review from a team as a code owner February 12, 2025 21:15
@JamieMagee
Copy link
Contributor Author

Smoke test failures appear to be unrelated to my changes.

@JamieMagee JamieMagee force-pushed the jamiemagee/always-pull-container-image branch from 92da610 to 151fa1d Compare February 14, 2025 18:31
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