Skip to content

Commit

Permalink
fix(batch-exports): add more non-retryable errors (#22161)
Browse files Browse the repository at this point in the history
  • Loading branch information
bretthoerner authored May 7, 2024
1 parent a1e089a commit ed845fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion posthog/temporal/batch_exports/bigquery_batch_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,11 @@ async def run(self, inputs: BigQueryBatchExportInputs):
"RefreshError",
# Usually means the dataset or project doesn't exist.
"NotFound",
# Raised when something about dataset is wrong (not alphanumeric, too long, etc)
# Raised when something about dataset is wrong (not alphanumeric, too long, etc).
"BadRequest",
# Raised when table_id isn't valid. Sadly, `ValueError` is rather generic, but we
# don't anticipate a `ValueError` thrown from our own export code.
"ValueError",
],
finish_inputs=finish_inputs,
)
2 changes: 2 additions & 0 deletions posthog/temporal/batch_exports/postgres_batch_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,8 @@ async def run(self, inputs: PostgresBatchExportInputs):
"InvalidSchemaName",
# Missing permissions to, e.g., insert into table.
"InsufficientPrivilege",
# Issue with exported data compared to schema, retrying won't help.
"NotNullViolation",
],
finish_inputs=finish_inputs,
# Disable heartbeat timeout until we add heartbeat support.
Expand Down

0 comments on commit ed845fa

Please sign in to comment.