Skip to content

Stop asserting task error descriptions for invalid deb sync#1397

Open
hstct wants to merge 1 commit intopulp:mainfrom
ATIX-AG:fix-sync-invalid-sanitized-errors
Open

Stop asserting task error descriptions for invalid deb sync#1397
hstct wants to merge 1 commit intopulp:mainfrom
ATIX-AG:fix-sync-invalid-sanitized-errors

Conversation

@hstct
Copy link
Contributor

@hstct hstct commented Feb 10, 2026

fixes ci pipeline due to pulp tasks no longer providing clear task descriptions

@hstct hstct force-pushed the fix-sync-invalid-sanitized-errors branch 2 times, most recently from 309cdb4 to eb34a09 Compare February 10, 2026 15:59
@hstct hstct force-pushed the fix-sync-invalid-sanitized-errors branch from eb34a09 to 98d4462 Compare February 11, 2026 08:59
Copy link

@dosas dosas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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()
Copy link

@dosas dosas Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@hstct hstct force-pushed the fix-sync-invalid-sanitized-errors branch from 98d4462 to 902433d Compare February 11, 2026 10:47
@hstct hstct force-pushed the fix-sync-invalid-sanitized-errors branch 2 times, most recently from cda4371 to f13bc9f Compare February 11, 2026 12:30
(
DEB_FIXTURE_STANDARD_REPOSITORY_NAME,
{"distributions": "no_dist"},
["Could not find a Release file at"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@hstct hstct force-pushed the fix-sync-invalid-sanitized-errors branch from f13bc9f to 5f7b10e Compare February 12, 2026 10:58
@hstct hstct force-pushed the fix-sync-invalid-sanitized-errors branch from 5f7b10e to a730df3 Compare February 12, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants