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

How does it determine if there is an update or not? #111

Closed
Toudahl opened this issue Sep 11, 2023 · 5 comments
Closed

How does it determine if there is an update or not? #111

Toudahl opened this issue Sep 11, 2023 · 5 comments

Comments

@Toudahl
Copy link

Toudahl commented Sep 11, 2023

When shepherd runs it incorrectly detects that there are no image update.

I am curious if i have configured something incorrectly.
First i setup my service, then at a later point i started shepherd.

The currently deployed image is tagged with: "main-51-1" the newest version is tagged with "main-54-1".

I see this in the logs:

 Mon Sep 11 20:39:52 UTC 2023 Trying to update service <servicename> with image <imagename>:main-51-1
Mon Sep 11 20:39:59 UTC 2023 No updates to service <servicename>!
@martadinata666
Copy link

the change of Sha with the same tag, usually not very specific tag. like latest, main, with specific tag like yours, mostly it's not getting a new push so the sha number still the same.

@Toudahl
Copy link
Author

Toudahl commented Sep 12, 2023

I had hoped you wouldn't say that.

As I understand it is best practise to use specific versions for your container instead of "latest".

Does anyone know if there is a plan to support that?

@martadinata666
Copy link

This kind of depends on the docker image set up by the owner. Let's take the example of mariadb
latest -> keep updated
10.6 -> keep updated as long as 10.6.1, 10.6.2, ... exist until eol.
10.6.1 -> The oneshot image won't be updated.

But there is also the image that keeps updating due to basic package updates like lsio image, so new images are pushed on the same specific tag.

That is just how docker functions, shepherd just utilizes it. Moving tag is not possible.

@Toudahl
Copy link
Author

Toudahl commented Sep 12, 2023

This kind of depends on the docker image set up by the owner. Let's take the example of mariadb latest -> keep updated 10.6 -> keep updated as long as 10.6.1, 10.6.2, ... exist until eol. 10.6.1 -> The oneshot image won't be updated.

But there is also the image that keeps updating due to basic package updates like lsio image, so new images are pushed on the same specific tag.

Yes, but using the "latest" tag in deployment scripts means that your deployments are not deterministic.

A deployment today might not be the same as a deployment tomorrow.
That is the argument i have heard against using the latest tag.
Here is a random blog post I found, giving some details on it.
https://vsupalov.com/docker-latest-tag/

Moving tag is not possible.

Understood. Thanks for the answer.

@Toudahl Toudahl closed this as completed Sep 12, 2023
@djmaze
Copy link
Collaborator

djmaze commented Sep 27, 2023

Yes, but using the "latest" tag in deployment scripts means that your deployments are not deterministic.

That's why most docker images are being semantically versioned and you should make use of that. As @martadinata666 said, you can then use mariadb:10.6 and you will get the patch releases (10.6.1, 10.6.2, ...) but no more.

For doing minor and major releases, I recommend managing your stacks via git and using something like renovate (or some Github action thingy) in order to get notified of new releases, and then do those updates manually.

moschlar added a commit that referenced this issue Oct 30, 2023
[Full Changelog](0.7.0...1.8.0)

**Breaking changes:**

- The docker image registry location has been changed to the containrrr organisation:
  `containrrr/shepherd`

**Implemented enhancements:**

- armhf support [\#108](#108)
- Switch to official docker image v24 [\#107](#107) ([djmaze](https://github.com/djmaze))
- Restrict runtime of "docker service update" using "timeout" [\#98](#98) ([fooflington](https://github.com/fooflington))
- Add example for usage with swarm-cronjob [\#89](#89) ([djmaze](https://github.com/djmaze))

**Fixed bugs:**

- Can't update some services: no such manifest [\#105](#105)
- Service gets stuck when calling "docker service update" and won't progress [\#97](#97)
- fix: docker service update with `--detach=false` hangs on services wi… [\#104](#104) ([AliRezaBeitari](https://github.com/AliRezaBeitari))
- Fix defunc VERBOSE handling [\#91](#91) ([sebthom](https://github.com/sebthom))

**Closed issues:**

- How does it determine if there is an update or not? [\#111](#111)
- Looking for a new maintainer [\#96](#96)
- New OCI manifest issue [\#92](#92)
- Run service update at a fixed time [\#88](#88)
- docker swarm 20.10.12 | "docker service update" requires exactly 1 argument. [\#83](#83)
- Error updating service, does not exist or it is not available when using a duplicate registry [\#78](#78)

**Merged pull requests:**

- Add apprise type and additional error notification [\#118](#118) ([andyloree](https://github.com/andyloree))
- Rename image in docs [\#114](#114) ([moschlar](https://github.com/moschlar))
- Fix release workflow [\#113](#113) ([moschlar](https://github.com/moschlar))
- Update README.md [\#103](#103) ([andrew-dixon](https://github.com/andrew-dixon))
- ci: add basic github actions for build/release [\#101](#101) ([piksel](https://github.com/piksel))
- correct misleading description of WITH\_NO\_RESOLVE\_IMAGE [\#100](#100) ([alex-vg](https://github.com/alex-vg))
- Move example configs to their own folder [\#99](#99) ([djmaze](https://github.com/djmaze))
- Add documentation about `REGISTRIES_FILE` [\#94](#94) ([tito](https://github.com/tito))
- Minor refactoring [\#90](#90) ([sebthom](https://github.com/sebthom))

Closes: #117
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

No branches or pull requests

3 participants