Skip to content

Improve error message when a persisted cursor value cannot be parsed (ConcurrentPerPartitionCursor._set_global_state) #1120

Open

Description

@devin-ai-integration

Problem

When a persisted cursor state value cannot be parsed with the stream's configured cursor_datetime_formats, ConcurrentPerPartitionCursor._set_global_state() lets the raw ValueError escape during stream construction. The sync dies before any record is read, and the user-facing failure is:

No format in ['%s', '%s'] matching 1698686995.0

Observed in production on a manifest-only source (source-slack, threads stream) where the stored global cursor value carried a fractional epoch ("1698686995.0") while the stream declares cursor_datetime_formats: ["%s"].

Why the current message is poor

  • Leaks implementation details (%s format tokens, an internal Python list) with no user-meaningful vocabulary.
  • Does not say which stream, which cursor field, or that the value came from saved sync state.
  • Offers no remediation (e.g. "refresh/clear the stream state").
  • Classified as system_error / failure_origin: source, so it looks like a connector crash rather than an unparseable-state condition.
  • Duplicate entries in the format list (['%s', '%s']) because CustomFormatConcurrentStreamStateConverter.__init__ appends datetime_format to input_datetime_formats, which makes the message look nonsensical.

Suggested improvements

  1. Wrap the failure in an AirbyteTracedException with a config_error-style (non-system_error) failure type, naming the stream, the cursor field, the offending value, and the accepted formats, plus a remediation hint pointing at refreshing the stream's state.
  2. Consider mirroring the tolerance already added for record cursor values in #758 (observe() logs a warning and skips instead of raising) so a single unparseable state value degrades to a warning rather than failing the sync.
  3. De-duplicate the formats reported in the message.

References


Devin session

Activity

  1. octavia-bot commented on Aug 18, 2026

    @octavia-bot
    Contributor

    AI Triage Starting...

    Thank you for opening this issue! I'm an AI assistant that will do an initial review and may:

    • Ask clarifying questions if needed
    • Suggest relevant documentation or workarounds
    • Flag this for internal visibility

    Note: Community issues are reviewed on a best-effort basis and do not have a guaranteed response time. To help us act on a suspected bug, please include at least one of: a reproducing manifest or code snippet, the full stack trace or error message, or the CDK version where the behavior changed. More detail is always welcome.

    For additional help:

    View playbook

    ✅ Devin AI session created successfully!

  2. airbyte-support-bot commented on Aug 18, 2026

    @airbyte-support-bot

    Thank you for this detailed report!

    This request — improving the error surfaced when a persisted cursor state value cannot be parsed (clearer wording, naming the stream/cursor field, config_error classification, de-duplicated formats, and potentially tolerant handling mirroring #758) — has been logged as an enhancement for the CDK maintainers to review.

    In the meantime, if you hit this failure, resetting/clearing the affected stream's state and re-syncing typically resolves the immediate error.


    Need more help? Join Airbyte Community Slack for peer support, or if you're a Cloud customer, open a support ticket referencing this URL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions