Skip to content

Conversation

@gorskysd
Copy link
Contributor

Switched most of the ValueError exceptions into SyncLogSubmission exceptions, which will get passed through to the user. These are often user errors, such as a missing rollover logs or extraneous files in the submission.

Copy link
Contributor

@rmoneys rmoneys left a comment

Choose a reason for hiding this comment

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

Awesome! This should really help us understand prediction errors in Datadog: https://p.datadoghq.com/sb/9275ad12-494c-11ec-a393-da7ad0900002-dbf4f29a699254f7c20206a2a7b54af3

def get_exception_response(self) -> dict:
"""
Used to get an example response, which will be used for
the swagger documentation.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it better to keep the log parser and prediction models agnostic about the context in which they are used. Specifically, they shouldn't be concerned with the design of a web API.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see what you mean. Does not including this inhibit any functionality in the backend when these types of exceptions are thrown?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also, are you suggesting to delete just this comment, or the method entirely?

Copy link
Contributor

Choose a reason for hiding this comment

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

Nothing comes to mind as to how the back end might be limited without this. Unless you have plans for using this method we can probably remove it.

class LogSubmissionException(SyncParserException):
"""
This Exception is for malformed log submission
"""
Copy link
Contributor

Choose a reason for hiding this comment

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

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@gorskysd gorskysd merged commit 1a086f2 into main Sep 22, 2022
@gorskysd gorskysd deleted the bugfix/PROD-442-missing-rollover-logs-results-in-unknown-error-message branch September 22, 2022 13:45
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.

3 participants