State is saved for 1 stream (out of 3) only (after Airbyte upgrade)

Pretty much as titled. I had this connector developed, which was working fine for more than a month now. After upgrading Airbyte, however, it started saving state for 1 out of 3 streams - for others it does full resync everytime.

The state message I see in the UI is this:

However, using

python main.py read --config secrets/config.json --catalog integration_tests/configured_catalog.json | grep STATE | tail -n 1 | jq .state.data > integration_tests/sample_state.json

command in terminal (locally), as per tutorial, outputs me a proper state, which I’d expect in the Airbyte’s instance as well:

image

Any advice?

These, btw, are two logs files for two consecutive streams. It seems that transactions state was updated, and thus it was not resynced fully. Order and Customers streams were resynced from the beginning.

logs-532.txt (364.1 KB)
logs-538.txt (282.2 KB)

It seems that correct state was captured (see, e.g., line 1502 in logs-532). However, it somehow wasn’t saved (?)

Hello there! You are receiving this message because none of your fellow community members has stepped in to respond to your topic post. (If you are a community member and you are reading this response, feel free to jump in if you have the answer!) As a result, the Community Assistance Team has been made aware of this topic and will be investigating and responding as quickly as possible.
Some important considerations that will help your to get your issue solved faster:

  • It is best to use our topic creation template; if you haven’t yet, we recommend posting a followup with the requested information. With that information the team will be able to more quickly search for similar issues with connectors and the platform and troubleshoot more quickly your specific question or problem.
  • Make sure to upload the complete log file; a common investigation roadblock is that sometimes the error for the issue happens well before the problem is surfaced to the user, and so having the tail of the log is less useful than having the whole log to scan through.
  • Be as descriptive and specific as possible; when investigating it is extremely valuable to know what steps were taken to encounter the issue, what version of connector / platform / Java / Python / docker / k8s was used, etc. The more context supplied, the quicker the investigation can start on your topic and the faster we can drive towards an answer.
  • We in the Community Assistance Team are glad you’ve made yourself part of our community, and we’ll do our best to answer your questions and resolve the problems as quickly as possible. Expect to hear from a specific team member as soon as possible.

Thank you for your time and attention.
Best,
The Community Assistance Team

UPDATE.

It seems to do indeed with airbyte version. This is from a test on the latest version:

This is a test on an older version of Airbyte:

All other settings are identical.

OK, I am pretty sure it has to do with this response:

State capture: Updated state to: Optional[io.airbyte.config.State@396c01f1[state=[{“type”:“STREAM”,“stream”:{“stream_descriptor”:{“name”:“transactions”},“stream_state”:{“dateCreated”:“2022-09-20 18:48:30”}},“data”:{“transactions”:{“dateCreated”:“2022-09-20 18:48:30”},“customers”:{“dateCreated”:“2022-09-20 18:48:14”},“order”:{“dateCreated”:“2022-09-20 18:48:35”}}}]]]

(this is from sync logs).

Comparing to other active connectors, I believe it should not include this weird looking part:

…[{“type”:“STREAM”,“stream”:{“stream_descriptor”:{“name”:“transactions”},“stream_state”:{“dateCreated”:“2022-09-20 18:48:30”}}

(which is then followed with expected :

“data”:{“transactions”:{“dateCreated”:“2022-09-20 18:48:30”},“customers”:{“dateCreated”:“2022-09-20 18:48:14”},“order”:{“dateCreated”:“2022-09-20 18:48:35”}}}]]]

)

Any inights - anybody?

Another update:

complete rewrite of the connector, using ABC instead of IncrementalMixin and different state saving logic, had no effect. State still seems to be in a wrong format.

I am completely lost at this point.

Can confirm that the rewritten connector:

  1. Results in proper state in Airbyte 0.39.30 alpha
  2. Results in wrong state in Airbyte 0.40.7

As this remains a solo thread, my only choice remains downgrade.

Hey @Albinas_Plesnys,

Thanks for making this post. I’m sorry to hear your previously working connection is now only partially working as expected. I believe we did make some changes with state since version 39.30 alpha but I’m not entirely sure what the culprit could be. I made an issue on Github about your issue here: https://github.com/airbytehq/airbyte/issues/17003

Please follow the discussion there for the latest updates.

Thanks, I appreciate that!

Albinas, you must share the custom of your connector. Airbyte has a lot of sources saving multiple states.