Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force legacy if feature flag not set #14694

Merged
merged 13 commits into from
Jul 14, 2022
Merged

Conversation

benmoriceau
Copy link
Contributor

@benmoriceau benmoriceau commented Jul 13, 2022

What

for the legacy mode for if the feature flag is not set to true.
Issue : https://github.com/airbytehq/oncall/issues/339

@benmoriceau
Copy link
Contributor Author

benmoriceau commented Jul 13, 2022

/test connector=connectors/source-postgres

🕑 connectors/source-postgres https://github.com/airbytehq/airbyte/actions/runs/2666786353

Comment on lines 358 to 362
if (!featureFlags.useStreamCapableState()) {
return List.of(new AirbyteStateMessage()
.withType(AirbyteStateType.LEGACY)
.withData(Jsons.emptyObject()));
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@benmoriceau it looks like the non-overriden method does .withData(Jsons.jsonNode(new DbState())), but here you are using .withData(Jsons.emptyObject()):

return List.of(new AirbyteStateMessage().withType(AirbyteStateType.LEGACY).withData(Jsons.jsonNode(new DbState())));

Should these be the same?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so. I have updated it

@benmoriceau benmoriceau requested a review from lmossman July 13, 2022 23:05
@benmoriceau benmoriceau force-pushed the bmoric/force-legacy-postgres branch from 4cdb0b5 to 4975382 Compare July 13, 2022 23:07
@benmoriceau
Copy link
Contributor Author

benmoriceau commented Jul 13, 2022

/test connector=connectors/source-postgres

🕑 connectors/source-postgres https://github.com/airbytehq/airbyte/actions/runs/2666925534

assertTrue(streamsInStateAfterFirstSyncCompletion.contains(new StreamDescriptor().withName(MODELS_STREAM_NAME).withNamespace(MODELS_SCHEMA)));*/
assertNotNull(stateMessageEmittedAfterFirstSyncCompletion.getData());
assertTrue(streamsInStateAfterFirstSyncCompletion.contains(new StreamDescriptor().withName(MODELS_STREAM_NAME).withNamespace(MODELS_SCHEMA)));
assertNotNull(stateMessageEmittedAfterFirstSyncCompletion.getData());*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

included this line in the commented out code, because we are doing the same assert on line 411

@lmossman
Copy link
Contributor

lmossman commented Jul 13, 2022

/test connector=connectors/source-postgres

🕑 connectors/source-postgres https://github.com/airbytehq/airbyte/actions/runs/2667056870
❌ connectors/source-postgres https://github.com/airbytehq/airbyte/actions/runs/2667056870
🐛 https://gradle.com/s/zdsjgvzy5odly

Build Failed

Test summary info:

Could not find result summary

@benmoriceau
Copy link
Contributor Author

benmoriceau commented Jul 14, 2022

/test connector=connectors/source-postgres

🕑 connectors/source-postgres https://github.com/airbytehq/airbyte/actions/runs/2667460329
❌ connectors/source-postgres https://github.com/airbytehq/airbyte/actions/runs/2667460329
🐛 https://gradle.com/s/hbbjxo6gykeje

Build Failed

Test summary info:

Could not find result summary

@subodh1810
Copy link
Contributor

I have created a separate commit #14703 to disable the test newTableSnapshotTest cause its testing addition of a new table in the catalog and then seeing how the connector behaves in CDC mode. But this addition without resetting the state can only happen in GLOBAL state mode and not in LEGACY so as a safety measure the connector doesn't identify new table in the catalog when the state is LEGACY. The addition of new tables in catalog without causing the state to reset can only happen when the connector is in GLOBAL state mode and not in LEGACY state mode. (edited)

@benmoriceau
Copy link
Contributor Author

benmoriceau commented Jul 14, 2022

/test connector=connectors/source-postgres

🕑 connectors/source-postgres https://github.com/airbytehq/airbyte/actions/runs/2671048908
✅ connectors/source-postgres https://github.com/airbytehq/airbyte/actions/runs/2671048908
No Python unittests run

Build Passed

Test summary info:

All Passed

@benmoriceau
Copy link
Contributor Author

benmoriceau commented Jul 14, 2022

/publish connector=connectors/source-postgres

🕑 Publishing the following connectors:
connectors/source-postgres
https://github.com/airbytehq/airbyte/actions/runs/2671520470


Connector Did it publish? Were definitions generated?
connectors/source-postgres

if you have connectors that successfully published but failed definition generation, follow step 4 here ▶️

@benmoriceau benmoriceau marked this pull request as ready for review July 14, 2022 15:50
@benmoriceau benmoriceau requested a review from a team as a code owner July 14, 2022 15:50
@benmoriceau benmoriceau requested a review from lmossman July 14, 2022 15:50
@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets July 14, 2022 17:13 Inactive
@benmoriceau benmoriceau merged commit 939afb7 into master Jul 14, 2022
@benmoriceau benmoriceau deleted the bmoric/force-legacy-postgres branch July 14, 2022 17:53
@benmoriceau
Copy link
Contributor Author

benmoriceau commented Jul 14, 2022

/publish connector=connectors/source-postgres-strict-encrypt

if you have connectors that successfully published but failed definition generation, follow step 4 here ▶️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants