Skip to content

Commit e43614f

Browse files
Merge branch 'master' into ryermilov/source-facebook-marketing-fix-acceptance-tests
2 parents 37c6777 + b8b6886 commit e43614f

File tree

317 files changed

+6628
-18524
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

317 files changed

+6628
-18524
lines changed

.github/workflows/airbyte-ci-tests.yml

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ jobs:
3232
filters: |
3333
# This list is duplicated in `pipelines/airbyte_ci/test/__init__.py`
3434
internal_poetry_packages:
35-
- airbyte-lib/**
3635
- airbyte-ci/connectors/pipelines/**
3736
- airbyte-ci/connectors/base_images/**
3837
- airbyte-ci/connectors/common_utils/**

.github/workflows/connector_code_freeze.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- name: Get changed files
4747
if: steps.check-code-freeze-in-effect.outputs.is_in_code_freeze == 'true'
4848
id: changed-files
49-
uses: tj-actions/changed-files@v40
49+
uses: tj-actions/changed-files@v44
5050
with:
5151
files_yaml: |
5252
connectors:

.github/workflows/publish-airbyte-lib-command-manually.yml

-57
This file was deleted.

.github/workflows/upload-metadata-files.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
uses: actions/checkout@v2
1313
- name: Get changed files
1414
id: changed-files
15-
uses: tj-actions/changed-files@v35
15+
uses: tj-actions/changed-files@v44
1616
with:
1717
files: "airbyte-integrations/connectors/**/metadata.yaml"
1818
- name: Setup Python 3.10

airbyte-cdk/java/airbyte-cdk/build.gradle

+3
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ allprojects {
5050
testFixturesImplementation.extendsFrom implementation
5151
testFixturesRuntimeOnly.extendsFrom runtimeOnly
5252
}
53+
54+
// This is necessary because the mockit.kotlin any() generates a bunch of bad casts
55+
spotbugsTest.omitVisitors = ['FindBadCast2']
5356
}
5457

5558
description = "Airbyte Connector Development Kit (CDK) for Java."

airbyte-cdk/java/airbyte-cdk/core/build.gradle

+4
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ compileKotlin {
5050
}
5151
}
5252

53+
spotbugsTest.enabled = false
54+
spotbugsTestFixtures.enabled = false
55+
56+
5357
dependencies {
5458

5559
api 'com.datadoghq:dd-trace-api:1.28.0'

airbyte-cdk/java/airbyte-cdk/datastore-postgres/build.gradle

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ compileKotlin {
1111
}
1212
}
1313

14+
spotbugsTest.enabled = false
15+
1416
dependencies {
1517
implementation project(':airbyte-cdk:java:airbyte-cdk:dependencies')
1618
implementation project(':airbyte-cdk:java:airbyte-cdk:core')

airbyte-cdk/java/airbyte-cdk/db-destinations/build.gradle

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ compileKotlin.compilerOptions.allWarningsAsErrors = false
1212
compileTestFixturesKotlin.compilerOptions.allWarningsAsErrors = false
1313
compileTestKotlin.compilerOptions.allWarningsAsErrors = false
1414

15+
spotbugsTest.enabled = false
16+
spotbugsTestFixtures.enabled = false
17+
1518
dependencies {
1619
api 'org.apache.commons:commons-csv:1.10.0'
1720

airbyte-cdk/java/airbyte-cdk/db-sources/build.gradle

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ compileKotlin.compilerOptions.allWarningsAsErrors = false
1515
compileTestFixturesKotlin.compilerOptions.allWarningsAsErrors = false
1616
compileTestKotlin.compilerOptions.allWarningsAsErrors = false
1717

18+
spotbugsTestFixtures.enabled = false
19+
spotbugsTest.enabled = false
20+
1821

1922
// Convert yaml to java: relationaldb.models
2023
jsonSchema2Pojo {
@@ -49,6 +52,7 @@ dependencies {
4952
testFixturesImplementation project(':airbyte-cdk:java:airbyte-cdk:core')
5053
testFixturesApi testFixtures(project(':airbyte-cdk:java:airbyte-cdk:core'))
5154

55+
testFixturesImplementation ('io.airbyte:airbyte-api:0.55.2') { transitive = false }
5256
testFixturesImplementation 'net.sourceforge.argparse4j:argparse4j:0.9.0'
5357
testFixturesImplementation 'io.swagger:swagger-annotations:1.6.13'
5458
testFixturesImplementation 'org.hamcrest:hamcrest-all:1.3'

airbyte-cdk/java/airbyte-cdk/dependencies/build.gradle

+3-147
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2-
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
3-
import org.openapitools.generator.gradle.plugin.tasks.GenerateTask
4-
51
plugins {
62
id "com.github.eirnym.js2p" version "1.0"
7-
id "de.undercouch.download" version "5.4.0"
83
id "java-library"
9-
id "org.openapi.generator" version "6.2.1"
104
}
115

126
java {
@@ -25,127 +19,11 @@ compileKotlin.compilerOptions.allWarningsAsErrors = false
2519
compileTestFixturesKotlin.compilerOptions.allWarningsAsErrors = false
2620
compileTestKotlin.compilerOptions.allWarningsAsErrors = false
2721

28-
String specFile = "$projectDir/src/main/openapi/config.yaml"
29-
String serverOutputDir = "$buildDir/generated/api/server"
30-
String clientOutputDir = "$buildDir/generated/api/client"
31-
String docsOutputDir = "$buildDir/generated/api/docs"
32-
Map<String,String> schemaMappingsValue = [
33-
'OAuthConfiguration' : 'com.fasterxml.jackson.databind.JsonNode',
34-
'SourceDefinitionSpecification' : 'com.fasterxml.jackson.databind.JsonNode',
35-
'SourceConfiguration' : 'com.fasterxml.jackson.databind.JsonNode',
36-
'DestinationDefinitionSpecification': 'com.fasterxml.jackson.databind.JsonNode',
37-
'DestinationConfiguration' : 'com.fasterxml.jackson.databind.JsonNode',
38-
'StreamJsonSchema' : 'com.fasterxml.jackson.databind.JsonNode',
39-
'StateBlob' : 'com.fasterxml.jackson.databind.JsonNode',
40-
'FieldSchema' : 'com.fasterxml.jackson.databind.JsonNode',
41-
]
22+
spotbugsTest.enabled = false
23+
spotbugsTestFixtures.enabled = false
4224

4325
def generate = tasks.register('generate')
4426

45-
def generateApiServer = tasks.register('generateApiServer', GenerateTask) {
46-
47-
inputs.file specFile
48-
outputs.dir serverOutputDir
49-
50-
generatorName = "jaxrs-spec"
51-
inputSpec = specFile
52-
outputDir = serverOutputDir
53-
54-
apiPackage = "io.airbyte.api.generated"
55-
invokerPackage = "io.airbyte.api.invoker.generated"
56-
modelPackage = "io.airbyte.api.model.generated"
57-
58-
schemaMappings.set(schemaMappingsValue)
59-
60-
generateApiDocumentation = false
61-
62-
configOptions.set([
63-
dateLibrary : "java8",
64-
generatePom : "false",
65-
interfaceOnly: "true",
66-
/*
67-
JAX-RS generator does not respect nullable properties defined in the OpenApi Spec.
68-
It means that if a field is not nullable but not set it is still returning a null value for this field in the serialized json.
69-
The below Jackson annotation is made to only keep non null values in serialized json.
70-
We are not yet using nullable=true properties in our OpenApi so this is a valid workaround at the moment to circumvent the default JAX-RS behavior described above.
71-
Feel free to read the conversation on https://github.com/airbytehq/airbyte/pull/13370 for more details.
72-
*/
73-
additionalModelTypeAnnotations: "\n@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)",
74-
])
75-
}
76-
generate.configure {
77-
dependsOn generateApiServer
78-
}
79-
80-
def generateApiClient = tasks.register('generateApiClient', GenerateTask) {
81-
82-
inputs.file specFile
83-
outputs.dir clientOutputDir
84-
85-
generatorName = "java"
86-
inputSpec = specFile
87-
outputDir = clientOutputDir
88-
89-
apiPackage = "io.airbyte.api.client.generated"
90-
invokerPackage = "io.airbyte.api.client.invoker.generated"
91-
modelPackage = "io.airbyte.api.client.model.generated"
92-
93-
schemaMappings.set(schemaMappingsValue)
94-
95-
library = "native"
96-
97-
generateApiDocumentation = false
98-
99-
configOptions.set([
100-
dateLibrary : "java8",
101-
generatePom : "false",
102-
interfaceOnly: "true"
103-
])
104-
}
105-
generate.configure {
106-
dependsOn generateApiClient
107-
}
108-
109-
def generateApiDocs = tasks.register('generateApiDocs', GenerateTask) {
110-
111-
generatorName = "html"
112-
inputSpec = specFile
113-
outputDir = docsOutputDir
114-
115-
apiPackage = "io.airbyte.api.client.generated"
116-
invokerPackage = "io.airbyte.api.client.invoker.generated"
117-
modelPackage = "io.airbyte.api.client.model.generated"
118-
119-
schemaMappings.set(schemaMappingsValue)
120-
121-
generateApiDocumentation = false
122-
123-
configOptions.set([
124-
dateLibrary : "java8",
125-
generatePom : "false",
126-
interfaceOnly: "true"
127-
])
128-
}
129-
def deleteExistingDocs = tasks.register('deleteOldApiDocs', Delete) {
130-
delete rootProject.file("docs/reference/api/generated-api-html")
131-
}
132-
deleteExistingDocs.configure {
133-
dependsOn generateApiDocs
134-
}
135-
def copyApiDocs = tasks.register('copyApiDocs', Copy) {
136-
from(docsOutputDir) {
137-
include "**/*.html"
138-
}
139-
into rootProject.file("docs/reference/api/generated-api-html")
140-
includeEmptyDirs = false
141-
}
142-
copyApiDocs.configure {
143-
dependsOn deleteExistingDocs
144-
}
145-
generate.configure {
146-
dependsOn copyApiDocs
147-
}
148-
14927
dependencies {
15028
api platform('com.fasterxml.jackson:jackson-bom:2.15.2')
15129
api 'com.fasterxml.jackson.core:jackson-annotations'
@@ -178,6 +56,7 @@ dependencies {
17856

17957
testFixturesApi testFixtures(project(':airbyte-cdk:java:airbyte-cdk:core'))
18058

59+
testFixturesImplementation ('io.airbyte:airbyte-api:0.55.2') { transitive = false }
18160
testFixturesImplementation 'io.swagger:swagger-annotations:1.6.2'
18261
testFixturesImplementation 'org.apache.ant:ant:1.10.11'
18362

@@ -206,29 +85,6 @@ generate.configure {
20685
dependsOn tasks.named('generateJsonSchema2Pojo')
20786
}
20887

209-
210-
sourceSets {
211-
main {
212-
java {
213-
srcDirs([
214-
"$projectDir/src/main/java",
215-
"${serverOutputDir}/src/gen/java",
216-
"${clientOutputDir}/src/main/java",
217-
])
218-
}
219-
kotlin {
220-
srcDirs([
221-
"$projectDir/src/main/kotlin",
222-
"${serverOutputDir}/src/gen/kotlin",
223-
"${clientOutputDir}/src/main/kotlin",
224-
])
225-
}
226-
resources {
227-
srcDir "$projectDir/src/main/openapi/"
228-
}
229-
}
230-
}
231-
23288
tasks.named('compileJava').configure {
23389
dependsOn generate
23490
}

0 commit comments

Comments
 (0)