Have StateBuilder return our actual state object and not simply a dict #34625
+79
−149
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.
What
Have the state builder return our action
TState
domain object and not the internalstate[X].stream. stream_state
. Without this, all the integration tests/scenario based test needs to know how are state messages created which is flaky as if the implementation change, all those tests would have to be updated while if it changes and we useStateBuilder
, we might have a change to make the change non-breaking. This is how it looks for both:Scenario-based
https://github.com/airbytehq/airbyte/compare/maxi297/statebuilder-create-state-not-dict?expand=1#diff-7a5029caa174d3c73bca535ec76e6ea66b577aef2149b2cac27baaf53d72aac7L42-R45
Integration tests
This is what triggered the change as we would only have to pass the state to the entrypoint wrapper that would save this list/dicts as json. However, adding the state as a parameter of SourceStripe.init would make the integration tests handle two types of state: the one for the entrypoint wrapper and the one that is returned by
... instead of
🚨 User Impact 🚨
Scenario based tests were updated as part of this PR. As for integration tests, they will be updated as part of #32057. This might impact #33996 (comment) though @askarpets