Skip to content

Enhance task status for FAILURE with error and traceback#917

Open
Amit-Matth wants to merge 3 commits into
repository-service-tuf:mainfrom
Amit-Matth:task-status-traceback
Open

Enhance task status for FAILURE with error and traceback#917
Amit-Matth wants to merge 3 commits into
repository-service-tuf:mainfrom
Amit-Matth:task-status-traceback

Conversation

@Amit-Matth

@Amit-Matth Amit-Matth commented Apr 5, 2026

Copy link
Copy Markdown

Description

This PR enhances the task status reporting for FAILURE states. Previously, the API only returned a simple exception message. This change introduces a TaskError model and updates the status field to include both the error message and the full traceback.

This enhancement aligns the API with the improvements in the RSTUF Worker (repository-service-tuf-worker #190) and provides better diagnostic information for developers.

Ref: repository-service-tuf/repository-service-tuf-worker#190
Closes: #249

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality not to work as expected)

Additional requirements

  • Tests have been added for the bug fix or new feature
  • Docs have been added for the bug fix or new feature

Code of Conduct

By submitting this PR, you agree to follow our Code of Conduct.

  • I agree to follow this project's Code of Conduct

@Amit-Matth Amit-Matth force-pushed the task-status-traceback branch from 668b4d1 to d4f350e Compare April 5, 2026 14:54
Signed-off-by: Amit-Matth <amitmatth111@gmail.com>
@Amit-Matth Amit-Matth force-pushed the task-status-traceback branch from d4f350e to bf1a5f1 Compare April 5, 2026 14:54
@kairoaraujo

Copy link
Copy Markdown
Member

@Amit-Matth,
Help me here, would it break existent users task handler clients parsing the response?
I mean, you marked as New feature (non-breaking change which adds functionality)

Signed-off-by: Amit-Matth <amitmatth111@gmail.com>
@Amit-Matth

Copy link
Copy Markdown
Author

@kairoaraujo, thanks for catching that. I initially marked this as a "New feature" because it adds diagnostic details for failures, but since it changes the status type from boolean to an object, it is indeed a Breaking change. I've updated the PR type to reflect this. This implementation follows the enhancement requested in #190. Clients previously checking for False should now check for the presence of the error key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

enhancement: Add more details when sub-task fails

2 participants