Skip to content

Conversation

@aKlimau
Copy link

@aKlimau aKlimau commented Nov 4, 2025

Failed task tracebacks are currently a part of task model, it can expose sensitive information from an exception via the API. This change stops this behavior by only logging tracebacks and not storing them inside of tasks.

_execute_task and _aexecute_task are modified to log tracebacks for unknown exceptions but never save them to the Task record.

Task.set_failed() is updated to make the tb (traceback) argument optional.

A new PulpExceptionNoTraceback base class is added for known, user-facing errors (like a DNS failure) where the traceback is not useful and should not be logged.

A new DnsDomainNameException (inheriting from PulpExceptionNoTraceback) is added to handle DNS lookup failures (e.g., bad remote URLs) as a known user error.

Comment on lines 176 to 180
raise ValueError("Immediate tasks must be async functions.")
raise NonAsyncImmediateTaskError(task_name=task.name)
Copy link
Member

Choose a reason for hiding this comment

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

When this happens, it's a programming error. This should not be user visible.

@aKlimau aKlimau force-pushed the no-traceback-exception branch from 7a4572d to 633d6be Compare November 18, 2025 12:39
@aKlimau aKlimau marked this pull request as draft November 18, 2025 14:07
@aKlimau aKlimau force-pushed the no-traceback-exception branch from 633d6be to 43966ea Compare November 19, 2025 08:54
@aKlimau aKlimau force-pushed the no-traceback-exception branch 6 times, most recently from ffcb19b to 0c2fc24 Compare December 9, 2025 11:47
@aKlimau aKlimau force-pushed the no-traceback-exception branch 4 times, most recently from 53afe18 to 0eec124 Compare December 9, 2025 15:51
@aKlimau aKlimau force-pushed the no-traceback-exception branch 6 times, most recently from 87c8b43 to e7d65e1 Compare December 10, 2025 11:47
@aKlimau aKlimau force-pushed the no-traceback-exception branch from e7d65e1 to ba22c61 Compare December 10, 2025 14:11
@aKlimau aKlimau force-pushed the no-traceback-exception branch from b5de7a3 to cb4fe92 Compare December 10, 2025 14:55
- Raise pulp-glue lower bound due to new imports requiring features from 0.30.0
- Add explicit pycares dependency to fix aiodns compatibility issue
@aKlimau aKlimau force-pushed the no-traceback-exception branch from 673f40c to f10b3ba Compare December 11, 2025 12:24
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.

2 participants