Re-pulling image error should exit 0#997
Conversation
Atomic/backends/_docker.py
Outdated
| if local_image is not None: | ||
| if self.already_has_image(local_image, remote_image_obj): | ||
| raise ValueError("Latest version of {} already present.".format(image)) | ||
| util.write_err("Latest version of {} already present.".format(image)) |
There was a problem hiding this comment.
Should we create an exception that handles this, rather then writing the code here.
Something like
raise SuccessException("Latest version of {} already present.".format(image))

That way it could be handled potentially by something like atomic-dbus or other callers.
There was a problem hiding this comment.
Maybe I'm misunderstanding the desired end game here, but I thought you'd just replace the old 'raise ValueError' call here with a 'return 0' then let the self_inspect fire in the update call as a double (triple) check.
|
There's a comment near line 400 where the self.pull_image is called from that will need to be tweaked based on the final change. |
Bugzilla #1430708 recommends that if an atomic user attempts to pull an image that is already present, we should not exit with a '1' which indicates a failure; rather a 0.
|
Merging so I can cut a new release of Atomic. |
|
☀️ Test successful - status-redhatci |
Description
Bugzilla #1430708 recommends that if an atomic user attempts to pull
an image that is already present, we should not exit with a '1' which
indicates a failure; rather a 0.
Related Bugzillas
Related Issue Numbers
Pull Request Checklist:
If your Pull request contains new features or functions, tests are required. If the PR is a bug fix and no tests exist, please consider adding some to prevent regressions.