ALBS-444
master
@ -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 prefer self.ensure_login() or something, because you didn't use exit
with self
self.ensure_login()
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
return_json
self.authenticate
@ -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:
Add name of an artifact to the logging message
9f15b9b5be
fa16027062
98ca413db7
No due date set.
No dependencies set.
Deleting a branch is permanent. It CANNOT be undone. 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
1 year ago98ca413db7
into master 1 year agoReviewers
98ca413db7
.Step 1:
From your project repository, check out a new branch and test the changes.Step 2:
Merge the changes and update on Gitea.