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: Track stream statuses in async framework #38075

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

edgao
Copy link
Contributor

@edgao edgao commented May 8, 2024

closes https://github.com/airbytehq/airbyte-internal-issues/issues/7608; closes #7621

  • track stream statuses
  • pass stream status into the StreamSyncSummary
  • AbstractStreamOperation skips overwriteFinalTable if the status was not COMPLETE

this PR has "safe" default behavior, i.e. if platform doesn't send a stream status message then we assume success. This is compatible with older platform versions. See #38067 for how we switch to the backwards-incompatible behavior (which is required for no data downtime).

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 10, 2024 4:41pm

@octavia-squidington-iii octavia-squidington-iii added the CDK Connector Development Kit label May 8, 2024
Copy link
Contributor Author

edgao commented May 8, 2024

@edgao edgao force-pushed the destinations_refreshes_cdk_changes branch from 50c1e4b to e857ce6 Compare May 8, 2024 21:13
@edgao edgao force-pushed the edgao/async_tracking_stream_statuses branch from fdf57a0 to 4514243 Compare May 8, 2024 21:13
@edgao edgao force-pushed the destinations_refreshes_cdk_changes branch from e857ce6 to 982948e Compare May 8, 2024 21:21
@edgao edgao force-pushed the edgao/async_tracking_stream_statuses branch 2 times, most recently from 7eb8203 to 2a3f5d9 Compare May 8, 2024 21:38
@edgao edgao force-pushed the destinations_refreshes_cdk_changes branch from 982948e to 0fd05a7 Compare May 8, 2024 21:39
@edgao edgao force-pushed the edgao/async_tracking_stream_statuses branch from 2a3f5d9 to 7753251 Compare May 8, 2024 21:39
@edgao edgao force-pushed the destinations_refreshes_cdk_changes branch from 0fd05a7 to 0d4af89 Compare May 8, 2024 21:42
@edgao edgao force-pushed the edgao/async_tracking_stream_statuses branch from 7753251 to 757297c Compare May 8, 2024 21:42
@edgao edgao force-pushed the destinations_refreshes_cdk_changes branch from 0d4af89 to 52b9185 Compare May 8, 2024 21:43
@edgao edgao force-pushed the edgao/async_tracking_stream_statuses branch from 757297c to 21d308b Compare May 8, 2024 21:43
@edgao edgao force-pushed the destinations_refreshes_cdk_changes branch from 52b9185 to ccf601a Compare May 8, 2024 21:45
@edgao edgao force-pushed the edgao/async_tracking_stream_statuses branch from 21d308b to 34d6f0b Compare May 8, 2024 21:46
@edgao edgao force-pushed the destinations_refreshes_cdk_changes branch from ccf601a to 6839b3f Compare May 8, 2024 21:51
@edgao edgao force-pushed the edgao/async_tracking_stream_statuses branch from 34d6f0b to cf93b76 Compare May 8, 2024 21:52
@edgao edgao force-pushed the destinations_refreshes_cdk_changes branch from 6839b3f to d361d45 Compare May 8, 2024 22:00
@edgao edgao force-pushed the edgao/async_tracking_stream_statuses branch from cf93b76 to 5878c44 Compare May 8, 2024 22:00
@edgao edgao requested a review from gisripa May 8, 2024 23:00
@edgao edgao force-pushed the edgao/async_tracking_stream_statuses branch from 5878c44 to de8e132 Compare May 9, 2024 16:30
@edgao edgao changed the base branch from destinations_refreshes_cdk_changes to edgao/better_default_namespace_tracking May 9, 2024 16:31
@edgao edgao force-pushed the edgao/async_tracking_stream_statuses branch 2 times, most recently from 136594e to 3c20271 Compare May 9, 2024 18:12
import io.airbyte.protocol.models.v0.StreamDescriptor

/**
* Interface allowing destination to specify clean up logic that must be executed after all
* record-related logic has finished.
*
* The map of StreamSyncSummaries MUST be non-null, but MAY be empty. Streams not present in the map
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 was only needed for BufferedStreamConsumer, which should no longer be relevant to DV2 destinations...

@edgao edgao force-pushed the edgao/catalog_parser_improvements branch from e29c5d9 to 1f11d82 Compare May 30, 2024 14:49
@edgao edgao force-pushed the edgao/async_tracking_stream_statuses branch from 221663a to 80bab4a Compare May 30, 2024 14:49
@edgao edgao mentioned this pull request May 30, 2024
2 tasks
@edgao edgao force-pushed the edgao/catalog_parser_improvements branch from 1f11d82 to afef1a6 Compare May 31, 2024 15:20
@edgao edgao force-pushed the edgao/async_tracking_stream_statuses branch from 80bab4a to 96c5070 Compare May 31, 2024 15:20
@@ -3,17 +3,9 @@
*/
package io.airbyte.cdk.integrations.destination

import java.util.*
import io.airbyte.protocol.models.v0.AirbyteStreamStatusTraceMessage.AirbyteStreamStatus
Copy link
Contributor

Choose a reason for hiding this comment

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

for later: we need to clean up this v0 protocol from dependency before we introduce protocol versioning. most places we use classes from v0 and some non-v0

AirbyteMessage.Type.STATE -> {
stateManager.trackState(message, sizeInBytes.toLong())
}
else -> {}
Copy link
Contributor

Choose a reason for hiding this comment

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

👌

@octavia-squidington-iv octavia-squidington-iv requested a review from a team June 5, 2024 19:10
@edgao edgao force-pushed the edgao/catalog_parser_improvements branch from afef1a6 to 60fe677 Compare June 6, 2024 16:15
@edgao edgao force-pushed the edgao/async_tracking_stream_statuses branch 4 times, most recently from 9c697a3 to 1be53b3 Compare June 6, 2024 22:23
@gisripa gisripa force-pushed the edgao/catalog_parser_improvements branch from 60fe677 to 7910b55 Compare June 7, 2024 20:18
@edgao edgao force-pushed the edgao/catalog_parser_improvements branch from 7910b55 to 1638b6d Compare June 7, 2024 23:12
@edgao edgao force-pushed the edgao/async_tracking_stream_statuses branch from 1be53b3 to 600a84f Compare June 7, 2024 23:12
@gisripa gisripa force-pushed the edgao/catalog_parser_improvements branch from 1638b6d to 7910b55 Compare June 8, 2024 02:38
@edgao edgao force-pushed the edgao/catalog_parser_improvements branch from 7910b55 to feba86e Compare June 10, 2024 16:13
@edgao edgao force-pushed the edgao/async_tracking_stream_statuses branch from 600a84f to 30466fd Compare June 10, 2024 16:13
Base automatically changed from edgao/catalog_parser_improvements to master June 10, 2024 16:40
@edgao edgao force-pushed the edgao/async_tracking_stream_statuses branch from 30466fd to c469716 Compare June 10, 2024 16:40
@edgao
Copy link
Contributor Author

edgao commented Jun 10, 2024

/publish-java-cdk

🕑 https://github.com/airbytehq/airbyte/actions/runs/9452252277
✅ Successfully published Java CDK version=0.37.1!

@edgao edgao merged commit 05fd09b into master Jun 10, 2024
25 checks passed
@edgao edgao deleted the edgao/async_tracking_stream_statuses branch June 10, 2024 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CDK Connector Development Kit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants