Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Record S3 BatchExport errors #17535

Merged
merged 7 commits into from
Sep 22, 2023

Conversation

tomasfarias
Copy link
Contributor

@tomasfarias tomasfarias commented Sep 19, 2023

Problem

Users are not aware of what went wrong when a batch export fails. We want to add full logs, but just having a single line error message would go a long way.

Changes

Looks like this:

image

UPDATE: Not shipping frontend changes. Will work on adding full log support instead. This PR now only has the backend updates to better track cancellations and failures.

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

How did you test this code?

Added unit tests for asserting behavior when catching exceptions.

@tomasfarias tomasfarias marked this pull request as ready for review September 20, 2023 11:42
@tomasfarias tomasfarias requested a review from a team September 20, 2023 13:59
workflow.logger.exception("BigQuery BatchExport failed.", exc_info=e)
update_inputs.status = "Failed"

update_inputs.latest_error = str(e.cause)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure about having this, rather than it adding a log entry later when we get to it and in the mean while we can look at the workflow.logger exceptions?

workflow.logger.exception("BigQuery BatchExport failed.", exc_info=e)
update_inputs.status = "Failed"

update_inputs.latest_error = str(e.cause)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure about having this, rather than it adding a log entry later when we get to it and in the mean while we can look at the workflow.logger exceptions?

@tomasfarias tomasfarias merged commit 8bf729f into master Sep 22, 2023
70 checks passed
@tomasfarias tomasfarias deleted the feat/report-lastest-batch-export-error branch September 22, 2023 13:35
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