Skip to content

Commit

Permalink
Data types update: Implement protocol message migrations (#19240)
Browse files Browse the repository at this point in the history
* Extract MigrationContainer from AirbyteMessageMigrator

* Add ConfiguredAirbyteCatalogMigrations

* Add ConfiguredAirbyteCatalog to AirbyteMessageMigrations

* Enable ConfiguredAirbyteCatalog migration

* set up scaffolding

* [wip] more scaffolding, basic unit test

* minimal green code

* [wip] add failing test for other primitive types

* correct version number

* handle basic primitive type decls

* add implicit cases

* add recursive schema

* formatting

* comment

* support not

* fix indentation

* handle all nested schema cases

* handle boolean schemas

* verify empty schema handling

* cleanup

* extract map

* code organization

* extract method

* reformat

* [wip] more tests, minor fix type array handling

* corrected test

* cleanup

* reformat

* switch to v1

* add support for multityped fields

* missed test case

* nested test class

* basic record upgrade

* implement record upgrades

* slight refactor

* comments+clarificationso

* extract constants

* (partly) correct model classes

* add de/ser

* formatting

* extract constants

* fix json reference

* update docs

* switch to v1 models

* fix compile+test

* add base64 handling

* use vnull

* Data types update: Implement protocol message downgrade path (#19909)

* rough skeleton for passing catalog into migration

* basic test

* more scaffolding

* basic implementation

* add primitives test

* add in other tests (nested fields currently failing)

* add formats

* impleent oneOf handling

* formatting

* oneOf handling

* better tests

* comments + organization

* progress

* basic test case

* downgrade objects, ish

* basic array implementation

* handle numeric failure

* test for new type

* handle array items

* empty schema handling

* first pass at oneof handling

* add more tests+handling

* more tests

* comments

* add empty oneof test case

* format + reorganize

* more reorganize

* fix name

* also downgrade binary data

* only import vnull

* move migrations into v1 package

* extract schema mutation code

* comment

* extract schema migration to new class

* extract record downgrade logic for future use

* format

* fix build after rebase

* rename private method for consistency

* also implement configuredcatalog migrations >.>

* quick and dirty tests

* slight cleanup

* fix tests

* pmd

* pmd test

* null check on message objects

* maybe fix acceptance tests?

* fix name

* extract constants

* more fixes

* tmp

* meh

* fix cdc acc tests

* revert to master source-postgres

* remove log messages

* revert other misc hacks

* integers are valid cursors

* remove unrelated change

* fix build

* fix build more?

* [MUST REVERT] use dev normalization

* capture kube logs

* also here?

* no debug logs?

* delete dup from merging

* add final everywhere

* revert test changes

Co-authored-by: Jimmy Ma <jimmy@airbyte.io>
  • Loading branch information
edgao and gosusnp authored Jan 11, 2023
1 parent ee150e3 commit 5e819a4
Show file tree
Hide file tree
Showing 25 changed files with 2,934 additions and 156 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
description: "Enable or disable tmate session for debug during helm ac tests"
type: choice
default: 'false'
options:
options:
- 'true'
- 'false'
required: false
Expand Down Expand Up @@ -305,7 +305,7 @@ jobs:
if: always()
run: |
gcs_bucket_name="dev-ab-ci-run-results"
filename=$(echo "${{ fromJSON( steps.connectors-test-results.outputs.json ).check_url }}" | sed 's@.*/@@')
filename=$(echo "${{ fromJSON( steps.connectors-test-results.outputs.json ).check_url }}" | sed 's@.*/@@')
echo "$filename"
gsutil -h "Cache-Control:public" cp connectors_base_results.jsonl "gs://$gcs_bucket_name/oss/$filename.jsonl"
Expand Down Expand Up @@ -699,7 +699,7 @@ jobs:
if: always()
run: |
gcs_bucket_name="dev-ab-ci-run-results"
filename=$(echo "${{ fromJSON( steps.platform-results.outputs.json ).check_url }}" | sed 's@.*/@@')
filename=$(echo "${{ fromJSON( steps.platform-results.outputs.json ).check_url }}" | sed 's@.*/@@')
echo "$filename"
gsutil -h "Cache-Control:public" cp platform_results.jsonl "gs://$gcs_bucket_name/oss/$filename.jsonl"
Expand Down Expand Up @@ -756,7 +756,7 @@ jobs:
github-token: ${{ env.PAT }}
label: ${{ needs.start-platform-build-runner.outputs.label }}
ec2-instance-id: ${{ needs.start-platform-build-runner.outputs.ec2-instance-id }}

## Kube Acceptance Tests
# Docker acceptance tests run as part of the build job.
# In case of self-hosted EC2 errors, remove this block.
Expand Down Expand Up @@ -919,7 +919,7 @@ jobs:
if: always()
run: |
gcs_bucket_name="dev-ab-ci-run-results"
filename=$(echo "${{ fromJSON( steps.kube-results.outputs.json ).check_url }}" | sed 's@.*/@@')
filename=$(echo "${{ fromJSON( steps.kube-results.outputs.json ).check_url }}" | sed 's@.*/@@')
echo "$filename"
gsutil -h "Cache-Control:public" cp kube_results.jsonl "gs://$gcs_bucket_name/oss/$filename.jsonl"
Expand Down Expand Up @@ -1036,7 +1036,7 @@ jobs:
- name: Fix EC-2 Runner
run: |
mkdir -p /actions-runner/_work/airbyte/airbyte && mkdir -p /actions-runner/_work/airbyte/airbyte/.kube
- name: Checkout Airbyte
uses: actions/checkout@v2
with:
Expand All @@ -1059,7 +1059,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.9'

- uses: actions/setup-java@v1
with:
Expand Down Expand Up @@ -1087,11 +1087,11 @@ jobs:
sudo apt-get -y install tmate
attempt_limit: 3
attempt_delay: 2000 # in ms

- name: Start tmate session in background
if: inputs.debug_mode == 'true'
shell: bash
run: |
run: |
tmate -S /tmp/tmate.sock new-session -d # Launch tmate in a headless mode
tmate -S /tmp/tmate.sock wait tmate-ready # Blocks until the SSH connection is established
tmate -S /tmp/tmate.sock display -p '#{tmate_ssh}' # Prints the SSH connection string
Expand Down Expand Up @@ -1163,7 +1163,7 @@ jobs:
with:
name: Kubernetes Logs
path: /tmp/kubernetes_logs/*

- name: Upload test results to BuildPulse for flaky test detection
if: "!cancelled()" # Run this step even when the tests fail. Skip if the workflow is cancelled.
uses: Workshop64/buildpulse-action@main
Expand All @@ -1173,13 +1173,13 @@ jobs:
path: "/actions-runner/_work/airbyte/airbyte/*"
key: ${{ secrets.BUILDPULSE_ACCESS_KEY_ID }}
secret: ${{ secrets.BUILDPULSE_SECRET_ACCESS_KEY }}

- name: "Display logs of k3s"
if: failure()
shell: bash
run: |
journalctl -xeu k3s.service
# # In case of self-hosted EC2 errors, remove this block.
stop-helm-acceptance-test-runner:
Expand Down
1 change: 1 addition & 0 deletions airbyte-commons-protocol/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ dependencies {
testImplementation libs.bundles.micronaut.test

implementation project(':airbyte-protocol:protocol-models')
implementation project(':airbyte-json-validation')
}

Task publishArtifactsTask = getPublishArtifactsTask("$rootProject.ext.version", project)

This file was deleted.

This file was deleted.

Loading

0 comments on commit 5e819a4

Please sign in to comment.