estuary-cdk: slightly better error logging#3019
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR refines task naming in the Stripe capture and enhances error logging when the first error has an empty message.
- Removes the connector-specific prefix from spawned subtask names in
priority_capture.py - Ensures a non-empty error description by injecting the exception type’s name when raising
Stoppedinbase_capture_connector.py
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| source-stripe-native/source_stripe_native/priority_capture.py | Simplified subtask names by dropping self.prefix |
| estuary-cdk/estuary_cdk/capture/base_capture_connector.py | Fallback to exception class name when first_error has no text |
Comments suppressed due to low confidence (1)
source-stripe-native/source_stripe_native/priority_capture.py:300
- [nitpick] Removing
self.prefixfrom subtask names may break consistency with other connector logs and metrics. Consider preserving the prefix or updating documentation to reflect the new naming convention.
f"backfill.{work_item.account_id}",
3cc52ef to
1671d5c
Compare
When an error without any arguments is raised, like `asyncio` does for `CancelledError` and `TimeoutError`, the string representation of the error is an empty string. That's not useful at all, so when the error's string representation is empty, replace it with the error's type so something somewhat useful is included in the error log.
Previously, duplicate information were in the subtask suffixes, resulting in names like "flow.capture.Accounts.worker.1.Accounts.backfill.acct_12345". This commit removes the additional "Account" prefix from the subtask name.
1671d5c to
274f2c9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
This PR includes some small logging improvements for CDK based captures &
source-stripe-native. See the individual commits for more details.Workflow steps:
(How does one use this feature, and how has it changed)
Documentation links affected:
(list any documentation links that you created, or existing ones that you've identified as needing updates, along with a brief description)
Notes for reviewers:
(anything that might help someone review this PR)
This change is