* Add Airbyte Protocol V1 support. * Fix VersionedAirbyteStreamFactoryTest * Remove AirbyteMessageMigrationV0 example * Add Protocol Version constants * 🎉Updated normalization to handle new datatypes (#19721) * Updated normalization simple stream processing to handle new datatypes * Updated normalization nested stream processing to handle new datatypes * Updated normalization nested stream processing to handle new datatypes * Updated normalization drop_scd_catalog processing to handle new datatypes * Updated normalization ephemeral test processing to handle new datatypes * fixed more tests for normalization * fixed more tests for normalization * fixed more tests for normalization * fixed more tests for normalization * fixed more issues * fixed more issues (clickhouse) * fixed more issues * fixed more issues * fixed more issues * added binary type processing for some DBs * cleared commented code and moved some hardcodes to processing as macro * fixed codestyle and cleared commented code * minor refactor * minor refactor * minor refactor * fixed bool cast error * fixed dict->str cast error * fixed is_combining_node cast py check * removed commented code * removed commented code * committed autogenerated normalization_test_output files * committed autogenerated normalization_test_output files (new files) * refactored utils.py * Updated utils.py to use Callable functions and get rid of property_type in is_number and is_bool functions * committed autogenerated normalization_test_output files (new files) * fixed typo in TIMESTAMP_WITH_TIMEZONE_TYPE * updated stream_processor to handle string type first as a wider type * fixed arrays normalization by updating is_simple_property method as per new approaches * format Co-authored-by: Edward Gao <edward.gao@airbyte.io> * Update airbyte protocol migration (#20745) * Extract MigrationContainer from AirbyteMessageMigrator * Add ConfiguredAirbyteCatalogMigrations * Add ConfiguredAirbyteCatalog to AirbyteMessageMigrations * Enable ConfiguredAirbyteCatalog migration * Fix tests * Remove extra this. * Add missing docs * Typo Co-authored-by: Edward Gao <edward.gao@airbyte.io> * Data types update: Implement protocol message migrations (#19240) * 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> * On-the-fly migrations of persisted catalogs (#21757) * On the fly catalog migration for normalization activity * On the fly catalog migration for job persistence * On the fly migration for standard sync persistence * On the fly migration for airbyte catalogs * Refactor code to share JsonSchema traversal * Add V0 Data type search function * PMD and Format * Fix getOrInsertActorCatalog and ConfigRepositoryE2E tests * Null-proofing CatalogMigrationV1Helper * More null checks * Fix test * Format * Add data type v1 support to the FE * Changes AC test check to check exited ps (#21672) some docker compose changes no longer show exited processes. this broke out test this change should fix master tested in a runner that failed * Move wellknown types mapping to the utility function * use protocolv1 normalization --------- Co-authored-by: Topher Lubaway <asimplechris@gmail.com> Co-authored-by: Edward Gao <edward.gao@airbyte.io> * Update protocol support range (#21996) * bump normalization version to 0.3.0 * Add version check on normalization (#22048) * Add normalization min version check * Add visible for testing --------- Co-authored-by: Edward Gao <edward.gao@airbyte.io> Co-authored-by: Eugene <etsybaev@gmail.com> Co-authored-by: Topher Lubaway <asimplechris@gmail.com>
108 lines
4.0 KiB
Bash
Executable File
108 lines
4.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
. tools/lib/lib.sh
|
|
|
|
assert_root
|
|
|
|
|
|
echo "Getting docker internal host ip"
|
|
DOCKER_HOST_IP=$(ip -f inet add show docker0 | sed -En -e 's/.*inet ([0-9.]+).*/\1/p')
|
|
|
|
echo "Patching coredns configmap NodeHosts with new entry for docker host"
|
|
kubectl patch configmap/coredns \
|
|
-n kube-system \
|
|
--type merge \
|
|
-p '{"data":{"NodeHosts": "${DOCKER_HOST_IP} host.docker.internal" }}'
|
|
|
|
if [ -n "$CI" ]; then
|
|
echo "Deploying fluentbit"
|
|
helm repo add fluent https://fluent.github.io/helm-charts
|
|
helm repo update fluent
|
|
sed -i "s/PLACEHOLDER/${WORKFLOW_RUN_ID}/" tools/bin/fluent_values.yaml
|
|
helm install --values tools/bin/fluent_values.yaml --set env[1].name="AWS_ACCESS_KEY_ID" --set env[1].value=$(echo "$AWS_S3_INTEGRATION_TEST_CREDS" | jq -r .aws_access_key_id) \
|
|
--set env[2].name="AWS_SECRET_ACCESS_KEY" --set env[2].value=$(echo "$AWS_S3_INTEGRATION_TEST_CREDS" | jq -r .aws_secret_access_key) \
|
|
--set env[3].name="AWS_S3_BUCKET" --set env[3].value=${AWS_S3_BUCKET} \
|
|
--set env[4].name="SUITE_TYPE" --set env[4].value="helm-logs" \
|
|
--generate-name fluent/fluent-bit
|
|
fi
|
|
|
|
echo "Replacing default Chart.yaml and values.yaml with a test one"
|
|
mv charts/airbyte/Chart.yaml charts/airbyte/Chart.yaml.old
|
|
mv charts/airbyte/Chart.yaml.test charts/airbyte/Chart.yaml
|
|
mv charts/airbyte/values.yaml charts/airbyte/values.yaml.old
|
|
mv charts/airbyte/values.yaml.test charts/airbyte/values.yaml
|
|
|
|
echo "Starting app..."
|
|
|
|
echo "Check if kind cluster is running..."
|
|
sudo docker ps
|
|
|
|
echo "Applying dev-integration-test manifests to kubernetes..."
|
|
cd charts/airbyte && helm repo add bitnami https://charts.bitnami.com/bitnami && helm dep update && cd -
|
|
helm upgrade --install --debug airbyte charts/airbyte
|
|
|
|
echo "Waiting for server to be ready..."
|
|
kubectl wait --for=condition=Available deployment/airbyte-server --timeout=300s || (kubectl describe pods && exit 1)
|
|
|
|
echo "Scale up workers by 2"
|
|
kubectl scale --replicas=2 deployment airbyte-worker
|
|
|
|
echo "Listing nodes scheduled for pods..."
|
|
kubectl describe pods | grep "Name\|Node"
|
|
|
|
|
|
# allocates a lot of time to start kube. takes a while for postgres+temporal to work things out
|
|
sleep 120
|
|
|
|
if [ -n "$CI" ]; then
|
|
server_logs () { kubectl logs deployment.apps/airbyte-server > /tmp/kubernetes_logs/server.txt; }
|
|
pod_sweeper_logs () { kubectl logs deployment.apps/airbyte-pod-sweeper > /tmp/kubernetes_logs/pod_sweeper.txt; }
|
|
worker_logs () { kubectl logs deployment.apps/airbyte-worker > /tmp/kubernetes_logs/worker.txt; }
|
|
db_logs () { kubectl logs deployment.apps/airbyte-db > /tmp/kubernetes_logs/db.txt; }
|
|
temporal_logs () { kubectl logs deployment.apps/airbyte-temporal > /tmp/kubernetes_logs/temporal.txt; }
|
|
describe_pods () { kubectl describe pods > /tmp/kubernetes_logs/describe_pods.txt; }
|
|
describe_nodes () { kubectl describe nodes > /tmp/kubernetes_logs/describe_nodes.txt; }
|
|
write_all_logs () {
|
|
server_logs;
|
|
worker_logs;
|
|
db_logs;
|
|
temporal_logs;
|
|
pod_sweeper_logs;
|
|
describe_nodes;
|
|
describe_pods;
|
|
}
|
|
# Uncomment for debugging. Warning, this is verbose.
|
|
# trap "mkdir -p /tmp/kubernetes_logs && write_all_logs" EXIT
|
|
fi
|
|
|
|
kubectl expose $(kubectl get po -l app.kubernetes.io/name=server -o name) --name exposed-server-svc --type NodePort --overrides '{ "apiVersion": "v1","spec":{"ports": [{"port":8001,"protocol":"TCP","targetPort":8001,"nodePort":8001}]}}'
|
|
|
|
echo "Running worker integration tests..."
|
|
KUBE=true SUB_BUILD=PLATFORM ./gradlew :airbyte-workers:integrationTest --scan
|
|
|
|
echo "Printing system disk usage..."
|
|
df -h
|
|
|
|
echo "Printing docker disk usage..."
|
|
docker system df
|
|
|
|
if [ -n "$CI" ]; then
|
|
echo "Pruning all images..."
|
|
docker image prune --all --force
|
|
|
|
echo "Printing system disk usage after pruning..."
|
|
df -h
|
|
|
|
echo "Printing docker disk usage after pruning..."
|
|
fi
|
|
docker system df
|
|
|
|
echo "Running e2e tests via gradle..."
|
|
KUBE=true SUB_BUILD=PLATFORM USE_EXTERNAL_DEPLOYMENT=true ./gradlew :airbyte-tests:acceptanceTests --scan
|
|
|
|
echo "Reverting changes back"
|
|
mv charts/airbyte/Chart.yaml charts/airbyte/Chart.yaml.test
|
|
mv charts/airbyte/Chart.yaml.old charts/airbyte/Chart.yaml
|