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

For every canary image build, create an image tag with the commit sha #2202

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

Conversation

alco
Copy link
Member

@alco alco commented Dec 20, 2024

Addresses #1921.

@alco alco requested review from magnetised and robacourt December 20, 2024 11:27
@alco alco changed the title For every canary image build, create a tag with the commit sha For every canary image build, create an image tag with the commit sha Dec 20, 2024
Copy link
Contributor

@icehaunter icehaunter left a comment

Choose a reason for hiding this comment

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

I like the idea, but I don't like having a spammed list of tags on DockerHub. A bit sad that we can't have both

Copy link
Contributor

@magnetised magnetised left a comment

Choose a reason for hiding this comment

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

looks good. perhaps to avoid spamming the main image with random tags, @icehaunter, we could push the canary images as electricsql/electric-canary:latest and electricsql/electric-canary:$sha as well as keeping electricsql/electric:canary for backwards compatibility.

i stand by the requirement: it's really important to send an image tag and know that it's not going to change between sending it and it being pulled by the user.

you can just share shas but it provides no documentation to us or the user which version they're running - having the commit sha in the image at least allows for some introspection.

@alco
Copy link
Member Author

alco commented Feb 5, 2025

@magnetised

i stand by the requirement: it's really important to send an image tag and know that it's not going to change between sending it and it being pulled by the user.

What use cases require such a canary tag to be sent to a user?

Upon taking another look at this change, I wouldn't want to fill up our Docker Hub repo with lots of tags. We may hit an internal limit there or cause the UI to slow down, etc. Canary builds are transient anyway.

If the main purpose is being able to tell which version of Electric is being run, that is solved by logging the version in the log output. I can leave that part of the PR.

When sharing a specific image tag is important on a case-by-case basis, it's always possible to manully push a locally available image to your personal Docker Hub repo, specifying whatever tag you choose, and then ask the user to pull that.

@magnetised
Copy link
Contributor

i stand by the requirement: it's really important to send an image tag and know that it's not going to change between sending it and it being pulled by the user.

What use cases require such a canary tag to be sent to a user?

I literally had to do this when investigating a customer problem. i couldn't send them the :canary tag because that was a moving target and some conversation like "what version does it print when it starts..." doesn't seem very helpful when trying to investigate, probably complex, issues in a customer environment

it's always possible to manully push a locally available image to your personal Docker Hub repo, specifying whatever tag you choose, and then ask the user to pull that.

yes you could do that but why make things difficult for ourselves.

I don't honestly see this as such controversial issue. It just makes a bunch of sense to me to be able to say - "this image" to someone and know that weird things aren't going to happen. I think the idea of using elecric/canary as the name solves the issue with overloading the main image with a bunch of noise and if we hit limits in docker hub then we can address those.

@KyleAMathews
Copy link
Contributor

👍 to named releases for each commit. This is quite common in NPM land & it can be very handy. Granted Docker images are heavier than npm packages so we might run into limits in Docker Hub but we could e.g. just start deleting old ones at that point.

I agree the UI on Docker Hub isn't really designed for this but... that might not be a problem? We have lists of releases elsewhere... but also a new electric/canary neatly solves the issue.

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.

4 participants