Skip to content

Conversation

@machshev
Copy link
Collaborator

@machshev machshev commented Dec 4, 2025

With previous refactoring the failure bucket collection stage was accidentally dropped. With this commit the data is restored to the JSON report. With follow up commits it will be added back to the report itself.

Goes towards #61

With previous refactoring the failure bucket collection stage was
accidentally dropped. With this commit the data is restored to the JSON
report. With follow up commits it will be added back to the report
itself.

Signed-off-by: James McCorrie <james.mccorrie@lowrisc.org>
"""

def __init__(self, results: Sequence[CompletedJobStatus]) -> None:
def __init__(self, results: Sequence["CompletedJobStatus"]) -> None:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Quoted type required here to prevent circular imports.

Once we have a few more data classes, it might be worth refactoring the file structure a bit so that we can have types without quotes. Circular imports due to typing is generally a good sign that things that should be together are not.

"""Mapping of common error message strings to the full job failure summary."""

@staticmethod
def from_job_status(results: Sequence["CompletedJobStatus"]) -> "BucketedFailures":
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Return type needs quoting as the type is the class itself. The reference for which doesn't exist until it's been fully defined, at least as far as the class attributes and method prototypes.

Copy link
Contributor

@hcallahan-lowrisc hcallahan-lowrisc left a comment

Choose a reason for hiding this comment

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

LGTM!

@machshev machshev added this pull request to the merge queue Dec 4, 2025
Merged via the queue into lowRISC:master with commit f89dc31 Dec 4, 2025
6 checks passed
@machshev machshev deleted the error_msgs branch December 4, 2025 15:22
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.

2 participants