-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into leti/experiment-speedy-connection-for-acti…
…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
Showing
136 changed files
with
7,218 additions
and
4,819 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
90 changes: 90 additions & 0 deletions
90
...yte/db/instance/configs/migrations/V0_40_11_002__AddSchemaChangeColumnsToConnections.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
|
||
} | ||
|
||
} |
50 changes: 50 additions & 0 deletions
50
...a/io/airbyte/db/instance/configs/migrations/V0_40_12_001__AddWebhookOperationColumns.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 4 additions & 14 deletions
18
airbyte-integrations/bases/base-standard-source-test-file/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
|
Oops, something went wrong.