-
Notifications
You must be signed in to change notification settings - Fork 7
Greenwave integration #64
Greenwave integration #64
Conversation
omps/api/v1/push.py
Outdated
@@ -134,6 +135,10 @@ def extract_zip_file_from_koji( | |||
""" | |||
with NamedTemporaryFile('wb', suffix='.zip') as tmpf: | |||
KOJI.download_manifest_archive(nvr, tmpf) | |||
# running KOJI methods first, it has checks that should pass |
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.
Shouldn't this read: running GREENWAVE methods first, it has checks that should pass even before we bother koji
?
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.
So you want to check greenwave first?
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.
Actually, I was confused by the placement of the comment... I guess, should have been above the KOJI.download_...
line... but now that you ask: I think the Greenwave check could go first. CVP checks will probably fail for similar reasons KOJI.download_...
would fail. Even if not, probably it's better to download the content only if there is a chance to be used.
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.
I've changed order
omps/greenwave.py
Outdated
else: | ||
try: | ||
data = response.json() | ||
except Exception: |
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.
I think this should only catch ValueError
s.
From requests.Response.json
docs:
:raises ValueError: If the response body does not contain valid json.
* OSBS-7140 Signed-off-by: Martin Bašti <mbasti@redhat.com>
Signed-off-by: Martin Bašti <mbasti@redhat.com>
Signed-off-by: Martin Bašti <mbasti@redhat.com>
Signed-off-by: Martin Bašti <mbasti@redhat.com>
All comments should be resolved |
No description provided.