-
Notifications
You must be signed in to change notification settings - Fork 157
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 swarm mode #227
Conversation
On the issues, there are this comment
Still a good idea, but that not cover by this PR. |
have you ran this code? i like the baseobject but a lot of stuff just wont work. e.g. digest or something doesnt return digest or something. it returns true or false |
Yes, I try with and without swarm mode and that works. The method _get_digest, return the sha256 of the image, in all cases (dryrun on or off with auth or not). I don't know where you see a method that return a boolean. |
I understand, the code:
is exactly the same thing then that
Because the or keyword isn't a comparator and don't return True or False. I can change it, if you prefer the second solution. |
Yeah i spoke before i ran the code myself. its completely fine. Im reading over the change right now. Give me a bit its a large change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awaiting feedback
Fixes #216
The fix is instead of using service.update(image=tag) we need to use service.update(image=f"{tag}@sha256:{latest_image_sha256}").
With a little bit of refractor to remove duplicate code.