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

runner.docker: Distinguish between an explicit vs. implicit "latest" image tag when updating #163

Merged
merged 2 commits into from
Apr 7, 2022

Conversation

tsibley
Copy link
Member

@tsibley tsibley commented Mar 31, 2022

Description of proposed changes

Behaviour with an implicit "latest" tag remains the same: it resolves to
the most recent "build-*" tag when nextstrain update is run which then
pins it in the config file.

An explicit "latest" tag used to do the same but now is preserved: it's
not updated to the most recent "build-*" tag during nextstrain update.
This allows folks to opt into tracking the leading edge of changes to
the image.

Resolves #96.

Testing

Tested locally and works for me. Also added additional doctests.

tsibley added 2 commits March 30, 2022 11:43
Now prunes images older than the just-updated-to image, not the
just-updated-from image.  This bug meant that pruning would find older
images from *past* updates but skip the old image it just updated from,
i.e. if image N is the image just updated to, then images N-2 and older
were pruned instead of images N-1 and older.  An off-by-one bug, of a
sort.

I'd noticed this behaviour many times but had thought it was something
about the pruning causing other images to become prune-able (and thus
picked up in subsequent `nextstrain update` runs).  It was only when I
tried to fix that understanding of the bug with a loop and it didn't
work that I realized during debugging what was happening.
…image tag when updating

Behaviour with an implicit "latest" tag remains the same: it resolves to
the most recent "build-*" tag when `nextstrain update` is run which then
pins it in the config file.

An explicit "latest" tag used to do the same but now is preserved: it's
not updated to the most recent "build-*" tag during `nextstrain update`.
This allows folks to opt into tracking the leading edge of changes to
the image.

Resolves <#96>.
Copy link
Contributor

@joverlee521 joverlee521 left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this! Worked for me 👍

@tsibley tsibley merged commit 258af54 into master Apr 7, 2022
@tsibley tsibley deleted the trs/image-handling branch April 7, 2022 04:40
@tsibley
Copy link
Member Author

tsibley commented Apr 7, 2022

Released in 3.2.4 just now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

[update] Stop overwriting nextstrain/base:latest in ~/.nextstrain/config
2 participants