-
Notifications
You must be signed in to change notification settings - Fork 139
Do not assume that util.skopeo_copy can't fail #1147
base: master
Are you sure you want to change the base?
Conversation
Atomic/run.py
Outdated
| db.pull_image(self.image, remote_image_obj) | ||
| err = db.pull_image(self.image, remote_image_obj) | ||
| if err: | ||
| raise ValueError("Unable to pull image {}"..format(self.image)) |
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.
there is one extra '.' here
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.
doesn't it fail immediately once pull_image raises CalledProcessError?
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.
Nice catch, I will fix. And no, it doesn't seems to raise anything. I sent the PR first to see the tests running, but I didn't had time to test or validate it (as I reinstalled my system with enough disk).
| trust.discover_sigstore(fq_name) | ||
| util.write_out("Pulling {} ...".format(fq_name)) | ||
| util.skopeo_copy("docker://{}".format(fq_name), image, debug=debug, insecure=insecure, | ||
| return util.skopeo_copy("docker://{}".format(fq_name), image, debug=debug, insecure=insecure, |
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.
doesn't it raise a CalledProcessError exception when skopeo_copy fails?
Atomic/run.py
Outdated
| db.pull_image(self.image, remote_image_obj) | ||
| err = db.pull_image(self.image, remote_image_obj) | ||
| if err: | ||
| raise ValueError("Unable to pull image {}"..format(self.image)) |
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.
doesn't it fail immediately once pull_image raises CalledProcessError?
If the disk is full (projectatomic#1146), atomic will continue and show errors later, which is puzzling and hard to debug.
d560ce5 to
fd19508
Compare
Description
If the disk is full, atomic will continue and show errors later, which is puzzling and hard to debug.
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.