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

Use MessageMigration for Source Connection Check. #17656

Merged
merged 9 commits into from
Oct 13, 2022

Conversation

gosusnp
Copy link
Contributor

@gosusnp gosusnp commented Oct 6, 2022

What

Use MessageMigration for Source Connection Check.
Also contains some remaining API fixes for Versioning.

Relates to #16038 and #15991

How

The approach is to pass the protocol version of the connector into the CheckConnectionActivityImpl because it is currently where we create the AirbyteStreamFactory we need to override to handle versioning.
In terms of passing the information around, it is added to IntegrationLauncherConfig. Ideally we should probably pass more connector specific information, however, it is currently not done and probably not worth refactoring for now. IntegrationLauncherConfig looked like a reasonable option because eventually, we may want to update the IntegrationLauncher, to directly provide the VersionedStream. Currently, it has an uneven abstraction depending if it is for replication or the other operations. For replication, we provide a more advanced abstraction that exposes AirbyteMessage directly where the other expose a Stream and let the worker convert messages into AirbyteMessage

Details of the changes

  • Fix more AirbyteVersion instances that should be Version instead
  • Add VersionedMigratorFactory to facilitate injection of Migrations into workers
  • Add Json serializers and deserializers for Version to be able to use it directly in our internal objects.
  • Enable the default Migration, we should not actually use it, however, we use it to detect the most recent version to avoid migration from version A to the same version A
  • Propagate the protocol version information from the source def to the DefaultCheckConnectionWorker

Recommended reading order

  1. The key changes to actually start using migrations is in CheckConnectionActivityImpl.java
  2. The rest of the changes are mostly interface fixes to pass information around.

🚨 User Impact 🚨

There should be no visible impact, but we will start using the new migration layer for Source Connection Checks.

@github-actions github-actions bot added area/platform issues related to the platform area/server area/worker Related to worker labels Oct 6, 2022
@gosusnp gosusnp temporarily deployed to more-secrets October 6, 2022 01:31 Inactive
Copy link
Contributor

@jdpgrailsdev jdpgrailsdev left a comment

Choose a reason for hiding this comment

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

:shipit: LGTM...looks like there is an unrelated, non-test related failure in the Kube acceptance tests: ERROR: failed to load image: command "docker exec --privileged -i chart-testing-worker ctr --namespace=k8s.io images import -" failed with error: exit status 1.

@gosusnp gosusnp temporarily deployed to more-secrets October 13, 2022 14:31 Inactive
@gosusnp gosusnp merged commit f267746 into master Oct 13, 2022
@gosusnp gosusnp deleted the gosusnp/15991-use-serde-in-stream-factory branch October 13, 2022 15:11
letiescanciano added a commit that referenced this pull request Oct 14, 2022
…vation

* master: (98 commits)
  🐛 Source Bing Ads - Fix Campaigns stream misses Audience and Shopping (#17873)
  Source S3 - fix schema inference (#17991)
  🎉 JDBC sources: store cursor record count in db state (#15535)
  Introduce webhook configs into workspace api and persistence (#17950)
  ci: upload test results to github for analysis (#17953)
  Trigger the connectors build if there are worker changes. (#17976)
  Add additional sync timing information (#17643)
  Use page_token_option instead of page_token (#17892)
  capture metrics around json messages size (#17973)
  🐛 Correct kube annotations variable as per the docs. (#17972)
  🪟 🎉 Add /connector-builder page with embedded YAML editor (#17482)
  fix `est_num_metrics_emitted_by_reporter` not being emitted (#17929)
  Update schema dumps (#17960)
  Remove the bump in the value.yml (#17959)
  Ensure database initialization in test container (#17697)
  Remove typo line from incremental reads docs (#17920)
  DocS: Update authentication.md (#17931)
  Use MessageMigration for Source Connection Check. (#17656)
  fixed links (#17949)
  remove usages of YamlSeedConfigPersistence (#17895)
  ...
jhammarstedt pushed a commit to jhammarstedt/airbyte that referenced this pull request Oct 31, 2022
* More AirbyteVersion references fix

* Propagate protocol version from sourceDef to SchedulerClient

* Propagate protocol version to LauncherConfig

* Add VersionedMigratorFactory

* Update VersionedAirbyteStreamFactory

* Fix Version Json serialization/deserialization

* Plug message migration in CheckConnection for Sources
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/platform issues related to the platform area/server area/worker Related to worker
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants