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

fix(docker): Add edge tag to Docker images, document when latest tag will appear #5312

Merged
merged 9 commits into from
Oct 6, 2022

Conversation

teor2345
Copy link
Contributor

@teor2345 teor2345 commented Oct 3, 2022

Motivation

latest is the default Docker tag, but it's missing from published Zebra images:
https://hub.docker.com/r/zfnd/zebra/tags

This makes typical Docker commands fail:

$ docker run zfnd/zebra
Unable to find image 'zfnd/zebra:latest' locally
docker: Error response from daemon: manifest for zfnd/zebra:latest not found: manifest unknown: manifest unknown.
See 'docker run --help'.

Specifications

https://github.com/docker/metadata-action#latest-tag

Solution

  • Add edge tag to published Docker images
  • Document when latest tag will appear

Review

Anyone can review this PR.

It is only a release blocker if we want users to be able to easily use Docker images.

Reviewer Checklist

  • Will the PR name make sense to users?
    • Does it need extra CHANGELOG info? (new features, breaking changes, large changes)
  • Are the PR labels correct?
  • Does the code do what the ticket and PR says?
  • How do you know it works? Does it have tests?

@teor2345 teor2345 added C-bug Category: This is a bug A-devops Area: Pipelines, CI/CD and Dockerfiles P-Medium ⚡ I-usability Zebra is hard to understand or use labels Oct 3, 2022
@teor2345 teor2345 self-assigned this Oct 3, 2022
@teor2345 teor2345 requested a review from a team as a code owner October 3, 2022 02:00
@teor2345 teor2345 requested review from gustavovalverde and removed request for a team October 3, 2022 02:00
@github-actions github-actions bot added C-feature Category: New features C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG labels Oct 3, 2022
Copy link
Member

@gustavovalverde gustavovalverde left a comment

Choose a reason for hiding this comment

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

I wouldn't add a latest tag to non-stable releases.

When a <pre-release> information is included in the image tag, the latest tag won't be automatically added as this one is, by default, reserved for stable images.

For example, we will release 1.0.0 and this will also auto-add the latest tag, but if we then publish 1.0.1-alpha.1, we wouldn't want users to download an alpha version if they add the latest tag, but instead keep downloading 1.0.0 until 1.0.1 is published

This is explained with more detail here: #5138 (comment)

@teor2345
Copy link
Contributor Author

teor2345 commented Oct 3, 2022

I wouldn't add a latest tag to non-stable releases.

When a <pre-release> information is included in the image tag, the latest tag won't be automatically added as this one is, by default, reserved for stable images.

For example, we will release 1.0.0 and this will also auto-add the latest tag, but if we then publish 1.0.1-alpha.1, we wouldn't want users to download an alpha version if they add the latest tag, but instead keep downloading 1.0.0 until 1.0.1 is published

This is explained with more detail here: #5138 (comment)

Thanks, I summarised that explanation next to the config that will create the latest tag.

@teor2345 teor2345 changed the title fix(docker): Add latest and edge tags to Docker images fix(docker): Add edge tag to Docker images, document when latest tag will appear Oct 3, 2022
gustavovalverde
gustavovalverde previously approved these changes Oct 3, 2022
Copy link
Member

@gustavovalverde gustavovalverde left a comment

Choose a reason for hiding this comment

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

LGTM

@teor2345
Copy link
Contributor Author

teor2345 commented Oct 4, 2022

Some jobs didn't run on this PR, but the workflow rules contain .github/workflows/build-docker-image.yml.

I'll try re-running it, maybe GitHub is having issues.

@teor2345
Copy link
Contributor Author

teor2345 commented Oct 4, 2022

@Mergifyio update

@mergify
Copy link
Contributor

mergify bot commented Oct 4, 2022

update

✅ Branch has been successfully updated

@teor2345
Copy link
Contributor Author

teor2345 commented Oct 4, 2022

Jobs seem to be totally unresponsive to branch pushes as well:
2662F1CE-5393-445D-B5CA-8D9DB64549EC

@teor2345 teor2345 closed this Oct 4, 2022
@teor2345 teor2345 reopened this Oct 4, 2022
@teor2345
Copy link
Contributor Author

teor2345 commented Oct 4, 2022

Ok, closing and re-opening seemed to work.

@teor2345
Copy link
Contributor Author

teor2345 commented Oct 4, 2022

Looks like the workflow syntax was wrong, but the error only showed up on the workflow details screen, because the mistake was in a sub-workflow.

@teor2345
Copy link
Contributor Author

teor2345 commented Oct 4, 2022

@Mergifyio update

@mergify
Copy link
Contributor

mergify bot commented Oct 4, 2022

update

☑️ Nothing to do

  • #commits-behind>0 [:pushpin: update requirement]
  • -closed [:pushpin: update requirement]

@teor2345
Copy link
Contributor Author

teor2345 commented Oct 4, 2022

Ok, that should all be fixed now, some of my changes didn't work.

mergify bot added a commit that referenced this pull request Oct 4, 2022
mergify bot added a commit that referenced this pull request Oct 4, 2022
@gustavovalverde
Copy link
Member

@Mergifyio update

@mergify
Copy link
Contributor

mergify bot commented Oct 5, 2022

update

✅ Branch has been successfully updated

@teor2345
Copy link
Contributor Author

teor2345 commented Oct 5, 2022

@Mergifyio update

@mergify
Copy link
Contributor

mergify bot commented Oct 5, 2022

update

✅ Branch has been successfully updated

@teor2345
Copy link
Contributor Author

teor2345 commented Oct 5, 2022

It looks like some of the instances for this PR got deleted about 10 hours ago, before the tests had finished. I'm not sure why, the instance delete job wasn't running.

Error: google-github-actions/ssh-compute failed with: failed to execute gcloud command `gcloud compute ssh lwd-grpc-wallet-5312-merge-9e47110 --zone us-central1-a ...

  • The resource 'projects/zealous-zebra/zones/us-central1-a/instances/lwd-grpc-wallet-5312-merge-9e47110' was not found

https://github.com/ZcashFoundation/zebra/actions/runs/3189762463/jobs/5209366519#step:6:99
https://github.com/ZcashFoundation/zebra/actions/runs/3189762463/jobs/5209407086#step:6:99

mergify bot added a commit that referenced this pull request Oct 6, 2022
@mergify mergify bot merged commit 1ec632a into main Oct 6, 2022
@mergify mergify bot deleted the docker-latest-tag branch October 6, 2022 10:36
upbqdn pushed a commit that referenced this pull request Oct 11, 2022
…will appear (#5312)

* Add latest and edge tags to Docker images

* Document how latest tag actually works

* Try a different syntax for is_default_branch

* Try again

* One last try

* Revert changes that don't work

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
@teor2345 teor2345 mentioned this pull request Oct 11, 2022
32 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-devops Area: Pipelines, CI/CD and Dockerfiles C-bug Category: This is a bug C-feature Category: New features C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG I-usability Zebra is hard to understand or use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants