Stop asserting task error descriptions for invalid deb sync#1397
Stop asserting task error descriptions for invalid deb sync#1397
Conversation
309cdb4 to
eb34a09
Compare
eb34a09 to
98d4462
Compare
dosas
left a comment
There was a problem hiding this comment.
Looks good as far as I can tell. What I do not understand is why the error messages became more general and unspecific:
internal error occurred
vs
Could not find a Release file at
Unable to verify any Release files from
| code = task.error.get("code") or task.error.get("error_code") | ||
| desc = task.error.get("description") or task.error.get("detail") | ||
|
|
||
| assert code == "PLP0000" or "PLP0008" or "internal error occurred" in str(desc).lower() |
There was a problem hiding this comment.
IMHO this would be more readable if it would be asserted in two lines one for the code one for the desc.
Then the assertion for the code could be code in ["", ""]
Same for the other file.
98d4462 to
902433d
Compare
cda4371 to
f13bc9f
Compare
| ( | ||
| DEB_FIXTURE_STANDARD_REPOSITORY_NAME, | ||
| {"distributions": "no_dist"}, | ||
| ["Could not find a Release file at"], |
There was a problem hiding this comment.
These Error messages sound like strings coming from this codebase.
So they are expected ways to fail. You should be able to still transport them by subclassing the PulpException.
The intent of the change in pulpcore (discussion ongoing to revert it...) is to prevent exceptions we didn't expect the code to ever raise to surface with potential sensitive information.
f13bc9f to
5f7b10e
Compare
5f7b10e to
a730df3
Compare
fixes ci pipeline due to pulp tasks no longer providing clear task descriptions