ALBS-444 #2
No reviewers
Labels
No Label
No Milestone
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: almalinux/cas_wrapper#2
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "ALBS-444"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -96,0 +174,4 @@
self._logger.exception('Cannot notarize artifact:')
all_artifacts_is_notarized = False
continue
artifact.cas_hash = cas_artifact_hash
It's bad practice to mutate arguments like this, can you return all artifacts with the respected hashes instead?
Done
@ -96,0 +144,4 @@
use_hash: bool = False,
) -> bool:
is_authenticated = False
with self as cas:
Instead of
with self
I would preferself.ensure_login()
or something, because you didn't use exitDone
Add docstring to the new functions
@ -96,0 +121,4 @@
# it should return 0 for authenticated and trusted commits
is_authenticated = not bool(
result_json.get('status', 1))
commit_cas_hash = result_json.get('hash')
You don't get hash because use_hash equals to Fasle by default
I can get hash here, because when I use
return_json
flag,self.authenticate
returns full JSON response@ -96,0 +145,4 @@
# we can fall with ProcessExecutionError,
# because source can be not notarized
except ProcessExecutionError:
self._logger.exception('Cannot authenticate %s:', local_path)
I guess colon is not needed in the logging message or it's in wrong place of the message
@ -96,0 +166,4 @@
try:
cas_artifact_hash = future.result()
except Exception:
self._logger.exception('Cannot notarize artifact:')
Add name of an artifact to the logging message
9f15b9b5be
tofa16027062