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

Destinations: Refreshes: CDK updates #38067

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

edgao
Copy link
Contributor

@edgao edgao commented May 8, 2024

closes https://github.com/airbytehq/airbyte-internal-issues/issues/7606

These are the changes that break platform compatibility. We shouldn't release this until platform is ready for it, and we can turn on the supportsRefreshes metadata in destinations.

Copy link

vercel bot commented May 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Jun 12, 2024 9:45pm

@octavia-squidington-iii octavia-squidington-iii added the CDK Connector Development Kit label May 8, 2024
@edgao edgao force-pushed the destinations_refreshes_cdk_changes branch 3 times, most recently from 9f8ae69 to 50c1e4b Compare May 8, 2024 18:40
@edgao edgao force-pushed the destinations_refreshes_cdk_changes branch from 50c1e4b to e857ce6 Compare May 8, 2024 21:13
Copy link
Contributor Author

edgao commented May 8, 2024

DestinationSyncMode.APPEND_DEDUP,
primaryKey,
Optional.of(cursor),
COLUMNS
COLUMNS,
0,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

maybe we should use nonzero generation id, so that tests are slightly more stringent?

DestinationSyncMode.OVERWRITE,
mock(),
mock(),
mock()
mock(),
0,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

for a later stacked PR: I think we need to add generation-related logic into DefaultTyperDeduper? so we'll want more test cases in this class...

@edgao edgao force-pushed the destinations_refreshes_cdk_changes branch from e857ce6 to 982948e Compare May 8, 2024 21:21
import java.util.*
import kotlin.collections.LinkedHashMap

data class StreamConfig(
val id: StreamId,
val syncMode: SyncMode,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is the source sync mode, which we should never look at. Delete it.

@edgao edgao force-pushed the destinations_refreshes_cdk_changes branch 6 times, most recently from 6839b3f to d361d45 Compare May 8, 2024 22:00
@edgao edgao requested a review from gisripa May 8, 2024 23:00
@edgao edgao force-pushed the destinations_refreshes_cdk_changes branch 3 times, most recently from a3bb96c to eca8010 Compare May 10, 2024 17:10
@edgao edgao changed the base branch from master to edgao/catalog_parser_improvements May 10, 2024 17:10
@edgao edgao force-pushed the edgao/catalog_parser_improvements branch from 7aff2a5 to 2047aec Compare May 10, 2024 17:18
@edgao edgao force-pushed the destinations_refreshes_cdk_changes branch from eca8010 to 7058132 Compare May 10, 2024 17:18
@edgao edgao force-pushed the edgao/catalog_parser_improvements branch from 2047aec to 2f4b6ac Compare May 10, 2024 17:33
@edgao edgao force-pushed the destinations_refreshes_cdk_changes branch from 7058132 to 1306644 Compare May 10, 2024 17:33
@gisripa gisripa mentioned this pull request May 10, 2024
2 tasks
@edgao edgao force-pushed the destinations_refreshes_cdk_changes branch from 05d9bec to dd63e36 Compare May 30, 2024 21:21
@edgao edgao force-pushed the edgao/bigquery_more_cdk_bump branch from 0dec7ae to 52d7ac0 Compare May 31, 2024 15:20
@edgao edgao force-pushed the destinations_refreshes_cdk_changes branch 2 times, most recently from 2c017cc to 5c99a98 Compare June 3, 2024 16:46
@octavia-squidington-iv octavia-squidington-iv requested a review from a team June 3, 2024 16:48
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@airbytehq/destinations wdyt about:

  • add a constructor param supportsRefreshes: Boolean = false
  • add if (!supportsRefreshes) { throw IllegalArgumentException() } to the constructor

this would mean:

  • connectors have to explicitly opt into the new behavior
  • there's no way to accidentally release a connector without refreshes support, but using a new CDK version
    • I don't think our tests would catch this currently, since we're using expectedrecords.jsonl files defined in each connector?

Copy link
Contributor

Choose a reason for hiding this comment

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

What happens to the existing connectors which still want to move to new CDK but refreshes not yet implemented ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

they don't :P

do we want to build full backwards-compat logic? I think that's doable, just kind of annoying. And we already want to build refresh support in all our certified connectors, so... do we care strongly about the rest?

backwards compat would roughly require:

  • AsyncStreamConsumer needs to toggle default stream status
  • CatalogParser toggles the please upgrade platform error and sync mode override
  • AbstractStreamOp toggles between new/old behavior (or we just create a separate AbstractNonRefreshStreamOp, idk - it's sufficiently different that I don't know how much makes sense to share)
  • ... tests are probably really annoying

@edgao edgao force-pushed the edgao/bigquery_more_cdk_bump branch from 52d7ac0 to 5304f0e Compare June 6, 2024 16:16
@edgao edgao force-pushed the destinations_refreshes_cdk_changes branch from 5c99a98 to cd81f59 Compare June 6, 2024 16:16
@edgao edgao force-pushed the edgao/bigquery_more_cdk_bump branch from 5304f0e to 2b5001c Compare June 6, 2024 16:23
@edgao edgao force-pushed the destinations_refreshes_cdk_changes branch from cd81f59 to cf625ed Compare June 6, 2024 16:23
@edgao edgao force-pushed the edgao/bigquery_more_cdk_bump branch from 2b5001c to 92b3ce9 Compare June 6, 2024 22:00
@edgao edgao force-pushed the destinations_refreshes_cdk_changes branch from cf625ed to b22e6e0 Compare June 6, 2024 22:00
@edgao edgao force-pushed the edgao/bigquery_more_cdk_bump branch from 92b3ce9 to eef7413 Compare June 6, 2024 22:24
@edgao edgao force-pushed the destinations_refreshes_cdk_changes branch from b22e6e0 to 9dd4a9d Compare June 6, 2024 22:24
@edgao edgao force-pushed the edgao/bigquery_more_cdk_bump branch from eef7413 to eed66f8 Compare June 7, 2024 23:12
@edgao edgao force-pushed the destinations_refreshes_cdk_changes branch from 9dd4a9d to ea03c9b Compare June 7, 2024 23:13
@edgao edgao force-pushed the edgao/bigquery_more_cdk_bump branch from eed66f8 to da3e829 Compare June 10, 2024 16:13
@edgao edgao force-pushed the destinations_refreshes_cdk_changes branch from ea03c9b to f00bab9 Compare June 10, 2024 16:13
@edgao edgao force-pushed the edgao/bigquery_more_cdk_bump branch from da3e829 to 39971f7 Compare June 10, 2024 16:41
@edgao edgao force-pushed the destinations_refreshes_cdk_changes branch from f00bab9 to 0850f44 Compare June 10, 2024 16:41
@edgao edgao force-pushed the edgao/bigquery_more_cdk_bump branch from 39971f7 to 292aa89 Compare June 10, 2024 17:02
@edgao edgao force-pushed the destinations_refreshes_cdk_changes branch from 0850f44 to e7f351c Compare June 10, 2024 17:02
@edgao edgao force-pushed the edgao/bigquery_more_cdk_bump branch from 292aa89 to bc71af7 Compare June 10, 2024 17:03
@edgao edgao force-pushed the destinations_refreshes_cdk_changes branch from e7f351c to 5f84378 Compare June 10, 2024 17:04
@octavia-squidington-iii octavia-squidington-iii removed the area/connectors Connector related issues label Jun 10, 2024
Base automatically changed from edgao/bigquery_more_cdk_bump to master June 10, 2024 18:35
@gisripa gisripa force-pushed the destinations_refreshes_cdk_changes branch from 5f84378 to 8234563 Compare June 11, 2024 00:03
@edgao edgao force-pushed the destinations_refreshes_cdk_changes branch from 8234563 to 21ed84f Compare June 12, 2024 17:40
@gisripa gisripa force-pushed the destinations_refreshes_cdk_changes branch from 21ed84f to 12be697 Compare June 12, 2024 21:44
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.

None yet

4 participants