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 renovate to bump base image refs #275

Merged
merged 3 commits into from
Jan 24, 2025
Merged

Use renovate to bump base image refs #275

merged 3 commits into from
Jan 24, 2025

Conversation

ralphbean
Copy link
Member

And set automerge to true to put this on autopilot.

@ralphbean ralphbean requested a review from Zyzyx as a code owner January 7, 2025 12:46
webbnh
webbnh previously approved these changes Jan 7, 2025
Copy link
Collaborator

@webbnh webbnh left a comment

Choose a reason for hiding this comment

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

Looks OK to me.

However, in general, I'm not a fan of specifying the SHA hash on the container image references. I realize that I'm at odds with the increasingly prevailing attitude on this, but the practice tends to generate a lot of noise. On the other hand, enabling automerge will allow us to ignore the updates...which largely ameliorates the noise problem but kind of defeats the purpose of using the hash in the first place!

So, while I think using automerge is very attractive (and I'm inclined to support that), I would be inclined to omit the hash. (What exactly are we trying to accomplish by using the hash and would using a semantic version tag (instead of latest), instead, be a better approach?)

And set automerge to true to put this on autopilot.
It's more human readable.

I'm not 100% sure it will work like we want; but lets try it.
@ralphbean
Copy link
Member Author

(What exactly are we trying to accomplish by using the hash

Trying to accomplish deterministic updates. When we build anew, we know that we're building on a new base image, vs not. We know the last time we updated our base image easily from source, rather than trying to go divine it from the registry history.

would using a semantic version tag (instead of latest), instead, be a better approach?)

I've never tried it. Let's try it and see if renovate bumps it like we want it to.

@ralphbean ralphbean enabled auto-merge (squash) January 24, 2025 13:23
@ralphbean
Copy link
Member Author

/retest sync2jira-sync-page-on-pull-request

@ralphbean ralphbean requested a review from webbnh January 24, 2025 18:27
@ralphbean ralphbean disabled auto-merge January 24, 2025 20:53
@ralphbean ralphbean merged commit fb66780 into main Jan 24, 2025
5 checks passed
@ralphbean ralphbean deleted the renovate branch January 24, 2025 20:53
@webbnh
Copy link
Collaborator

webbnh commented Jan 24, 2025

What exactly are we trying to accomplish by using the hash

Trying to accomplish deterministic updates. When we build anew, we know that we're building on a new base image, vs not. We know the last time we updated our base image easily from source, rather than trying to go divine it from the registry history.

What specifying the hash accomplishes is the ability to re-build a given Git commit (assuming that the image referenced by the hash is still available when the rebuild is attempted). It really doesn't do much in terms of a new build (except to record what was used, in case we want to try to recreate it). (In terms of knowing what the last update was, we can tell that by looking at the previous image, which we'll probably end up doing even if we reference it by its hash.)

We might hope that the image targeted by the hash has somehow been blessed and is therefore "good". But, frankly, we hope the same of the image referenced by latest, so the hash doesn't gain us anything there, either.

I can see a scenario in which the hash gets updated asynchronously with respect to the build and where the image repository doesn't get updated (such that latest isn't actually the "latest") -- in that case, the build would either pull the referenced image or would fail -- and that would be a benefit; however, if the image repository were being properly managed (such that latest was an acceptable image), then we wouldn't care.

would using a semantic version tag (instead of latest), instead, be a better approach?

I've never tried it. Let's try it and see if renovate bumps it like we want it to.

Renovate can be configured to manage the image reference as either a semantic version tag or a hash; in both cases, it should update the value when there is a new referent available. The only real difference, if you trust in the concept and implementation of semantic versioning, is that using the hash requires frequent updates to the build files while using the semver tag only requires updates when the current version changes (and, if you reference a minor version the changes are infrequent, and if you reference a major version, they are very infrequent).

Nevertheless, if we trust Renovate, we can let it do the update without human involvement, in which case we just have to monitor the notifications (for failures), and we don't have to do anything on the successes. But, there would be less noise if we used semvers rather than hashes.

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