Skip to content

Commit

Permalink
Merge branch 'master' into leti/experiment-speedy-connection-for-acti…
Browse files Browse the repository at this point in the history
…vation

* master: (22 commits)
  Update full-refresh-append.md (#17784)
  Update full-refresh-overwrite.md (#17783)
  Update incremental-append.md (#17785)
  Update incremental-deduped-history.md (#17786)
  Update cdc.md (#17787)
  🪟 🔧 Ignore classnames during jest snapshot comparison (#17773)
  feat: replace openjdk with amazoncorretto:17.0.4 on connectors for seсurity compliance (#17511)
  Start testing buildpulse. (#17712)
  Add missing types to the registry (#17763)
  jobs db descriptions (#16543)
  config db data catalog (#16427)
  Update lowcode docs (#17752)
  db migrations to support new webhook operations (#17671)
  Bump Airbyte version from 0.40.13 to 0.40.14 (#17762)
  September Release Notes (#17754)
  Revert "Use java-datadog-tracer-base image (#17625)" (#17759)
  Add connection migrations for schema changes (#17651)
  Connection Form Refactor - Part Two (#16748)
  Improve E2E testing around the Connection Form (#17577)
  Bump strict encrypt version (#17747)
  ...
  • Loading branch information
letiescanciano committed Oct 10, 2022
2 parents e7b49b2 + 9cc86d8 commit c16214f
Show file tree
Hide file tree
Showing 136 changed files with 7,218 additions and 4,819 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.40.13
current_version = 0.40.14
commit = False
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-[a-z]+)?
Expand Down
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


### SHARED ###
VERSION=0.40.13
VERSION=0.40.14

# When using the airbyte-db via default docker image
CONFIG_ROOT=/data
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,16 @@ jobs:
path: '/actions-runner/_work/airbyte/airbyte/*/build/test-results/*/*.xml,/actions-runner/_work/airbyte/airbyte/*/*/build/test-results/*/*.xml'
reporter: java-junit

- 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
with:
account: 59758427
repository: 283046497
path: '/actions-runner/_work/airbyte/airbyte/*'
key: ${{ secrets.BUILDPULSE_ACCESS_KEY_ID }}
secret: ${{ secrets.BUILDPULSE_SECRET_ACCESS_KEY }}

# In case of self-hosted EC2 errors, remove this block.
stop-platform-build-runner:
name: "Platform: Stop Build EC2 Runner"
Expand Down Expand Up @@ -669,6 +679,16 @@ jobs:
path: '/actions-runner/_work/airbyte/airbyte/*/build/test-results/*/*.xml'
reporter: java-junit

- 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
with:
account: 59758427
repository: 283046497
path: '/actions-runner/_work/airbyte/airbyte/*'
key: ${{ secrets.BUILDPULSE_ACCESS_KEY_ID }}
secret: ${{ secrets.BUILDPULSE_SECRET_ACCESS_KEY }}

- uses: actions/upload-artifact@v2
if: failure()
with:
Expand Down
2 changes: 1 addition & 1 deletion airbyte-bootloader/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG JDK_VERSION=17.0.4
ARG JDK_IMAGE=amazoncorretto:${JDK_VERSION}
FROM ${JDK_IMAGE}

ARG VERSION=0.40.13
ARG VERSION=0.40.14

ENV APPLICATION airbyte-bootloader
ENV VERSION ${VERSION}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void testBootloaderAppBlankDb() throws Exception {
val configsMigrator = new ConfigsDatabaseMigrator(configDatabase, configsFlyway);
// this line should change with every new migration
// to show that you meant to make a new migration to the prod database
assertEquals("0.40.11.001", configsMigrator.getLatestMigration().getVersion().getVersion());
assertEquals("0.40.12.001", configsMigrator.getLatestMigration().getVersion().getVersion());

val jobsPersistence = new DefaultJobPersistence(jobDatabase);
assertEquals(VERSION_0330_ALPHA, jobsPersistence.getVersion().get());
Expand Down
4 changes: 4 additions & 0 deletions airbyte-cdk/python/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.1.98

- Low-code: Expose WaitUntilTimeFromHeader strategy and WaitTimeFromHeader as component type

## 0.1.97

- Revert 0.1.96
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
from airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategies.exponential_backoff_strategy import (
ExponentialBackoffStrategy,
)
from airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategies.wait_time_from_header_backoff_strategy import (
WaitTimeFromHeaderBackoffStrategy,
)
from airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategies.wait_until_time_from_header_backoff_strategy import (
WaitUntilTimeFromHeaderBackoffStrategy,
)
from airbyte_cdk.sources.declarative.requesters.error_handlers.composite_error_handler import CompositeErrorHandler
from airbyte_cdk.sources.declarative.requesters.error_handlers.default_error_handler import DefaultErrorHandler
from airbyte_cdk.sources.declarative.requesters.http_requester import HttpRequester
Expand Down Expand Up @@ -69,4 +75,6 @@
"SimpleRetriever": SimpleRetriever,
"SingleSlice": SingleSlice,
"SubstreamSlicer": SubstreamSlicer,
"WaitUntilTimeFromHeader": WaitUntilTimeFromHeaderBackoffStrategy,
"WaitTimeFromHeader": WaitTimeFromHeaderBackoffStrategy,
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ class DefaultErrorHandler(ErrorHandler, JsonSchemaMixin):
4. ignore HTTP 404
`
error_handler:
- http_codes: [ 404 ]
action: IGNORE
response_filters:
- http_codes: [ 404 ]
action: IGNORE
`
5. retry if error message contains `retrythisrequest!` substring
`
Expand Down
5 changes: 3 additions & 2 deletions airbyte-cdk/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

setup(
name="airbyte-cdk",
version="0.1.97",
version="0.1.98",
description="A framework for writing Airbyte Connectors.",
long_description=README,
long_description_content_type="text/markdown",
Expand Down Expand Up @@ -44,7 +44,8 @@
packages=find_packages(exclude=("unit_tests",)),
install_requires=[
"backoff",
"dataclasses-jsonschema==2.15.1", # pinned to the last working version for us temporarily while we fix
# pinned to the last working version for us temporarily while we fix
"dataclasses-jsonschema==2.15.1",
"dpath~=2.0.1",
"jsonschema~=3.2.0",
"jsonref~=0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@
- sourceDefinitionId: afa734e4-3571-11ec-991a-1e0031268139
name: YouTube Analytics
dockerRepository: airbyte/source-youtube-analytics
dockerImageTag: 0.1.2
dockerImageTag: 0.1.3
documentationUrl: https://docs.airbyte.io/integrations/sources/youtube-analytics
icon: youtube.svg
sourceType: api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11539,7 +11539,7 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-youtube-analytics:0.1.2"
- dockerImage: "airbyte/source-youtube-analytics:0.1.3"
spec:
documentationUrl: "https://docs.airbyte.io/integrations/sources/youtube-analytics"
connectionSpecification:
Expand Down
6 changes: 3 additions & 3 deletions airbyte-container-orchestrator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG JDK_VERSION=3.1
ARG JDK_IMAGE=airbyte/java-datadog-tracer-base:${JDK_VERSION}
ARG JDK_VERSION=17.0.4
ARG JDK_IMAGE=amazoncorretto:${JDK_VERSION}
FROM ${JDK_IMAGE} AS orchestrator

ARG DOCKER_BUILD_ARCH=amd64
Expand All @@ -11,7 +11,7 @@ RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/s
&& chmod +x kubectl && mv kubectl /usr/local/bin/

# Don't change this manually. Bump version expects to make moves based on this string
ARG VERSION=0.40.13
ARG VERSION=0.40.14

ENV APPLICATION airbyte-container-orchestrator
ENV VERSION=${VERSION}
Expand Down
6 changes: 3 additions & 3 deletions airbyte-cron/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG JDK_VERSION=3.1
ARG JDK_IMAGE=airbyte/java-datadog-tracer-base:${JDK_VERSION}
ARG JDK_VERSION=17.0.4
ARG JDK_IMAGE=amazoncorretto:${JDK_VERSION}
FROM ${JDK_IMAGE} AS cron

ARG VERSION=0.40.13
ARG VERSION=0.40.14

ENV APPLICATION airbyte-cron
ENV VERSION ${VERSION}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
/*
* Copyright (c) 2022 Airbyte, Inc., all rights reserved.
*/

package io.airbyte.db.instance.configs.migrations;

import java.util.Arrays;
import org.flywaydb.core.api.migration.BaseJavaMigration;
import org.flywaydb.core.api.migration.Context;
import org.jooq.DSLContext;
import org.jooq.EnumType;
import org.jooq.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class V0_40_11_002__AddSchemaChangeColumnsToConnections extends BaseJavaMigration {

private static final Logger LOGGER = LoggerFactory.getLogger(V0_40_11_002__AddSchemaChangeColumnsToConnections.class);

@Override
public void migrate(final Context context) throws Exception {
LOGGER.info("Running migration: {}", this.getClass().getSimpleName());

final DSLContext ctx = DSL.using(context.getConnection());

addNonBreakingChangePreferenceEnumTypes(ctx);

addNotifySchemaChanges(ctx);
addNonBreakingChangePreference(ctx);
addBreakingChange(ctx);
}

private static void addNonBreakingChangePreferenceEnumTypes(final DSLContext ctx) {
ctx.createType(NonBreakingChangePreferenceType.NAME)
.asEnum(Arrays.stream(NonBreakingChangePreferenceType.values()).map(NonBreakingChangePreferenceType::getLiteral).toList())
.execute();
}

private static void addNotifySchemaChanges(final DSLContext ctx) {
ctx.alterTable("connection")
.addColumnIfNotExists(DSL.field(
"notify_schema_changes",
SQLDataType.BOOLEAN.nullable(false).defaultValue(true)))
.execute();
}

private static void addNonBreakingChangePreference(final DSLContext ctx) {
ctx.alterTable("connection")
.addColumnIfNotExists(DSL.field(
"non_breaking_change_preference",
SQLDataType.VARCHAR.asEnumDataType(NonBreakingChangePreferenceType.class).nullable(false)
.defaultValue(NonBreakingChangePreferenceType.IGNORE)))
.execute();

}

private static void addBreakingChange(final DSLContext ctx) {
ctx.alterTable("connection")
.addColumnIfNotExists(DSL.field(
"breaking_change",
SQLDataType.BOOLEAN.nullable(false).defaultValue(false)))
.execute();
}

public enum NonBreakingChangePreferenceType implements EnumType {

IGNORE("ignore"),
DISABLE("disable");

private final String literal;
public static final String NAME = "non_breaking_change_preference_type";

NonBreakingChangePreferenceType(final String literal) {
this.literal = literal;
}

@Override
public String getName() {
return NAME;
}

@Override
public String getLiteral() {
return literal;
}

}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
* Copyright (c) 2022 Airbyte, Inc., all rights reserved.
*/

package io.airbyte.db.instance.configs.migrations;

import org.flywaydb.core.api.migration.BaseJavaMigration;
import org.flywaydb.core.api.migration.Context;
import org.jooq.DSLContext;
import org.jooq.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

// TODO: update migration description in the class name
public class V0_40_12_001__AddWebhookOperationColumns extends BaseJavaMigration {

private static final Logger LOGGER = LoggerFactory.getLogger(V0_40_12_001__AddWebhookOperationColumns.class);

@Override
public void migrate(final Context context) throws Exception {
LOGGER.info("Running migration: {}", this.getClass().getSimpleName());

// Warning: please do not use any jOOQ generated code to write a migration.
// As database schema changes, the generated jOOQ code can be deprecated. So
// old migration may not compile if there is any generated code.
final DSLContext ctx = DSL.using(context.getConnection());
addWebhookOperationConfigColumn(ctx);
addWebhookOperationType(ctx);
addWebhookConfigColumnsToWorkspaceTable(ctx);
}

private void addWebhookConfigColumnsToWorkspaceTable(final DSLContext ctx) {
ctx.alterTable("workspace")
.addColumnIfNotExists(DSL.field(
"webhook_operation_configs",
SQLDataType.JSONB.nullable(true)))
.execute();
}

private void addWebhookOperationType(final DSLContext ctx) {
ctx.alterType("operator_type").addValue("webhook").execute();
}

private void addWebhookOperationConfigColumn(final DSLContext ctx) {
ctx.alterTable("operation").addColumnIfNotExists(DSL.field("operator_webhook",
SQLDataType.JSONB.nullable(true))).execute();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ create table "public"."connection"(
"schedule_type" schedule_type null,
"schedule_data" jsonb null,
"geography" geography_type not null default null,
"notify_schema_changes" bool not null default true,
"non_breaking_change_preference" varchar(7) not null default '''ignore''::character varying',
"breaking_change" bool not null default false,
constraint "connection_pkey"
primary key ("id")
);
Expand All @@ -131,6 +134,7 @@ create table "public"."operation"(
"tombstone" bool not null default false,
"created_at" timestamptz(35) not null default null,
"updated_at" timestamptz(35) not null default null,
"operator_webhook" jsonb null,
constraint "operation_pkey"
primary key ("id")
);
Expand Down Expand Up @@ -175,6 +179,7 @@ create table "public"."workspace"(
"created_at" timestamptz(35) not null default null,
"updated_at" timestamptz(35) not null default null,
"geography" geography_type not null default null,
"webhook_operation_configs" jsonb null,
constraint "workspace_pkey"
primary key ("id")
);
Expand Down
6 changes: 4 additions & 2 deletions airbyte-integrations/bases/base-java/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
ARG JDK_VERSION=17.0.1
FROM openjdk:${JDK_VERSION}-slim
ARG JDK_VERSION=17.0.4
FROM amazoncorretto:${JDK_VERSION}
COPY --from=airbyte/integration-base:dev /airbyte /airbyte

RUN yum install -y tar openssl && yum clean all

WORKDIR /airbyte

COPY javabase.sh .
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
ARG JDK_VERSION=17.0.1
FROM openjdk:${JDK_VERSION}-slim
ARG JDK_VERSION=17.0.4
FROM amazoncorretto:${JDK_VERSION}

ARG DOCKER_BUILD_ARCH=amd64

# Install Docker to launch worker images. Eventually should be replaced with Docker-java.
# See https://gitter.im/docker-java/docker-java?at=5f3eb87ba8c1780176603f4e for more information on why we are not currently using Docker-java
RUN apt-get update && apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
RUN add-apt-repository \
"deb [arch=${DOCKER_BUILD_ARCH}] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable"
RUN apt-get update && apt-get install -y docker-ce-cli jq
RUN amazon-linux-extras install -y docker
RUN yum install -y openssl jq tar && yum clean all

ENV APPLICATION base-standard-source-test-file

Expand Down
2 changes: 1 addition & 1 deletion airbyte-integrations/bases/base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:10.5-slim
FROM amazonlinux:2022.0.20220831.1

WORKDIR /airbyte

Expand Down
Loading

0 comments on commit c16214f

Please sign in to comment.