From 02cc6011103c4ed2ae862f9e61f230558ddb8bac Mon Sep 17 00:00:00 2001 From: benmoriceau Date: Mon, 23 Jan 2023 10:59:32 -0800 Subject: [PATCH 1/8] tmp --- airbyte-commons-server/build.gradle | 10 +++++ .../java/io/airbyte/commons/server/Main.java | 7 ++++ airbyte-commons/build.gradle | 39 +++++++++++++++++-- settings.gradle | 3 ++ 4 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 airbyte-commons-server/build.gradle create mode 100644 airbyte-commons-server/src/main/java/io/airbyte/commons/server/Main.java diff --git a/airbyte-commons-server/build.gradle b/airbyte-commons-server/build.gradle new file mode 100644 index 000000000000..e03c21e77aca --- /dev/null +++ b/airbyte-commons-server/build.gradle @@ -0,0 +1,10 @@ +plugins { + id "java-library" +} + +dependencies { + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1' +} + +Task publishArtifactsTask = getPublishArtifactsTask("$rootProject.ext.version", project) \ No newline at end of file diff --git a/airbyte-commons-server/src/main/java/io/airbyte/commons/server/Main.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/Main.java new file mode 100644 index 000000000000..bd29e1478b1c --- /dev/null +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/Main.java @@ -0,0 +1,7 @@ +package io.airbyte.commons.server; + +public class Main { + public static void main(String[] args) { + System.out.println("Hello world!"); + } +} \ No newline at end of file diff --git a/airbyte-commons/build.gradle b/airbyte-commons/build.gradle index 3c4c0f9e1961..f09f252094b6 100644 --- a/airbyte-commons/build.gradle +++ b/airbyte-commons/build.gradle @@ -3,10 +3,43 @@ plugins { } dependencies { - // Dependencies for this module should be specified in the top-level build.gradle. See readme for more explanation. + implementation project(':airbyte-analytics') + implementation project(':airbyte-api') + implementation project(':airbyte-commons-docker') + implementation project(':airbyte-commons-temporal') + implementation project(':airbyte-commons-worker') + implementation project(':airbyte-config:init') + implementation project(':airbyte-config:config-models') + implementation project(':airbyte-config:config-persistence') + implementation project(':airbyte-config:specs') + implementation project(':airbyte-metrics:metrics-lib') + implementation project(':airbyte-db:db-lib') + implementation project(":airbyte-json-validation") + implementation project(':airbyte-notification') + implementation project(':airbyte-oauth') + implementation project(':airbyte-protocol:protocol-models') + implementation project(':airbyte-persistence:job-persistence') - // this dependency is an exception to the above rule because it is only used INTERNALLY to the commons library. - implementation 'com.jayway.jsonpath:json-path:2.7.0' + implementation 'com.github.slugify:slugify:2.4' + implementation 'commons-cli:commons-cli:1.4' + implementation libs.temporal.sdk + implementation 'org.apache.cxf:cxf-core:3.4.2' + implementation 'org.eclipse.jetty:jetty-server:9.4.31.v20200723' + implementation 'org.eclipse.jetty:jetty-servlet:9.4.31.v20200723' + implementation 'org.glassfish.jaxb:jaxb-runtime:3.0.2' + implementation 'org.glassfish.jersey.containers:jersey-container-servlet' + implementation 'org.glassfish.jersey.inject:jersey-hk2' + implementation 'org.glassfish.jersey.media:jersey-media-json-jackson' + implementation 'org.glassfish.jersey.ext:jersey-bean-validation' + implementation 'org.quartz-scheduler:quartz:2.3.2' + implementation 'io.sentry:sentry:6.3.1' + implementation 'io.swagger:swagger-annotations:1.6.2' + + testImplementation project(':airbyte-test-utils') + testImplementation libs.postgresql + testImplementation libs.platform.testcontainers.postgresql + testImplementation 'com.squareup.okhttp3:mockwebserver:4.9.1' + testImplementation 'org.mockito:mockito-inline:4.7.0' } Task publishArtifactsTask = getPublishArtifactsTask("$rootProject.ext.version", project) diff --git a/settings.gradle b/settings.gradle index 4b698a1bafef..4b8960757319 100644 --- a/settings.gradle +++ b/settings.gradle @@ -97,6 +97,7 @@ include ':airbyte-test-utils' include ':airbyte-analytics' // transitively used by airbyte-workers. include ':airbyte-commons-temporal' include ':airbyte-commons-worker' +include ':airbyte-commons-server' include ':airbyte-config:config-persistence' // transitively used by airbyte-workers. include ':airbyte-persistence:job-persistence' // transitively used by airbyte-workers. include ':airbyte-db:jooq' // transitively used by airbyte-workers. @@ -172,3 +173,5 @@ if (!System.getenv().containsKey("SUB_BUILD") || System.getenv().get("SUB_BUILD" } } } + + From a8bc359757489e43b031a23ffac020a4141db3e5 Mon Sep 17 00:00:00 2001 From: benmoriceau Date: Mon, 23 Jan 2023 11:46:02 -0800 Subject: [PATCH 2/8] For diff --- airbyte-commons-server/build.gradle | 39 ++++++++++++++++++- .../java/io/airbyte/commons/server/Main.java | 7 ---- gradle.properties | 2 +- settings.gradle | 2 +- 4 files changed, 39 insertions(+), 11 deletions(-) delete mode 100644 airbyte-commons-server/src/main/java/io/airbyte/commons/server/Main.java diff --git a/airbyte-commons-server/build.gradle b/airbyte-commons-server/build.gradle index e03c21e77aca..3db7e3745ad6 100644 --- a/airbyte-commons-server/build.gradle +++ b/airbyte-commons-server/build.gradle @@ -3,8 +3,43 @@ plugins { } dependencies { - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1' + implementation project(':airbyte-analytics') + implementation project(':airbyte-api') + implementation project(':airbyte-commons-docker') + implementation project(':airbyte-commons-temporal') + implementation project(':airbyte-commons-worker') + implementation project(':airbyte-config:init') + implementation project(':airbyte-config:config-models') + implementation project(':airbyte-config:config-persistence') + implementation project(':airbyte-config:specs') + implementation project(':airbyte-metrics:metrics-lib') + implementation project(':airbyte-db:db-lib') + implementation project(":airbyte-json-validation") + implementation project(':airbyte-notification') + implementation project(':airbyte-oauth') + implementation project(':airbyte-protocol:protocol-models') + implementation project(':airbyte-persistence:job-persistence') + + implementation 'com.github.slugify:slugify:2.4' + implementation 'commons-cli:commons-cli:1.4' + implementation libs.temporal.sdk + implementation 'org.apache.cxf:cxf-core:3.4.2' + implementation 'org.eclipse.jetty:jetty-server:9.4.31.v20200723' + implementation 'org.eclipse.jetty:jetty-servlet:9.4.31.v20200723' + implementation 'org.glassfish.jaxb:jaxb-runtime:3.0.2' + implementation 'org.glassfish.jersey.containers:jersey-container-servlet' + implementation 'org.glassfish.jersey.inject:jersey-hk2' + implementation 'org.glassfish.jersey.media:jersey-media-json-jackson' + implementation 'org.glassfish.jersey.ext:jersey-bean-validation' + implementation 'org.quartz-scheduler:quartz:2.3.2' + implementation 'io.sentry:sentry:6.3.1' + implementation 'io.swagger:swagger-annotations:1.6.2' + + testImplementation project(':airbyte-test-utils') + testImplementation libs.postgresql + testImplementation libs.platform.testcontainers.postgresql + testImplementation 'com.squareup.okhttp3:mockwebserver:4.9.1' + testImplementation 'org.mockito:mockito-inline:4.7.0' } Task publishArtifactsTask = getPublishArtifactsTask("$rootProject.ext.version", project) \ No newline at end of file diff --git a/airbyte-commons-server/src/main/java/io/airbyte/commons/server/Main.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/Main.java deleted file mode 100644 index bd29e1478b1c..000000000000 --- a/airbyte-commons-server/src/main/java/io/airbyte/commons/server/Main.java +++ /dev/null @@ -1,7 +0,0 @@ -package io.airbyte.commons.server; - -public class Main { - public static void main(String[] args) { - System.out.println("Hello world!"); - } -} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index f688779de905..bd7bbf32d0a8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ org.gradle.parallel=true -org.gradle.jvmargs=-Xmx4g -Xss4m +org.gradle.jvmargs=-Xmx8g -Xss4m org.gradle.caching=true # Note, this might have issues on the normal Github runner. diff --git a/settings.gradle b/settings.gradle index 4b8960757319..4b79182b6b81 100644 --- a/settings.gradle +++ b/settings.gradle @@ -97,7 +97,6 @@ include ':airbyte-test-utils' include ':airbyte-analytics' // transitively used by airbyte-workers. include ':airbyte-commons-temporal' include ':airbyte-commons-worker' -include ':airbyte-commons-server' include ':airbyte-config:config-persistence' // transitively used by airbyte-workers. include ':airbyte-persistence:job-persistence' // transitively used by airbyte-workers. include ':airbyte-db:jooq' // transitively used by airbyte-workers. @@ -107,6 +106,7 @@ include ':airbyte-worker-models' // platform if (!System.getenv().containsKey("SUB_BUILD") || System.getenv().get("SUB_BUILD") == "PLATFORM") { include ':airbyte-bootloader' + include ':airbyte-commons-server' include ':airbyte-config:specs' include ':airbyte-connector-builder-server' include ':airbyte-container-orchestrator' From 53d09a6acf086620516cee6b7f27e7b23bc908cd Mon Sep 17 00:00:00 2001 From: benmoriceau Date: Mon, 23 Jan 2023 13:52:52 -0800 Subject: [PATCH 3/8] Extract common server --- airbyte-commons-server/build.gradle | 24 +++++++++++ .../commons}/server/ServerConstants.java | 2 +- .../server/converters/ApiPojoConverters.java | 4 +- .../converters/CatalogDiffConverters.java | 2 +- .../converters/ConfigurationUpdate.java | 2 +- .../server/converters/JobConverter.java | 6 +-- .../converters/NotificationConverter.java | 2 +- .../converters/OauthModelConverter.java | 2 +- .../converters/OperationsConverter.java | 2 +- .../server/converters/SpecFetcher.java | 4 +- .../converters/WorkflowStateConverter.java | 2 +- .../WorkspaceWebhookConfigsConverter.java | 2 +- .../ApplicationErrorKnownException.java | 2 +- .../errors/BadObjectSchemaKnownException.java | 2 +- .../errors/ConnectFailureKnownException.java | 2 +- .../errors/IdNotFoundKnownException.java | 2 +- .../errors/InternalServerKnownException.java | 2 +- .../server/errors/KnownException.java | 2 +- .../UnsupportedProtocolVersionException.java | 2 +- .../errors/ValueConflictKnownException.java | 2 +- .../server/handlers/AttemptHandler.java | 2 +- .../server/handlers/ConnectionsHandler.java | 18 ++++---- .../DestinationDefinitionsHandler.java | 23 +++++------ .../server/handlers/DestinationHandler.java | 4 +- .../server/handlers/HealthCheckHandler.java | 2 +- .../server/handlers/JobHistoryHandler.java | 6 +-- .../commons}/server/handlers/LogsHandler.java | 2 +- .../server/handlers/OAuthHandler.java | 4 +- .../server/handlers/OpenApiConfigHandler.java | 2 +- .../server/handlers/OperationsHandler.java | 4 +- .../server/handlers/SchedulerHandler.java | 20 ++++----- .../handlers/SourceDefinitionsHandler.java | 23 +++++------ .../server/handlers/SourceHandler.java | 4 +- .../server/handlers/StateHandler.java | 2 +- .../WebBackendCheckUpdatesHandler.java | 4 +- .../WebBackendConnectionsHandler.java | 8 ++-- .../WebBackendGeographiesHandler.java | 2 +- .../server/handlers/WorkspacesHandler.java | 14 +++---- .../handlers/helpers/CatalogConverter.java | 2 +- .../handlers/helpers/ConnectionMatcher.java | 2 +- .../helpers/ConnectionScheduleHelper.java | 4 +- .../handlers/helpers/DestinationMatcher.java | 2 +- .../server/handlers/helpers/Matchable.java | 2 +- .../handlers/helpers/OAuthPathExtractor.java | 2 +- .../handlers/helpers/SourceMatcher.java | 2 +- .../DefaultSynchronousSchedulerClient.java | 2 +- .../server/scheduler/EventRunner.java | 2 +- .../scheduler/SynchronousJobMetadata.java | 2 +- .../server/scheduler/SynchronousResponse.java | 2 +- .../scheduler/SynchronousSchedulerClient.java | 2 +- .../server/scheduler/TemporalEventRunner.java | 2 +- .../server/services/AirbyteGithubStore.java | 2 +- .../converters/CatalogConverterTest.java | 10 ++--- .../converters/CatalogDiffConvertersTest.java | 2 +- .../converters/ConfigurationUpdateTest.java | 2 +- .../server/converters/JobConverterTest.java | 2 +- .../converters/OauthModelConverterTest.java | 2 +- .../server/handlers/AttemptHandlerTest.java | 2 +- .../ConnectionSchedulerHelperTest.java | 4 +- .../handlers/ConnectionsHandlerTest.java | 14 +++---- .../DestinationDefinitionsHandlerTest.java | 14 +++---- .../handlers/DestinationHandlerTest.java | 8 ++-- .../handlers/HealthCheckHandlerTest.java | 2 +- .../handlers/JobHistoryHandlerTest.java | 14 +++---- .../server/handlers/LogsHandlerTest.java | 2 +- .../server/handlers/OAuthHandlerTest.java | 2 +- .../handlers/OpenApiConfigHandlerTest.java | 2 +- .../handlers/OperationsHandlerTest.java | 2 +- .../server/handlers/SchedulerHandlerTest.java | 22 +++++----- .../SourceDefinitionsHandlerTest.java | 14 +++---- .../server/handlers/SourceHandlerTest.java | 10 ++--- .../server/handlers/StateHandlerTest.java | 2 +- .../WebBackendCheckUpdatesHandlerTest.java | 4 +- .../WebBackendConnectionsHandlerTest.java | 16 +++---- .../WebBackendGeographiesHandlerTest.java | 2 +- .../handlers/WorkspacesHandlerTest.java | 4 +- .../helper/OAuthPathExtractorTest.java | 4 +- .../server/helpers/ConnectionHelpers.java | 6 +-- .../ConnectorSpecificationHelpers.java | 4 +- .../helpers/DestinationDefinitionHelpers.java | 2 +- .../server/helpers/DestinationHelpers.java | 6 +-- .../helpers/SourceDefinitionHelpers.java | 2 +- .../server/helpers/SourceHelpers.java | 6 +-- ...DefaultSynchronousSchedulerClientTest.java | 2 +- .../services/AirbyteGithubStoreTest.java | 2 +- .../test/resources/icons/test-destination.svg | 0 .../src/test/resources/icons/test-source.svg | 0 .../resources/json/TestImplementation.json | 0 .../resources/json/TestSpecification.json | 0 .../03a4c904-c91d-447f-ab59-27a43b52c2fd.gz | Bin .../4e00862d-5484-4f50-9860-f3bbb4317397.json | 0 .../5434615d-a3b7-4351-bc6b-a9a695555a30.json | 0 .../28ffee2b-372a-4f72-9b95-8ed56a8b99c5.json | 0 .../e48cae1a-1f5c-42cc-9ec1-a44ff7fb4969.json | 0 .../22f6c74f-5699-40ff-833c-4a879ea40133.json | 0 .../25c5221d-dce2-4163-ade9-739ef790f503.json | 0 .../424892c4-daac-4491-b35d-c6688ba547ba.json | 0 .../8be1cf83-fde1-477f-a4ad-318d23c9f3c6.json | 0 .../a625d593-bba5-4a1c-a53d-2d246268a816.json | 0 .../af7c921e-5892-4ff2-b6c1-4a5ab258fb7e.json | 0 .../f7a7d195-377f-cf5b-70a5-be6b819019dc.json | 0 .../00405b19-9768-4e0c-b1ae-9fc2ee2b2a8c.json | 0 .../2470e835-feaf-4db6-96f3-70fd645acc77.json | 0 .../2af123bf-0aaf-4e0d-9784-cb497f23741a.json | 0 .../396e4ca3-8a97-4b85-aa4e-c9d8c2d5f992.json | 0 .../41375467-61ae-4204-8e38-e2b8b7365f23.json | 0 .../435bb9a5-7887-4809-aa58-28c27df0d7ad.json | 0 .../445831eb-78db-4b1f-8f1f-0d96ad8739e2.json | 0 .../4eb22946-2a79-4d20-a3e6-effd234613c3.json | 0 .../57eb1576-8f52-463d-beb6-2e107cdf571d.json | 0 .../59f1e50a-331f-4f09-b3e8-2e8d4d355f44.json | 0 .../68e63de2-bb83-4c7e-93fa-a8a9051e3993.json | 0 .../71607ba1-c0ac-4799-8049-7f4b90dd50f7.json | 0 .../778daa7c-feaf-4db6-96f3-70fd645acc77.json | 0 .../859e501d-2b67-471f-91bb-1c801414d28f.json | 0 .../9e0556f4-69df-4522-a3fb-03264d36b348.json | 0 .../9fed261d-d107-47fd-8c8b-323023db6e20.json | 0 .../aea2fd0d-377d-465e-86c0-4fdc4f688e51.json | 0 .../b03a9f3e-22a5-11eb-adc1-0242ac120002.json | 0 .../b1892b11-788d-44bd-b9ec-3a436f7b54ce.json | 0 .../b5ea17b1-f170-46dc-bc31-cc744ca984c1.json | 0 .../cd42861b-01fc-4658-a8ab-5d11d0510f01.json | 0 .../d2147be5-fa36-4936-977e-f031affa5895.json | 0 .../d29764f8-80d7-4dd7-acbe-1a42005ee5aa.json | 0 .../d8313939-3782-41b0-be29-b3ca20d8dd3a.json | 0 .../decd338e-5647-4c0b-adf4-da0e75f5a750.json | 0 .../e094cb9a-26de-4645-8761-65c0c425d1de.json | 0 .../e7778cfc-e97c-4458-9ecb-b4f2bba8946c.json | 0 .../e87ffa8e-a3b5-f69c-9076-6011339de1f6.json | 0 .../eaf50f04-21dd-4620-913b-2a83f5635227.json | 0 .../ec4b9503-13cb-48ab-a4ab-6ade4be46567.json | 0 .../ed799e2b-2158-4c66-8da4-b40fe63bc72a.json | 0 .../ef69ef6e-aa7f-4af1-a01d-ef775033524e.json | 0 .../fbb5fbe2-16ad-4cf4-af7d-ff9d9c316c87.json | 0 .../49dae3f0-158b-4737-b6e4-0eed77d4b74e.json | 0 .../a294256f-1abe-4837-925f-91602c7207b4.json | 0 .../49dae3f0-158b-4737-b6e4-0eed77d4b74e.json | 0 .../a294256f-1abe-4837-925f-91602c7207b4.json | 0 .../5ae6b09b-fdec-41af-aaf7-7d94cfc33ef6.json | 0 .../src/test/resources/migration/schema.sql | 0 airbyte-commons/build.gradle | 39 ++---------------- airbyte-server/build.gradle | 1 + .../errors/IdNotFoundExceptionMapper.java | 2 +- .../errors/InvalidInputExceptionHandler.java | 2 +- .../errors/InvalidInputExceptionMapper.java | 2 +- .../errors/InvalidJsonExceptionHandler.java | 2 +- .../errors/InvalidJsonExceptionMapper.java | 2 +- .../InvalidJsonInputExceptionHandler.java | 2 +- .../InvalidJsonInputExceptionMapper.java | 2 +- .../server/errors/KnownExceptionHandler.java | 2 +- .../server/errors/KnownExceptionMapper.java | 2 +- .../errors/NotFoundExceptionHandler.java | 2 +- .../errors/NotFoundExceptionMapper.java | 2 +- .../errors/UncaughtExceptionHandler.java | 2 +- .../errors/UncaughtExceptionMapper.java | 2 +- .../java/io/airbyte/server/ServerApp.java | 12 +++--- .../java/io/airbyte/server/ServerFactory.java | 6 +-- .../io/airbyte/server/apis/ApiHelper.java | 4 +- .../server/apis/AttemptApiController.java | 2 +- .../server/apis/ConnectionApiController.java | 6 +-- .../server/apis/DestinationApiController.java | 4 +- .../DestinationDefinitionApiController.java | 2 +- ...nDefinitionSpecificationApiController.java | 2 +- .../apis/DestinationOauthApiController.java | 2 +- .../server/apis/HealthApiController.java | 2 +- .../server/apis/JobsApiController.java | 4 +- .../server/apis/LogsApiController.java | 2 +- .../apis/NotificationsApiController.java | 2 +- .../server/apis/OpenapiApiController.java | 2 +- .../server/apis/OperationApiController.java | 2 +- .../server/apis/SchedulerApiController.java | 2 +- .../server/apis/SourceApiController.java | 4 +- .../apis/SourceDefinitionApiController.java | 2 +- ...eDefinitionSpecificationApiController.java | 2 +- .../server/apis/SourceOauthApiController.java | 2 +- .../server/apis/StateApiController.java | 2 +- .../server/apis/WebBackendApiController.java | 6 +-- .../server/apis/WorkspaceApiController.java | 2 +- .../server/config/ApplicationBeanFactory.java | 6 +-- .../server/config/TemporalBeanFactory.java | 4 +- .../server/apis/HealthCheckApiTest.java | 2 +- 181 files changed, 290 insertions(+), 300 deletions(-) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/ServerConstants.java (81%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/converters/ApiPojoConverters.java (99%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/converters/CatalogDiffConverters.java (98%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/converters/ConfigurationUpdate.java (98%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/converters/JobConverter.java (98%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/converters/NotificationConverter.java (98%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/converters/OauthModelConverter.java (98%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/converters/OperationsConverter.java (99%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/converters/SpecFetcher.java (82%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/converters/WorkflowStateConverter.java (90%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/converters/WorkspaceWebhookConfigsConverter.java (98%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/errors/ApplicationErrorKnownException.java (90%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/errors/BadObjectSchemaKnownException.java (90%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/errors/ConnectFailureKnownException.java (90%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/errors/IdNotFoundKnownException.java (96%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/errors/InternalServerKnownException.java (90%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/errors/KnownException.java (96%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/errors/UnsupportedProtocolVersionException.java (94%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/errors/ValueConflictKnownException.java (90%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/handlers/AttemptHandler.java (98%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/handlers/ConnectionsHandler.java (97%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/handlers/DestinationDefinitionsHandler.java (96%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/handlers/DestinationHandler.java (99%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/handlers/HealthCheckHandler.java (92%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/handlers/JobHistoryHandler.java (98%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/handlers/LogsHandler.java (97%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/handlers/OAuthHandler.java (99%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/handlers/OpenApiConfigHandler.java (93%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/handlers/OperationsHandler.java (98%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/handlers/SchedulerHandler.java (97%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/handlers/SourceDefinitionsHandler.java (95%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/handlers/SourceHandler.java (99%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/handlers/StateHandler.java (97%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/handlers/WebBackendCheckUpdatesHandler.java (97%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/handlers/WebBackendConnectionsHandler.java (99%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/handlers/WebBackendGeographiesHandler.java (95%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/handlers/WorkspacesHandler.java (97%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/handlers/helpers/CatalogConverter.java (99%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/handlers/helpers/ConnectionMatcher.java (97%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/handlers/helpers/ConnectionScheduleHelper.java (97%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/handlers/helpers/DestinationMatcher.java (97%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/handlers/helpers/Matchable.java (71%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/handlers/helpers/OAuthPathExtractor.java (96%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/handlers/helpers/SourceMatcher.java (97%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/scheduler/DefaultSynchronousSchedulerClient.java (99%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/scheduler/EventRunner.java (95%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/scheduler/SynchronousJobMetadata.java (98%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/scheduler/SynchronousResponse.java (98%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/scheduler/SynchronousSchedulerClient.java (97%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/scheduler/TemporalEventRunner.java (97%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/services/AirbyteGithubStore.java (98%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/converters/CatalogConverterTest.java (94%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/converters/CatalogDiffConvertersTest.java (94%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/converters/ConfigurationUpdateTest.java (99%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/converters/JobConverterTest.java (99%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/converters/OauthModelConverterTest.java (98%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/handlers/AttemptHandlerTest.java (98%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/handlers/ConnectionSchedulerHelperTest.java (99%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/handlers/ConnectionsHandlerTest.java (99%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/handlers/DestinationDefinitionsHandlerTest.java (98%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/handlers/DestinationHandlerTest.java (98%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/handlers/HealthCheckHandlerTest.java (95%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/handlers/JobHistoryHandlerTest.java (98%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/handlers/LogsHandlerTest.java (97%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/handlers/OAuthHandlerTest.java (99%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/handlers/OpenApiConfigHandlerTest.java (92%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/handlers/OperationsHandlerTest.java (99%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/handlers/SchedulerHandlerTest.java (98%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/handlers/SourceDefinitionsHandlerTest.java (98%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/handlers/SourceHandlerTest.java (98%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/handlers/StateHandlerTest.java (99%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/handlers/WebBackendCheckUpdatesHandlerTest.java (98%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/handlers/WebBackendConnectionsHandlerTest.java (99%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/handlers/WebBackendGeographiesHandlerTest.java (96%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/handlers/WorkspacesHandlerTest.java (99%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/handlers/helper/OAuthPathExtractorTest.java (93%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/helpers/ConnectionHelpers.java (99%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/helpers/ConnectorSpecificationHelpers.java (84%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/helpers/DestinationDefinitionHelpers.java (92%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/helpers/DestinationHelpers.java (92%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/helpers/SourceDefinitionHelpers.java (92%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/helpers/SourceHelpers.java (91%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/scheduler/DefaultSynchronousSchedulerClientTest.java (99%) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/services/AirbyteGithubStoreTest.java (99%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/icons/test-destination.svg (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/icons/test-source.svg (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/json/TestImplementation.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/json/TestSpecification.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/03a4c904-c91d-447f-ab59-27a43b52c2fd.gz (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/DESTINATION_CONNECTION/4e00862d-5484-4f50-9860-f3bbb4317397.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/DESTINATION_CONNECTION/5434615d-a3b7-4351-bc6b-a9a695555a30.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/SOURCE_CONNECTION/28ffee2b-372a-4f72-9b95-8ed56a8b99c5.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/SOURCE_CONNECTION/e48cae1a-1f5c-42cc-9ec1-a44ff7fb4969.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/22f6c74f-5699-40ff-833c-4a879ea40133.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/25c5221d-dce2-4163-ade9-739ef790f503.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/424892c4-daac-4491-b35d-c6688ba547ba.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/8be1cf83-fde1-477f-a4ad-318d23c9f3c6.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/a625d593-bba5-4a1c-a53d-2d246268a816.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/af7c921e-5892-4ff2-b6c1-4a5ab258fb7e.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/f7a7d195-377f-cf5b-70a5-be6b819019dc.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/00405b19-9768-4e0c-b1ae-9fc2ee2b2a8c.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/2470e835-feaf-4db6-96f3-70fd645acc77.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/2af123bf-0aaf-4e0d-9784-cb497f23741a.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/396e4ca3-8a97-4b85-aa4e-c9d8c2d5f992.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/41375467-61ae-4204-8e38-e2b8b7365f23.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/435bb9a5-7887-4809-aa58-28c27df0d7ad.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/445831eb-78db-4b1f-8f1f-0d96ad8739e2.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/4eb22946-2a79-4d20-a3e6-effd234613c3.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/57eb1576-8f52-463d-beb6-2e107cdf571d.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/59f1e50a-331f-4f09-b3e8-2e8d4d355f44.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/68e63de2-bb83-4c7e-93fa-a8a9051e3993.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/71607ba1-c0ac-4799-8049-7f4b90dd50f7.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/778daa7c-feaf-4db6-96f3-70fd645acc77.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/859e501d-2b67-471f-91bb-1c801414d28f.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/9e0556f4-69df-4522-a3fb-03264d36b348.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/9fed261d-d107-47fd-8c8b-323023db6e20.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/aea2fd0d-377d-465e-86c0-4fdc4f688e51.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/b03a9f3e-22a5-11eb-adc1-0242ac120002.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/b1892b11-788d-44bd-b9ec-3a436f7b54ce.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/b5ea17b1-f170-46dc-bc31-cc744ca984c1.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/cd42861b-01fc-4658-a8ab-5d11d0510f01.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/d2147be5-fa36-4936-977e-f031affa5895.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/d29764f8-80d7-4dd7-acbe-1a42005ee5aa.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/d8313939-3782-41b0-be29-b3ca20d8dd3a.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/decd338e-5647-4c0b-adf4-da0e75f5a750.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/e094cb9a-26de-4645-8761-65c0c425d1de.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/e7778cfc-e97c-4458-9ecb-b4f2bba8946c.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/e87ffa8e-a3b5-f69c-9076-6011339de1f6.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/eaf50f04-21dd-4620-913b-2a83f5635227.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/ec4b9503-13cb-48ab-a4ab-6ade4be46567.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/ed799e2b-2158-4c66-8da4-b40fe63bc72a.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/ef69ef6e-aa7f-4af1-a01d-ef775033524e.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/fbb5fbe2-16ad-4cf4-af7d-ff9d9c316c87.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SYNC/49dae3f0-158b-4737-b6e4-0eed77d4b74e.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SYNC/a294256f-1abe-4837-925f-91602c7207b4.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SYNC_SCHEDULE/49dae3f0-158b-4737-b6e4-0eed77d4b74e.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_SYNC_SCHEDULE/a294256f-1abe-4837-925f-91602c7207b4.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/dummy_data/config/STANDARD_WORKSPACE/5ae6b09b-fdec-41af-aaf7-7d94cfc33ef6.json (100%) rename {airbyte-server => airbyte-commons-server}/src/test/resources/migration/schema.sql (100%) rename airbyte-server/src/main/java/io/airbyte/{ => commons}/server/errors/IdNotFoundExceptionMapper.java (96%) rename airbyte-server/src/main/java/io/airbyte/{ => commons}/server/errors/InvalidInputExceptionHandler.java (98%) rename airbyte-server/src/main/java/io/airbyte/{ => commons}/server/errors/InvalidInputExceptionMapper.java (94%) rename airbyte-server/src/main/java/io/airbyte/{ => commons}/server/errors/InvalidJsonExceptionHandler.java (96%) rename airbyte-server/src/main/java/io/airbyte/{ => commons}/server/errors/InvalidJsonExceptionMapper.java (93%) rename airbyte-server/src/main/java/io/airbyte/{ => commons}/server/errors/InvalidJsonInputExceptionHandler.java (96%) rename airbyte-server/src/main/java/io/airbyte/{ => commons}/server/errors/InvalidJsonInputExceptionMapper.java (94%) rename airbyte-server/src/main/java/io/airbyte/{ => commons}/server/errors/KnownExceptionHandler.java (95%) rename airbyte-server/src/main/java/io/airbyte/{ => commons}/server/errors/KnownExceptionMapper.java (95%) rename airbyte-server/src/main/java/io/airbyte/{ => commons}/server/errors/NotFoundExceptionHandler.java (96%) rename airbyte-server/src/main/java/io/airbyte/{ => commons}/server/errors/NotFoundExceptionMapper.java (96%) rename airbyte-server/src/main/java/io/airbyte/{ => commons}/server/errors/UncaughtExceptionHandler.java (96%) rename airbyte-server/src/main/java/io/airbyte/{ => commons}/server/errors/UncaughtExceptionMapper.java (95%) diff --git a/airbyte-commons-server/build.gradle b/airbyte-commons-server/build.gradle index 3db7e3745ad6..f0ea82dcb4e5 100644 --- a/airbyte-commons-server/build.gradle +++ b/airbyte-commons-server/build.gradle @@ -3,6 +3,30 @@ plugins { } dependencies { + annotationProcessor platform(libs.micronaut.bom) + annotationProcessor libs.bundles.micronaut.annotation.processor + annotationProcessor libs.micronaut.jaxrs.processor + + implementation platform(libs.micronaut.bom) + implementation libs.bundles.micronaut + implementation libs.micronaut.jaxrs.server + + // Ensure that the versions defined in deps.toml are used + // instead of versions from transitive dependencies + implementation(libs.flyway.core) { + force = true + } + implementation(libs.s3) { + // Force to avoid updated version brought in transitively from Micronaut 3.8+ + // that is incompatible with our current Helm setup + force = true + } + implementation(libs.aws.java.sdk.s3) { + // Force to avoid updated version brought in transitively from Micronaut 3.8+ + // that is incompatible with our current Helm setup + force = true + } + implementation project(':airbyte-analytics') implementation project(':airbyte-api') implementation project(':airbyte-commons-docker') diff --git a/airbyte-server/src/main/java/io/airbyte/server/ServerConstants.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/ServerConstants.java similarity index 81% rename from airbyte-server/src/main/java/io/airbyte/server/ServerConstants.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/ServerConstants.java index 6c40fc37ba91..6c8a3ececc29 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/ServerConstants.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/ServerConstants.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server; +package io.airbyte.commons.server; public class ServerConstants { diff --git a/airbyte-server/src/main/java/io/airbyte/server/converters/ApiPojoConverters.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/ApiPojoConverters.java similarity index 99% rename from airbyte-server/src/main/java/io/airbyte/server/converters/ApiPojoConverters.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/ApiPojoConverters.java index 9b85de35c34b..ea6309030676 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/converters/ApiPojoConverters.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/ApiPojoConverters.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.converters; +package io.airbyte.commons.server.converters; import io.airbyte.api.model.generated.ActorDefinitionResourceRequirements; import io.airbyte.api.model.generated.ConnectionRead; @@ -18,10 +18,10 @@ import io.airbyte.api.model.generated.NormalizationDestinationDefinitionConfig; import io.airbyte.api.model.generated.ResourceRequirements; import io.airbyte.commons.enums.Enums; +import io.airbyte.commons.server.handlers.helpers.CatalogConverter; import io.airbyte.config.BasicSchedule; import io.airbyte.config.Schedule; import io.airbyte.config.StandardSync; -import io.airbyte.server.handlers.helpers.CatalogConverter; import java.util.stream.Collectors; public class ApiPojoConverters { diff --git a/airbyte-server/src/main/java/io/airbyte/server/converters/CatalogDiffConverters.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/CatalogDiffConverters.java similarity index 98% rename from airbyte-server/src/main/java/io/airbyte/server/converters/CatalogDiffConverters.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/CatalogDiffConverters.java index 181be5454880..7b14abe1f2be 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/converters/CatalogDiffConverters.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/CatalogDiffConverters.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.converters; +package io.airbyte.commons.server.converters; import io.airbyte.api.model.generated.FieldAdd; import io.airbyte.api.model.generated.FieldRemove; diff --git a/airbyte-server/src/main/java/io/airbyte/server/converters/ConfigurationUpdate.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/ConfigurationUpdate.java similarity index 98% rename from airbyte-server/src/main/java/io/airbyte/server/converters/ConfigurationUpdate.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/ConfigurationUpdate.java index 8eaf31178ac7..0b0fc05be5b4 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/converters/ConfigurationUpdate.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/ConfigurationUpdate.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.converters; +package io.airbyte.commons.server.converters; import com.fasterxml.jackson.databind.JsonNode; import io.airbyte.commons.json.Jsons; diff --git a/airbyte-server/src/main/java/io/airbyte/server/converters/JobConverter.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/JobConverter.java similarity index 98% rename from airbyte-server/src/main/java/io/airbyte/server/converters/JobConverter.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/JobConverter.java index 9a3d479749e0..ad138b919c3d 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/converters/JobConverter.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/JobConverter.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.converters; +package io.airbyte.commons.server.converters; import io.airbyte.api.model.generated.AttemptFailureOrigin; import io.airbyte.api.model.generated.AttemptFailureReason; @@ -28,6 +28,8 @@ import io.airbyte.api.model.generated.SourceDefinitionRead; import io.airbyte.api.model.generated.SynchronousJobRead; import io.airbyte.commons.enums.Enums; +import io.airbyte.commons.server.scheduler.SynchronousJobMetadata; +import io.airbyte.commons.server.scheduler.SynchronousResponse; import io.airbyte.commons.version.AirbyteVersion; import io.airbyte.config.Configs.WorkerEnvironment; import io.airbyte.config.JobConfig.ConfigType; @@ -42,8 +44,6 @@ import io.airbyte.persistence.job.models.Attempt; import io.airbyte.persistence.job.models.AttemptNormalizationStatus; import io.airbyte.persistence.job.models.Job; -import io.airbyte.server.scheduler.SynchronousJobMetadata; -import io.airbyte.server.scheduler.SynchronousResponse; import io.airbyte.workers.helper.ProtocolConverters; import jakarta.inject.Singleton; import java.io.IOException; diff --git a/airbyte-server/src/main/java/io/airbyte/server/converters/NotificationConverter.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/NotificationConverter.java similarity index 98% rename from airbyte-server/src/main/java/io/airbyte/server/converters/NotificationConverter.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/NotificationConverter.java index c24346a123f5..50fc1a1f3601 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/converters/NotificationConverter.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/NotificationConverter.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.converters; +package io.airbyte.commons.server.converters; import io.airbyte.commons.enums.Enums; import java.util.Collections; diff --git a/airbyte-server/src/main/java/io/airbyte/server/converters/OauthModelConverter.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/OauthModelConverter.java similarity index 98% rename from airbyte-server/src/main/java/io/airbyte/server/converters/OauthModelConverter.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/OauthModelConverter.java index 78c44bcda3d1..86220d17a7bf 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/converters/OauthModelConverter.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/OauthModelConverter.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.converters; +package io.airbyte.commons.server.converters; import io.airbyte.api.model.generated.AdvancedAuth; import io.airbyte.api.model.generated.AdvancedAuth.AuthFlowTypeEnum; diff --git a/airbyte-server/src/main/java/io/airbyte/server/converters/OperationsConverter.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/OperationsConverter.java similarity index 99% rename from airbyte-server/src/main/java/io/airbyte/server/converters/OperationsConverter.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/OperationsConverter.java index 9862ba52b611..b390f51f486d 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/converters/OperationsConverter.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/OperationsConverter.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.converters; +package io.airbyte.commons.server.converters; import static io.airbyte.api.model.generated.OperatorWebhook.WebhookTypeEnum.DBTCLOUD; diff --git a/airbyte-server/src/main/java/io/airbyte/server/converters/SpecFetcher.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/SpecFetcher.java similarity index 82% rename from airbyte-server/src/main/java/io/airbyte/server/converters/SpecFetcher.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/SpecFetcher.java index 5934e6fb7756..6c46d7649990 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/converters/SpecFetcher.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/SpecFetcher.java @@ -2,11 +2,11 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.converters; +package io.airbyte.commons.server.converters; import com.google.common.base.Preconditions; +import io.airbyte.commons.server.scheduler.SynchronousResponse; import io.airbyte.protocol.models.ConnectorSpecification; -import io.airbyte.server.scheduler.SynchronousResponse; public class SpecFetcher { diff --git a/airbyte-server/src/main/java/io/airbyte/server/converters/WorkflowStateConverter.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/WorkflowStateConverter.java similarity index 90% rename from airbyte-server/src/main/java/io/airbyte/server/converters/WorkflowStateConverter.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/WorkflowStateConverter.java index 76bd67ab2067..4f0d8a526734 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/converters/WorkflowStateConverter.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/WorkflowStateConverter.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.converters; +package io.airbyte.commons.server.converters; import io.airbyte.api.model.generated.WorkflowStateRead; import io.airbyte.commons.temporal.scheduling.state.WorkflowState; diff --git a/airbyte-server/src/main/java/io/airbyte/server/converters/WorkspaceWebhookConfigsConverter.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/WorkspaceWebhookConfigsConverter.java similarity index 98% rename from airbyte-server/src/main/java/io/airbyte/server/converters/WorkspaceWebhookConfigsConverter.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/WorkspaceWebhookConfigsConverter.java index a8a86b838d2b..68826e525fef 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/converters/WorkspaceWebhookConfigsConverter.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/converters/WorkspaceWebhookConfigsConverter.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.converters; +package io.airbyte.commons.server.converters; import com.fasterxml.jackson.databind.JsonNode; import io.airbyte.api.model.generated.WebhookConfigRead; diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/ApplicationErrorKnownException.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/ApplicationErrorKnownException.java similarity index 90% rename from airbyte-server/src/main/java/io/airbyte/server/errors/ApplicationErrorKnownException.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/ApplicationErrorKnownException.java index 69f3c86c5858..371601e85d49 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/ApplicationErrorKnownException.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/ApplicationErrorKnownException.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.errors; +package io.airbyte.commons.server.errors; public class ApplicationErrorKnownException extends KnownException { diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/BadObjectSchemaKnownException.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/BadObjectSchemaKnownException.java similarity index 90% rename from airbyte-server/src/main/java/io/airbyte/server/errors/BadObjectSchemaKnownException.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/BadObjectSchemaKnownException.java index 5e880ba3483f..34b455a6e4a5 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/BadObjectSchemaKnownException.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/BadObjectSchemaKnownException.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.errors; +package io.airbyte.commons.server.errors; public class BadObjectSchemaKnownException extends KnownException { diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/ConnectFailureKnownException.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/ConnectFailureKnownException.java similarity index 90% rename from airbyte-server/src/main/java/io/airbyte/server/errors/ConnectFailureKnownException.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/ConnectFailureKnownException.java index 1b3c462d90e4..5997ce894a8d 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/ConnectFailureKnownException.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/ConnectFailureKnownException.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.errors; +package io.airbyte.commons.server.errors; public class ConnectFailureKnownException extends KnownException { diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/IdNotFoundKnownException.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/IdNotFoundKnownException.java similarity index 96% rename from airbyte-server/src/main/java/io/airbyte/server/errors/IdNotFoundKnownException.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/IdNotFoundKnownException.java index 460e48dc1339..76699cceb8d8 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/IdNotFoundKnownException.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/IdNotFoundKnownException.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.errors; +package io.airbyte.commons.server.errors; import io.airbyte.api.model.generated.NotFoundKnownExceptionInfo; import org.apache.logging.log4j.core.util.Throwables; diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/InternalServerKnownException.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/InternalServerKnownException.java similarity index 90% rename from airbyte-server/src/main/java/io/airbyte/server/errors/InternalServerKnownException.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/InternalServerKnownException.java index 7900e02f2451..4b9fd4b28419 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/InternalServerKnownException.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/InternalServerKnownException.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.errors; +package io.airbyte.commons.server.errors; public class InternalServerKnownException extends KnownException { diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/KnownException.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/KnownException.java similarity index 96% rename from airbyte-server/src/main/java/io/airbyte/server/errors/KnownException.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/KnownException.java index d9b5716a8c6c..2067e3d87299 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/KnownException.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/KnownException.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.errors; +package io.airbyte.commons.server.errors; import io.airbyte.api.model.generated.KnownExceptionInfo; import org.apache.logging.log4j.core.util.Throwables; diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/UnsupportedProtocolVersionException.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/UnsupportedProtocolVersionException.java similarity index 94% rename from airbyte-server/src/main/java/io/airbyte/server/errors/UnsupportedProtocolVersionException.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/UnsupportedProtocolVersionException.java index 5b83844a54c1..661e7e40a485 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/UnsupportedProtocolVersionException.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/UnsupportedProtocolVersionException.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.errors; +package io.airbyte.commons.server.errors; import io.airbyte.commons.version.Version; diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/ValueConflictKnownException.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/ValueConflictKnownException.java similarity index 90% rename from airbyte-server/src/main/java/io/airbyte/server/errors/ValueConflictKnownException.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/ValueConflictKnownException.java index b84ed0da6472..c6ac8dbe92ef 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/ValueConflictKnownException.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/ValueConflictKnownException.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.errors; +package io.airbyte.commons.server.errors; public class ValueConflictKnownException extends KnownException { diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/AttemptHandler.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/AttemptHandler.java similarity index 98% rename from airbyte-server/src/main/java/io/airbyte/server/handlers/AttemptHandler.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/AttemptHandler.java index 6a07ff304408..c7132665fe92 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/AttemptHandler.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/AttemptHandler.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import io.airbyte.api.model.generated.InternalOperationResult; import io.airbyte.api.model.generated.SaveStatsRequestBody; diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/ConnectionsHandler.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/ConnectionsHandler.java similarity index 97% rename from airbyte-server/src/main/java/io/airbyte/server/handlers/ConnectionsHandler.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/ConnectionsHandler.java index ba32bfeb380e..2b298db853df 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/ConnectionsHandler.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/ConnectionsHandler.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Preconditions; @@ -26,6 +26,14 @@ import io.airbyte.api.model.generated.WorkspaceIdRequestBody; import io.airbyte.commons.enums.Enums; import io.airbyte.commons.json.Jsons; +import io.airbyte.commons.server.converters.ApiPojoConverters; +import io.airbyte.commons.server.converters.CatalogDiffConverters; +import io.airbyte.commons.server.handlers.helpers.CatalogConverter; +import io.airbyte.commons.server.handlers.helpers.ConnectionMatcher; +import io.airbyte.commons.server.handlers.helpers.ConnectionScheduleHelper; +import io.airbyte.commons.server.handlers.helpers.DestinationMatcher; +import io.airbyte.commons.server.handlers.helpers.SourceMatcher; +import io.airbyte.commons.server.scheduler.EventRunner; import io.airbyte.config.ActorCatalog; import io.airbyte.config.BasicSchedule; import io.airbyte.config.DestinationConnection; @@ -46,14 +54,6 @@ import io.airbyte.persistence.job.WorkspaceHelper; import io.airbyte.protocol.models.CatalogHelpers; import io.airbyte.protocol.models.ConfiguredAirbyteCatalog; -import io.airbyte.server.converters.ApiPojoConverters; -import io.airbyte.server.converters.CatalogDiffConverters; -import io.airbyte.server.handlers.helpers.CatalogConverter; -import io.airbyte.server.handlers.helpers.ConnectionMatcher; -import io.airbyte.server.handlers.helpers.ConnectionScheduleHelper; -import io.airbyte.server.handlers.helpers.DestinationMatcher; -import io.airbyte.server.handlers.helpers.SourceMatcher; -import io.airbyte.server.scheduler.EventRunner; import io.airbyte.validation.json.JsonValidationException; import io.airbyte.workers.helper.ConnectionHelper; import jakarta.inject.Singleton; diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/DestinationDefinitionsHandler.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/DestinationDefinitionsHandler.java similarity index 96% rename from airbyte-server/src/main/java/io/airbyte/server/handlers/DestinationDefinitionsHandler.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/DestinationDefinitionsHandler.java index 8dbd84014459..813cda084b55 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/DestinationDefinitionsHandler.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/DestinationDefinitionsHandler.java @@ -2,9 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; - -import static io.airbyte.server.ServerConstants.DEV_IMAGE_TAG; +package io.airbyte.commons.server.handlers; import com.google.common.annotations.VisibleForTesting; import io.airbyte.api.model.generated.CustomDestinationDefinitionCreate; @@ -21,6 +19,15 @@ import io.airbyte.api.model.generated.WorkspaceIdRequestBody; import io.airbyte.commons.docker.DockerUtils; import io.airbyte.commons.resources.MoreResources; +import io.airbyte.commons.server.ServerConstants; +import io.airbyte.commons.server.converters.ApiPojoConverters; +import io.airbyte.commons.server.converters.SpecFetcher; +import io.airbyte.commons.server.errors.IdNotFoundKnownException; +import io.airbyte.commons.server.errors.InternalServerKnownException; +import io.airbyte.commons.server.errors.UnsupportedProtocolVersionException; +import io.airbyte.commons.server.scheduler.SynchronousResponse; +import io.airbyte.commons.server.scheduler.SynchronousSchedulerClient; +import io.airbyte.commons.server.services.AirbyteGithubStore; import io.airbyte.commons.util.MoreLists; import io.airbyte.commons.version.AirbyteProtocolVersion; import io.airbyte.commons.version.AirbyteProtocolVersionRange; @@ -29,14 +36,6 @@ import io.airbyte.config.persistence.ConfigNotFoundException; import io.airbyte.config.persistence.ConfigRepository; import io.airbyte.protocol.models.ConnectorSpecification; -import io.airbyte.server.converters.ApiPojoConverters; -import io.airbyte.server.converters.SpecFetcher; -import io.airbyte.server.errors.IdNotFoundKnownException; -import io.airbyte.server.errors.InternalServerKnownException; -import io.airbyte.server.errors.UnsupportedProtocolVersionException; -import io.airbyte.server.scheduler.SynchronousResponse; -import io.airbyte.server.scheduler.SynchronousSchedulerClient; -import io.airbyte.server.services.AirbyteGithubStore; import io.airbyte.validation.json.JsonValidationException; import jakarta.inject.Singleton; import java.io.IOException; @@ -240,7 +239,7 @@ public DestinationDefinitionRead updateDestinationDefinition(final DestinationDe // specs are re-fetched from the container if the image tag has changed, or if the tag is "dev", // to allow for easier iteration of dev images final boolean specNeedsUpdate = !currentDestination.getDockerImageTag().equals(destinationDefinitionUpdate.getDockerImageTag()) - || destinationDefinitionUpdate.getDockerImageTag().equals(DEV_IMAGE_TAG); + || ServerConstants.DEV_IMAGE_TAG.equals(destinationDefinitionUpdate.getDockerImageTag()); final ConnectorSpecification spec = specNeedsUpdate ? getSpecForImage(currentDestination.getDockerRepository(), destinationDefinitionUpdate.getDockerImageTag(), currentDestination.getCustom()) : currentDestination.getSpec(); diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/DestinationHandler.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/DestinationHandler.java similarity index 99% rename from airbyte-server/src/main/java/io/airbyte/server/handlers/DestinationHandler.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/DestinationHandler.java index d105a514e0ec..4a5fa21e5257 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/DestinationHandler.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/DestinationHandler.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import com.fasterxml.jackson.databind.JsonNode; import com.google.common.annotations.VisibleForTesting; @@ -20,6 +20,7 @@ import io.airbyte.api.model.generated.DestinationUpdate; import io.airbyte.api.model.generated.WorkspaceIdRequestBody; import io.airbyte.commons.json.Jsons; +import io.airbyte.commons.server.converters.ConfigurationUpdate; import io.airbyte.config.DestinationConnection; import io.airbyte.config.StandardDestinationDefinition; import io.airbyte.config.persistence.ConfigNotFoundException; @@ -29,7 +30,6 @@ import io.airbyte.config.persistence.split_secrets.JsonSecretsProcessor; import io.airbyte.persistence.job.factory.OAuthConfigSupplier; import io.airbyte.protocol.models.ConnectorSpecification; -import io.airbyte.server.converters.ConfigurationUpdate; import io.airbyte.validation.json.JsonSchemaValidator; import io.airbyte.validation.json.JsonValidationException; import jakarta.inject.Inject; diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/HealthCheckHandler.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/HealthCheckHandler.java similarity index 92% rename from airbyte-server/src/main/java/io/airbyte/server/handlers/HealthCheckHandler.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/HealthCheckHandler.java index 2843fbc2c09d..bd96e2df625f 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/HealthCheckHandler.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/HealthCheckHandler.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import io.airbyte.api.model.generated.HealthCheckRead; import io.airbyte.config.persistence.ConfigRepository; diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/JobHistoryHandler.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/JobHistoryHandler.java similarity index 98% rename from airbyte-server/src/main/java/io/airbyte/server/handlers/JobHistoryHandler.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/JobHistoryHandler.java index 579e0b4672a4..65fddab32957 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/JobHistoryHandler.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/JobHistoryHandler.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import com.google.common.base.Preconditions; import io.airbyte.api.model.generated.AttemptInfoRead; @@ -31,6 +31,8 @@ import io.airbyte.api.model.generated.SourceIdRequestBody; import io.airbyte.api.model.generated.SourceRead; import io.airbyte.commons.enums.Enums; +import io.airbyte.commons.server.converters.JobConverter; +import io.airbyte.commons.server.converters.WorkflowStateConverter; import io.airbyte.commons.temporal.TemporalClient; import io.airbyte.commons.version.AirbyteVersion; import io.airbyte.config.Configs.WorkerEnvironment; @@ -42,8 +44,6 @@ import io.airbyte.persistence.job.JobPersistence.JobAttemptPair; import io.airbyte.persistence.job.models.Job; import io.airbyte.persistence.job.models.JobStatus; -import io.airbyte.server.converters.JobConverter; -import io.airbyte.server.converters.WorkflowStateConverter; import io.airbyte.validation.json.JsonValidationException; import jakarta.inject.Singleton; import java.io.IOException; diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/LogsHandler.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/LogsHandler.java similarity index 97% rename from airbyte-server/src/main/java/io/airbyte/server/handlers/LogsHandler.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/LogsHandler.java index b9ac2378aca4..4fb5ce2f8d66 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/LogsHandler.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/LogsHandler.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import io.airbyte.api.model.generated.LogsRequestBody; import io.airbyte.config.Configs; diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/OAuthHandler.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/OAuthHandler.java similarity index 99% rename from airbyte-server/src/main/java/io/airbyte/server/handlers/OAuthHandler.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/OAuthHandler.java index 6823d6d5a8f6..8a4cb5089d50 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/OAuthHandler.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/OAuthHandler.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import static io.airbyte.metrics.lib.ApmTraceConstants.Tags.DESTINATION_DEFINITION_ID_KEY; import static io.airbyte.metrics.lib.ApmTraceConstants.Tags.SOURCE_DEFINITION_ID_KEY; @@ -22,6 +22,7 @@ import io.airbyte.commons.constants.AirbyteSecretConstants; import io.airbyte.commons.json.JsonPaths; import io.airbyte.commons.json.Jsons; +import io.airbyte.commons.server.handlers.helpers.OAuthPathExtractor; import io.airbyte.config.DestinationConnection; import io.airbyte.config.DestinationOAuthParameter; import io.airbyte.config.SourceConnection; @@ -37,7 +38,6 @@ import io.airbyte.persistence.job.factory.OAuthConfigSupplier; import io.airbyte.persistence.job.tracker.TrackingMetadata; import io.airbyte.protocol.models.ConnectorSpecification; -import io.airbyte.server.handlers.helpers.OAuthPathExtractor; import io.airbyte.validation.json.JsonValidationException; import jakarta.inject.Singleton; import java.io.IOException; diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/OpenApiConfigHandler.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/OpenApiConfigHandler.java similarity index 93% rename from airbyte-server/src/main/java/io/airbyte/server/handlers/OpenApiConfigHandler.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/OpenApiConfigHandler.java index e9d4b3614ec8..4192ff00dbb5 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/OpenApiConfigHandler.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/OpenApiConfigHandler.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import io.airbyte.commons.resources.MoreResources; import jakarta.inject.Singleton; diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/OperationsHandler.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/OperationsHandler.java similarity index 98% rename from airbyte-server/src/main/java/io/airbyte/server/handlers/OperationsHandler.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/OperationsHandler.java index 7e6c45140508..7510b26cc846 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/OperationsHandler.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/OperationsHandler.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Preconditions; @@ -17,13 +17,13 @@ import io.airbyte.api.model.generated.OperationUpdate; import io.airbyte.api.model.generated.OperatorConfiguration; import io.airbyte.commons.enums.Enums; +import io.airbyte.commons.server.converters.OperationsConverter; import io.airbyte.config.ConfigSchema; import io.airbyte.config.StandardSync; import io.airbyte.config.StandardSyncOperation; import io.airbyte.config.StandardSyncOperation.OperatorType; import io.airbyte.config.persistence.ConfigNotFoundException; import io.airbyte.config.persistence.ConfigRepository; -import io.airbyte.server.converters.OperationsConverter; import io.airbyte.validation.json.JsonValidationException; import jakarta.inject.Inject; import jakarta.inject.Singleton; diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/SchedulerHandler.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/SchedulerHandler.java similarity index 97% rename from airbyte-server/src/main/java/io/airbyte/server/handlers/SchedulerHandler.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/SchedulerHandler.java index d2270ccf172b..24eed7407bf0 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/SchedulerHandler.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/SchedulerHandler.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Charsets; @@ -45,6 +45,15 @@ import io.airbyte.commons.enums.Enums; import io.airbyte.commons.features.FeatureFlags; import io.airbyte.commons.json.Jsons; +import io.airbyte.commons.server.converters.ConfigurationUpdate; +import io.airbyte.commons.server.converters.JobConverter; +import io.airbyte.commons.server.converters.OauthModelConverter; +import io.airbyte.commons.server.errors.ValueConflictKnownException; +import io.airbyte.commons.server.handlers.helpers.CatalogConverter; +import io.airbyte.commons.server.scheduler.EventRunner; +import io.airbyte.commons.server.scheduler.SynchronousJobMetadata; +import io.airbyte.commons.server.scheduler.SynchronousResponse; +import io.airbyte.commons.server.scheduler.SynchronousSchedulerClient; import io.airbyte.commons.temporal.ErrorCode; import io.airbyte.commons.temporal.TemporalClient.ManualOperationResult; import io.airbyte.commons.version.Version; @@ -65,15 +74,6 @@ import io.airbyte.persistence.job.models.Job; import io.airbyte.protocol.models.AirbyteCatalog; import io.airbyte.protocol.models.ConnectorSpecification; -import io.airbyte.server.converters.ConfigurationUpdate; -import io.airbyte.server.converters.JobConverter; -import io.airbyte.server.converters.OauthModelConverter; -import io.airbyte.server.errors.ValueConflictKnownException; -import io.airbyte.server.handlers.helpers.CatalogConverter; -import io.airbyte.server.scheduler.EventRunner; -import io.airbyte.server.scheduler.SynchronousJobMetadata; -import io.airbyte.server.scheduler.SynchronousResponse; -import io.airbyte.server.scheduler.SynchronousSchedulerClient; import io.airbyte.validation.json.JsonSchemaValidator; import io.airbyte.validation.json.JsonValidationException; import jakarta.inject.Singleton; diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/SourceDefinitionsHandler.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/SourceDefinitionsHandler.java similarity index 95% rename from airbyte-server/src/main/java/io/airbyte/server/handlers/SourceDefinitionsHandler.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/SourceDefinitionsHandler.java index 578d8398153a..9ee876cba701 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/SourceDefinitionsHandler.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/SourceDefinitionsHandler.java @@ -2,9 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; - -import static io.airbyte.server.ServerConstants.DEV_IMAGE_TAG; +package io.airbyte.commons.server.handlers; import com.google.common.annotations.VisibleForTesting; import io.airbyte.api.model.generated.CustomSourceDefinitionCreate; @@ -22,6 +20,15 @@ import io.airbyte.api.model.generated.WorkspaceIdRequestBody; import io.airbyte.commons.docker.DockerUtils; import io.airbyte.commons.resources.MoreResources; +import io.airbyte.commons.server.ServerConstants; +import io.airbyte.commons.server.converters.ApiPojoConverters; +import io.airbyte.commons.server.converters.SpecFetcher; +import io.airbyte.commons.server.errors.IdNotFoundKnownException; +import io.airbyte.commons.server.errors.InternalServerKnownException; +import io.airbyte.commons.server.errors.UnsupportedProtocolVersionException; +import io.airbyte.commons.server.scheduler.SynchronousResponse; +import io.airbyte.commons.server.scheduler.SynchronousSchedulerClient; +import io.airbyte.commons.server.services.AirbyteGithubStore; import io.airbyte.commons.util.MoreLists; import io.airbyte.commons.version.AirbyteProtocolVersion; import io.airbyte.commons.version.AirbyteProtocolVersionRange; @@ -30,14 +37,6 @@ import io.airbyte.config.persistence.ConfigNotFoundException; import io.airbyte.config.persistence.ConfigRepository; import io.airbyte.protocol.models.ConnectorSpecification; -import io.airbyte.server.converters.ApiPojoConverters; -import io.airbyte.server.converters.SpecFetcher; -import io.airbyte.server.errors.IdNotFoundKnownException; -import io.airbyte.server.errors.InternalServerKnownException; -import io.airbyte.server.errors.UnsupportedProtocolVersionException; -import io.airbyte.server.scheduler.SynchronousResponse; -import io.airbyte.server.scheduler.SynchronousSchedulerClient; -import io.airbyte.server.services.AirbyteGithubStore; import io.airbyte.validation.json.JsonValidationException; import jakarta.inject.Inject; import jakarta.inject.Singleton; @@ -242,7 +241,7 @@ public SourceDefinitionRead updateSourceDefinition(final SourceDefinitionUpdate // specs are re-fetched from the container if the image tag has changed, or if the tag is "dev", // to allow for easier iteration of dev images final boolean specNeedsUpdate = !currentSourceDefinition.getDockerImageTag().equals(sourceDefinitionUpdate.getDockerImageTag()) - || sourceDefinitionUpdate.getDockerImageTag().equals(DEV_IMAGE_TAG); + || ServerConstants.DEV_IMAGE_TAG.equals(sourceDefinitionUpdate.getDockerImageTag()); final ConnectorSpecification spec = specNeedsUpdate ? getSpecForImage(currentSourceDefinition.getDockerRepository(), sourceDefinitionUpdate.getDockerImageTag(), currentSourceDefinition.getCustom()) diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/SourceHandler.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/SourceHandler.java similarity index 99% rename from airbyte-server/src/main/java/io/airbyte/server/handlers/SourceHandler.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/SourceHandler.java index cfb0fb278b8c..3bd126045cdf 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/SourceHandler.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/SourceHandler.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import com.fasterxml.jackson.databind.JsonNode; import com.google.common.collect.Lists; @@ -19,6 +19,7 @@ import io.airbyte.api.model.generated.SourceSnippetRead; import io.airbyte.api.model.generated.SourceUpdate; import io.airbyte.api.model.generated.WorkspaceIdRequestBody; +import io.airbyte.commons.server.converters.ConfigurationUpdate; import io.airbyte.config.SourceConnection; import io.airbyte.config.StandardSourceDefinition; import io.airbyte.config.persistence.ConfigNotFoundException; @@ -28,7 +29,6 @@ import io.airbyte.config.persistence.split_secrets.JsonSecretsProcessor; import io.airbyte.persistence.job.factory.OAuthConfigSupplier; import io.airbyte.protocol.models.ConnectorSpecification; -import io.airbyte.server.converters.ConfigurationUpdate; import io.airbyte.validation.json.JsonSchemaValidator; import io.airbyte.validation.json.JsonValidationException; import jakarta.inject.Inject; diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/StateHandler.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/StateHandler.java similarity index 97% rename from airbyte-server/src/main/java/io/airbyte/server/handlers/StateHandler.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/StateHandler.java index 977f95813aad..8bc2a8f68e12 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/StateHandler.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/StateHandler.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import io.airbyte.api.model.generated.ConnectionIdRequestBody; import io.airbyte.api.model.generated.ConnectionState; diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/WebBackendCheckUpdatesHandler.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/WebBackendCheckUpdatesHandler.java similarity index 97% rename from airbyte-server/src/main/java/io/airbyte/server/handlers/WebBackendCheckUpdatesHandler.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/WebBackendCheckUpdatesHandler.java index 7c51e26c5494..13a2c0d3cd2a 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/WebBackendCheckUpdatesHandler.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/WebBackendCheckUpdatesHandler.java @@ -2,13 +2,13 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import io.airbyte.api.model.generated.WebBackendCheckUpdatesRead; +import io.airbyte.commons.server.services.AirbyteGithubStore; import io.airbyte.config.StandardDestinationDefinition; import io.airbyte.config.StandardSourceDefinition; import io.airbyte.config.persistence.ConfigRepository; -import io.airbyte.server.services.AirbyteGithubStore; import jakarta.inject.Singleton; import java.io.IOException; import java.util.List; diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/WebBackendConnectionsHandler.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/WebBackendConnectionsHandler.java similarity index 99% rename from airbyte-server/src/main/java/io/airbyte/server/handlers/WebBackendConnectionsHandler.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/WebBackendConnectionsHandler.java index 99303a29f615..954c40fa6784 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/WebBackendConnectionsHandler.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/WebBackendConnectionsHandler.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import static java.util.stream.Collectors.toMap; @@ -49,6 +49,9 @@ import io.airbyte.commons.enums.Enums; import io.airbyte.commons.json.Jsons; import io.airbyte.commons.lang.MoreBooleans; +import io.airbyte.commons.server.converters.ApiPojoConverters; +import io.airbyte.commons.server.handlers.helpers.CatalogConverter; +import io.airbyte.commons.server.scheduler.EventRunner; import io.airbyte.config.ActorCatalog; import io.airbyte.config.ActorCatalogFetchEvent; import io.airbyte.config.StandardSync; @@ -56,9 +59,6 @@ import io.airbyte.config.persistence.ConfigRepository; import io.airbyte.config.persistence.ConfigRepository.StandardSyncQuery; import io.airbyte.protocol.models.ConfiguredAirbyteCatalog; -import io.airbyte.server.converters.ApiPojoConverters; -import io.airbyte.server.handlers.helpers.CatalogConverter; -import io.airbyte.server.scheduler.EventRunner; import io.airbyte.validation.json.JsonValidationException; import io.airbyte.workers.helper.ProtocolConverters; import jakarta.inject.Singleton; diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/WebBackendGeographiesHandler.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/WebBackendGeographiesHandler.java similarity index 95% rename from airbyte-server/src/main/java/io/airbyte/server/handlers/WebBackendGeographiesHandler.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/WebBackendGeographiesHandler.java index 3d39209098f1..7e33d5374e7e 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/WebBackendGeographiesHandler.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/WebBackendGeographiesHandler.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import io.airbyte.api.model.generated.Geography; import io.airbyte.api.model.generated.WebBackendGeographiesListResult; diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/WorkspacesHandler.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/WorkspacesHandler.java similarity index 97% rename from airbyte-server/src/main/java/io/airbyte/server/handlers/WorkspacesHandler.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/WorkspacesHandler.java index 6829747a3014..29b739ffe8d3 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/WorkspacesHandler.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/WorkspacesHandler.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import com.github.slugify.Slugify; import com.google.common.annotations.VisibleForTesting; @@ -26,17 +26,17 @@ import io.airbyte.api.model.generated.WorkspaceUpdate; import io.airbyte.api.model.generated.WorkspaceUpdateName; import io.airbyte.commons.enums.Enums; +import io.airbyte.commons.server.converters.ApiPojoConverters; +import io.airbyte.commons.server.converters.NotificationConverter; +import io.airbyte.commons.server.converters.WorkspaceWebhookConfigsConverter; +import io.airbyte.commons.server.errors.IdNotFoundKnownException; +import io.airbyte.commons.server.errors.InternalServerKnownException; +import io.airbyte.commons.server.errors.ValueConflictKnownException; import io.airbyte.config.StandardWorkspace; import io.airbyte.config.persistence.ConfigNotFoundException; import io.airbyte.config.persistence.ConfigRepository; import io.airbyte.config.persistence.SecretsRepositoryWriter; import io.airbyte.notification.NotificationClient; -import io.airbyte.server.converters.ApiPojoConverters; -import io.airbyte.server.converters.NotificationConverter; -import io.airbyte.server.converters.WorkspaceWebhookConfigsConverter; -import io.airbyte.server.errors.IdNotFoundKnownException; -import io.airbyte.server.errors.InternalServerKnownException; -import io.airbyte.server.errors.ValueConflictKnownException; import io.airbyte.validation.json.JsonValidationException; import jakarta.inject.Inject; import jakarta.inject.Singleton; diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/helpers/CatalogConverter.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/helpers/CatalogConverter.java similarity index 99% rename from airbyte-server/src/main/java/io/airbyte/server/handlers/helpers/CatalogConverter.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/helpers/CatalogConverter.java index 8864c1b8130f..ae68e39a0261 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/helpers/CatalogConverter.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/helpers/CatalogConverter.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers.helpers; +package io.airbyte.commons.server.handlers.helpers; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ObjectNode; diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/helpers/ConnectionMatcher.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/helpers/ConnectionMatcher.java similarity index 97% rename from airbyte-server/src/main/java/io/airbyte/server/handlers/helpers/ConnectionMatcher.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/helpers/ConnectionMatcher.java index 2afaf63aec8b..d9b0387fca17 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/helpers/ConnectionMatcher.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/helpers/ConnectionMatcher.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers.helpers; +package io.airbyte.commons.server.handlers.helpers; import io.airbyte.api.model.generated.ConnectionRead; import io.airbyte.api.model.generated.ConnectionSearch; diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/helpers/ConnectionScheduleHelper.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/helpers/ConnectionScheduleHelper.java similarity index 97% rename from airbyte-server/src/main/java/io/airbyte/server/handlers/helpers/ConnectionScheduleHelper.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/helpers/ConnectionScheduleHelper.java index 807072626cb3..e49d31a6449e 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/helpers/ConnectionScheduleHelper.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/helpers/ConnectionScheduleHelper.java @@ -2,17 +2,17 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers.helpers; +package io.airbyte.commons.server.handlers.helpers; import io.airbyte.api.model.generated.ConnectionScheduleData; import io.airbyte.api.model.generated.ConnectionScheduleType; +import io.airbyte.commons.server.converters.ApiPojoConverters; import io.airbyte.config.BasicSchedule; import io.airbyte.config.Cron; import io.airbyte.config.Schedule; import io.airbyte.config.ScheduleData; import io.airbyte.config.StandardSync; import io.airbyte.config.StandardSync.ScheduleType; -import io.airbyte.server.converters.ApiPojoConverters; import io.airbyte.validation.json.JsonValidationException; import java.text.ParseException; import java.util.TimeZone; diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/helpers/DestinationMatcher.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/helpers/DestinationMatcher.java similarity index 97% rename from airbyte-server/src/main/java/io/airbyte/server/handlers/helpers/DestinationMatcher.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/helpers/DestinationMatcher.java index b9c374c31e00..05f2752d1df2 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/helpers/DestinationMatcher.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/helpers/DestinationMatcher.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers.helpers; +package io.airbyte.commons.server.handlers.helpers; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ObjectNode; diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/helpers/Matchable.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/helpers/Matchable.java similarity index 71% rename from airbyte-server/src/main/java/io/airbyte/server/handlers/helpers/Matchable.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/helpers/Matchable.java index b1de20b95fdc..2e87767d3a76 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/helpers/Matchable.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/helpers/Matchable.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers.helpers; +package io.airbyte.commons.server.handlers.helpers; @FunctionalInterface interface Matchable { diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/helpers/OAuthPathExtractor.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/helpers/OAuthPathExtractor.java similarity index 96% rename from airbyte-server/src/main/java/io/airbyte/server/handlers/helpers/OAuthPathExtractor.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/helpers/OAuthPathExtractor.java index 4a6ed4580020..60da416a5108 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/helpers/OAuthPathExtractor.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/helpers/OAuthPathExtractor.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers.helpers; +package io.airbyte.commons.server.handlers.helpers; import com.fasterxml.jackson.databind.JsonNode; import java.util.ArrayList; diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/helpers/SourceMatcher.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/helpers/SourceMatcher.java similarity index 97% rename from airbyte-server/src/main/java/io/airbyte/server/handlers/helpers/SourceMatcher.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/helpers/SourceMatcher.java index ee4e35d7d2c7..78c13fc4e992 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/helpers/SourceMatcher.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/helpers/SourceMatcher.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers.helpers; +package io.airbyte.commons.server.handlers.helpers; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ObjectNode; diff --git a/airbyte-server/src/main/java/io/airbyte/server/scheduler/DefaultSynchronousSchedulerClient.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/scheduler/DefaultSynchronousSchedulerClient.java similarity index 99% rename from airbyte-server/src/main/java/io/airbyte/server/scheduler/DefaultSynchronousSchedulerClient.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/scheduler/DefaultSynchronousSchedulerClient.java index 28036302a9be..f01806f08958 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/scheduler/DefaultSynchronousSchedulerClient.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/scheduler/DefaultSynchronousSchedulerClient.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.scheduler; +package io.airbyte.commons.server.scheduler; import com.fasterxml.jackson.databind.JsonNode; import com.google.common.annotations.VisibleForTesting; diff --git a/airbyte-server/src/main/java/io/airbyte/server/scheduler/EventRunner.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/scheduler/EventRunner.java similarity index 95% rename from airbyte-server/src/main/java/io/airbyte/server/scheduler/EventRunner.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/scheduler/EventRunner.java index bc4a83a07042..627df14556b3 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/scheduler/EventRunner.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/scheduler/EventRunner.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.scheduler; +package io.airbyte.commons.server.scheduler; import io.airbyte.commons.temporal.TemporalClient.ManualOperationResult; import io.airbyte.protocol.models.StreamDescriptor; diff --git a/airbyte-server/src/main/java/io/airbyte/server/scheduler/SynchronousJobMetadata.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/scheduler/SynchronousJobMetadata.java similarity index 98% rename from airbyte-server/src/main/java/io/airbyte/server/scheduler/SynchronousJobMetadata.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/scheduler/SynchronousJobMetadata.java index b4689b9fa6bf..a3731db99e52 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/scheduler/SynchronousJobMetadata.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/scheduler/SynchronousJobMetadata.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.scheduler; +package io.airbyte.commons.server.scheduler; import io.airbyte.commons.temporal.JobMetadata; import io.airbyte.config.JobConfig.ConfigType; diff --git a/airbyte-server/src/main/java/io/airbyte/server/scheduler/SynchronousResponse.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/scheduler/SynchronousResponse.java similarity index 98% rename from airbyte-server/src/main/java/io/airbyte/server/scheduler/SynchronousResponse.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/scheduler/SynchronousResponse.java index 463564e8fe98..1c135ce85aaf 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/scheduler/SynchronousResponse.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/scheduler/SynchronousResponse.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.scheduler; +package io.airbyte.commons.server.scheduler; import io.airbyte.commons.temporal.TemporalResponse; import io.airbyte.config.ConnectorJobOutput; diff --git a/airbyte-server/src/main/java/io/airbyte/server/scheduler/SynchronousSchedulerClient.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/scheduler/SynchronousSchedulerClient.java similarity index 97% rename from airbyte-server/src/main/java/io/airbyte/server/scheduler/SynchronousSchedulerClient.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/scheduler/SynchronousSchedulerClient.java index 7ff4257e1f2b..a9bceabccc64 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/scheduler/SynchronousSchedulerClient.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/scheduler/SynchronousSchedulerClient.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.scheduler; +package io.airbyte.commons.server.scheduler; import io.airbyte.commons.version.Version; import io.airbyte.config.DestinationConnection; diff --git a/airbyte-server/src/main/java/io/airbyte/server/scheduler/TemporalEventRunner.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/scheduler/TemporalEventRunner.java similarity index 97% rename from airbyte-server/src/main/java/io/airbyte/server/scheduler/TemporalEventRunner.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/scheduler/TemporalEventRunner.java index 5aa469a1a9d5..e6976a7f9de1 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/scheduler/TemporalEventRunner.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/scheduler/TemporalEventRunner.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.scheduler; +package io.airbyte.commons.server.scheduler; import io.airbyte.commons.temporal.TemporalClient; import io.airbyte.commons.temporal.TemporalClient.ManualOperationResult; diff --git a/airbyte-server/src/main/java/io/airbyte/server/services/AirbyteGithubStore.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/services/AirbyteGithubStore.java similarity index 98% rename from airbyte-server/src/main/java/io/airbyte/server/services/AirbyteGithubStore.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/services/AirbyteGithubStore.java index 8500d6e8dc55..06113d752d48 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/services/AirbyteGithubStore.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/services/AirbyteGithubStore.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.services; +package io.airbyte.commons.server.services; import com.google.common.annotations.VisibleForTesting; import io.airbyte.config.EnvConfigs; diff --git a/airbyte-server/src/test/java/io/airbyte/server/converters/CatalogConverterTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/converters/CatalogConverterTest.java similarity index 94% rename from airbyte-server/src/test/java/io/airbyte/server/converters/CatalogConverterTest.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/converters/CatalogConverterTest.java index 59602b2e7263..7f4f47719ae4 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/converters/CatalogConverterTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/converters/CatalogConverterTest.java @@ -2,10 +2,10 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.converters; +package io.airbyte.commons.server.converters; -import static io.airbyte.server.helpers.ConnectionHelpers.FIELD_NAME; -import static io.airbyte.server.helpers.ConnectionHelpers.SECOND_FIELD_NAME; +import static io.airbyte.commons.server.helpers.ConnectionHelpers.FIELD_NAME; +import static io.airbyte.commons.server.helpers.ConnectionHelpers.SECOND_FIELD_NAME; import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -16,10 +16,10 @@ import io.airbyte.api.model.generated.SelectedFieldInfo; import io.airbyte.api.model.generated.SyncMode; import io.airbyte.commons.enums.Enums; +import io.airbyte.commons.server.handlers.helpers.CatalogConverter; +import io.airbyte.commons.server.helpers.ConnectionHelpers; import io.airbyte.config.DataType; import io.airbyte.config.FieldSelectionData; -import io.airbyte.server.handlers.helpers.CatalogConverter; -import io.airbyte.server.helpers.ConnectionHelpers; import io.airbyte.validation.json.JsonValidationException; import java.util.List; import org.junit.jupiter.api.Test; diff --git a/airbyte-server/src/test/java/io/airbyte/server/converters/CatalogDiffConvertersTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/converters/CatalogDiffConvertersTest.java similarity index 94% rename from airbyte-server/src/test/java/io/airbyte/server/converters/CatalogDiffConvertersTest.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/converters/CatalogDiffConvertersTest.java index d9108cd6f577..e18c89ef10ba 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/converters/CatalogDiffConvertersTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/converters/CatalogDiffConvertersTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.converters; +package io.airbyte.commons.server.converters; import static org.junit.jupiter.api.Assertions.assertTrue; diff --git a/airbyte-server/src/test/java/io/airbyte/server/converters/ConfigurationUpdateTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/converters/ConfigurationUpdateTest.java similarity index 99% rename from airbyte-server/src/test/java/io/airbyte/server/converters/ConfigurationUpdateTest.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/converters/ConfigurationUpdateTest.java index 654c7af8c44b..831bbc58ff24 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/converters/ConfigurationUpdateTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/converters/ConfigurationUpdateTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.converters; +package io.airbyte.commons.server.converters; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.mock; diff --git a/airbyte-server/src/test/java/io/airbyte/server/converters/JobConverterTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/converters/JobConverterTest.java similarity index 99% rename from airbyte-server/src/test/java/io/airbyte/server/converters/JobConverterTest.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/converters/JobConverterTest.java index f73ec6e62aad..eb2595333f85 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/converters/JobConverterTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/converters/JobConverterTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.converters; +package io.airbyte.commons.server.converters; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; diff --git a/airbyte-server/src/test/java/io/airbyte/server/converters/OauthModelConverterTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/converters/OauthModelConverterTest.java similarity index 98% rename from airbyte-server/src/test/java/io/airbyte/server/converters/OauthModelConverterTest.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/converters/OauthModelConverterTest.java index c96a23d1bab1..494e9c3a2b7f 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/converters/OauthModelConverterTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/converters/OauthModelConverterTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.converters; +package io.airbyte.commons.server.converters; import static org.junit.jupiter.api.Assertions.*; diff --git a/airbyte-server/src/test/java/io/airbyte/server/handlers/AttemptHandlerTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/AttemptHandlerTest.java similarity index 98% rename from airbyte-server/src/test/java/io/airbyte/server/handlers/AttemptHandlerTest.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/AttemptHandlerTest.java index 4698ed5c6387..eeb2c0ff48c7 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/handlers/AttemptHandlerTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/AttemptHandlerTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; diff --git a/airbyte-server/src/test/java/io/airbyte/server/handlers/ConnectionSchedulerHelperTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/ConnectionSchedulerHelperTest.java similarity index 99% rename from airbyte-server/src/test/java/io/airbyte/server/handlers/ConnectionSchedulerHelperTest.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/ConnectionSchedulerHelperTest.java index 7c8f2bc0bc82..83c68ec03c45 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/handlers/ConnectionSchedulerHelperTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/ConnectionSchedulerHelperTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -15,11 +15,11 @@ import io.airbyte.api.model.generated.ConnectionScheduleDataBasicSchedule.TimeUnitEnum; import io.airbyte.api.model.generated.ConnectionScheduleDataCron; import io.airbyte.api.model.generated.ConnectionScheduleType; +import io.airbyte.commons.server.handlers.helpers.ConnectionScheduleHelper; import io.airbyte.config.BasicSchedule.TimeUnit; import io.airbyte.config.Schedule; import io.airbyte.config.StandardSync; import io.airbyte.config.StandardSync.ScheduleType; -import io.airbyte.server.handlers.helpers.ConnectionScheduleHelper; import io.airbyte.validation.json.JsonValidationException; import org.junit.jupiter.api.Test; diff --git a/airbyte-server/src/test/java/io/airbyte/server/handlers/ConnectionsHandlerTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/ConnectionsHandlerTest.java similarity index 99% rename from airbyte-server/src/test/java/io/airbyte/server/handlers/ConnectionsHandlerTest.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/ConnectionsHandlerTest.java index 9a2364a8cf45..b2445c5d43b0 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/handlers/ConnectionsHandlerTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/ConnectionsHandlerTest.java @@ -2,10 +2,10 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; -import static io.airbyte.server.helpers.ConnectionHelpers.FIELD_NAME; -import static io.airbyte.server.helpers.ConnectionHelpers.SECOND_FIELD_NAME; +import static io.airbyte.commons.server.helpers.ConnectionHelpers.FIELD_NAME; +import static io.airbyte.commons.server.helpers.ConnectionHelpers.SECOND_FIELD_NAME; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -43,6 +43,10 @@ import io.airbyte.api.model.generated.WorkspaceIdRequestBody; import io.airbyte.commons.enums.Enums; import io.airbyte.commons.json.Jsons; +import io.airbyte.commons.server.converters.ApiPojoConverters; +import io.airbyte.commons.server.handlers.helpers.CatalogConverter; +import io.airbyte.commons.server.helpers.ConnectionHelpers; +import io.airbyte.commons.server.scheduler.EventRunner; import io.airbyte.config.BasicSchedule; import io.airbyte.config.ConfigSchema; import io.airbyte.config.Cron; @@ -65,10 +69,6 @@ import io.airbyte.config.persistence.ConfigRepository; import io.airbyte.persistence.job.WorkspaceHelper; import io.airbyte.protocol.models.ConfiguredAirbyteCatalog; -import io.airbyte.server.converters.ApiPojoConverters; -import io.airbyte.server.handlers.helpers.CatalogConverter; -import io.airbyte.server.helpers.ConnectionHelpers; -import io.airbyte.server.scheduler.EventRunner; import io.airbyte.validation.json.JsonValidationException; import io.airbyte.workers.helper.ConnectionHelper; import java.io.IOException; diff --git a/airbyte-server/src/test/java/io/airbyte/server/handlers/DestinationDefinitionsHandlerTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/DestinationDefinitionsHandlerTest.java similarity index 98% rename from airbyte-server/src/test/java/io/airbyte/server/handlers/DestinationDefinitionsHandlerTest.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/DestinationDefinitionsHandlerTest.java index 8eadc7abf46a..4a65cc85aa93 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/handlers/DestinationDefinitionsHandlerTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/DestinationDefinitionsHandlerTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -31,6 +31,12 @@ import io.airbyte.api.model.generated.WorkspaceIdRequestBody; import io.airbyte.commons.docker.DockerUtils; import io.airbyte.commons.json.Jsons; +import io.airbyte.commons.server.errors.IdNotFoundKnownException; +import io.airbyte.commons.server.errors.UnsupportedProtocolVersionException; +import io.airbyte.commons.server.scheduler.SynchronousJobMetadata; +import io.airbyte.commons.server.scheduler.SynchronousResponse; +import io.airbyte.commons.server.scheduler.SynchronousSchedulerClient; +import io.airbyte.commons.server.services.AirbyteGithubStore; import io.airbyte.commons.version.AirbyteProtocolVersionRange; import io.airbyte.commons.version.Version; import io.airbyte.config.ActorDefinitionResourceRequirements; @@ -44,12 +50,6 @@ import io.airbyte.config.persistence.ConfigNotFoundException; import io.airbyte.config.persistence.ConfigRepository; import io.airbyte.protocol.models.ConnectorSpecification; -import io.airbyte.server.errors.IdNotFoundKnownException; -import io.airbyte.server.errors.UnsupportedProtocolVersionException; -import io.airbyte.server.scheduler.SynchronousJobMetadata; -import io.airbyte.server.scheduler.SynchronousResponse; -import io.airbyte.server.scheduler.SynchronousSchedulerClient; -import io.airbyte.server.services.AirbyteGithubStore; import io.airbyte.validation.json.JsonValidationException; import java.io.IOException; import java.net.URI; diff --git a/airbyte-server/src/test/java/io/airbyte/server/handlers/DestinationHandlerTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/DestinationHandlerTest.java similarity index 98% rename from airbyte-server/src/test/java/io/airbyte/server/handlers/DestinationHandlerTest.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/DestinationHandlerTest.java index 728d60bbee48..9448aa5a3609 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/handlers/DestinationHandlerTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/DestinationHandlerTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -24,6 +24,9 @@ import io.airbyte.api.model.generated.DestinationUpdate; import io.airbyte.api.model.generated.WorkspaceIdRequestBody; import io.airbyte.commons.json.Jsons; +import io.airbyte.commons.server.converters.ConfigurationUpdate; +import io.airbyte.commons.server.helpers.ConnectorSpecificationHelpers; +import io.airbyte.commons.server.helpers.DestinationHelpers; import io.airbyte.config.DestinationConnection; import io.airbyte.config.StandardDestinationDefinition; import io.airbyte.config.persistence.ConfigNotFoundException; @@ -33,9 +36,6 @@ import io.airbyte.config.persistence.split_secrets.JsonSecretsProcessor; import io.airbyte.persistence.job.factory.OAuthConfigSupplier; import io.airbyte.protocol.models.ConnectorSpecification; -import io.airbyte.server.converters.ConfigurationUpdate; -import io.airbyte.server.helpers.ConnectorSpecificationHelpers; -import io.airbyte.server.helpers.DestinationHelpers; import io.airbyte.validation.json.JsonSchemaValidator; import io.airbyte.validation.json.JsonValidationException; import java.io.IOException; diff --git a/airbyte-server/src/test/java/io/airbyte/server/handlers/HealthCheckHandlerTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/HealthCheckHandlerTest.java similarity index 95% rename from airbyte-server/src/test/java/io/airbyte/server/handlers/HealthCheckHandlerTest.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/HealthCheckHandlerTest.java index 2d83a4bd02c9..7dedbe3142d2 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/handlers/HealthCheckHandlerTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/HealthCheckHandlerTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.mock; diff --git a/airbyte-server/src/test/java/io/airbyte/server/handlers/JobHistoryHandlerTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/JobHistoryHandlerTest.java similarity index 98% rename from airbyte-server/src/test/java/io/airbyte/server/handlers/JobHistoryHandlerTest.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/JobHistoryHandlerTest.java index 02bd7034f6f5..3ab2582afdb4 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/handlers/JobHistoryHandlerTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/JobHistoryHandlerTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -35,6 +35,12 @@ import io.airbyte.api.model.generated.SourceIdRequestBody; import io.airbyte.api.model.generated.SourceRead; import io.airbyte.commons.enums.Enums; +import io.airbyte.commons.server.converters.JobConverter; +import io.airbyte.commons.server.helpers.ConnectionHelpers; +import io.airbyte.commons.server.helpers.DestinationDefinitionHelpers; +import io.airbyte.commons.server.helpers.DestinationHelpers; +import io.airbyte.commons.server.helpers.SourceDefinitionHelpers; +import io.airbyte.commons.server.helpers.SourceHelpers; import io.airbyte.commons.version.AirbyteVersion; import io.airbyte.config.Configs.WorkerEnvironment; import io.airbyte.config.DestinationConnection; @@ -57,12 +63,6 @@ import io.airbyte.persistence.job.models.AttemptStatus; import io.airbyte.persistence.job.models.Job; import io.airbyte.persistence.job.models.JobStatus; -import io.airbyte.server.converters.JobConverter; -import io.airbyte.server.helpers.ConnectionHelpers; -import io.airbyte.server.helpers.DestinationDefinitionHelpers; -import io.airbyte.server.helpers.DestinationHelpers; -import io.airbyte.server.helpers.SourceDefinitionHelpers; -import io.airbyte.server.helpers.SourceHelpers; import io.airbyte.validation.json.JsonValidationException; import java.io.IOException; import java.net.URISyntaxException; diff --git a/airbyte-server/src/test/java/io/airbyte/server/handlers/LogsHandlerTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/LogsHandlerTest.java similarity index 97% rename from airbyte-server/src/test/java/io/airbyte/server/handlers/LogsHandlerTest.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/LogsHandlerTest.java index 098f05f1a4a3..3b730f199771 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/handlers/LogsHandlerTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/LogsHandlerTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.mock; diff --git a/airbyte-server/src/test/java/io/airbyte/server/handlers/OAuthHandlerTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/OAuthHandlerTest.java similarity index 99% rename from airbyte-server/src/test/java/io/airbyte/server/handlers/OAuthHandlerTest.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/OAuthHandlerTest.java index 08d9d2f95e53..57daf559363d 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/handlers/OAuthHandlerTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/OAuthHandlerTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.mock; diff --git a/airbyte-server/src/test/java/io/airbyte/server/handlers/OpenApiConfigHandlerTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/OpenApiConfigHandlerTest.java similarity index 92% rename from airbyte-server/src/test/java/io/airbyte/server/handlers/OpenApiConfigHandlerTest.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/OpenApiConfigHandlerTest.java index 5b7311433e9b..99dd0ccb4b4b 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/handlers/OpenApiConfigHandlerTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/OpenApiConfigHandlerTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import static org.junit.jupiter.api.Assertions.*; diff --git a/airbyte-server/src/test/java/io/airbyte/server/handlers/OperationsHandlerTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/OperationsHandlerTest.java similarity index 99% rename from airbyte-server/src/test/java/io/airbyte/server/handlers/OperationsHandlerTest.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/OperationsHandlerTest.java index e3e2d49542f1..97082336b16d 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/handlers/OperationsHandlerTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/OperationsHandlerTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; diff --git a/airbyte-server/src/test/java/io/airbyte/server/handlers/SchedulerHandlerTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/SchedulerHandlerTest.java similarity index 98% rename from airbyte-server/src/test/java/io/airbyte/server/handlers/SchedulerHandlerTest.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/SchedulerHandlerTest.java index dc8721c4cf55..b495ab19e1a1 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/handlers/SchedulerHandlerTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/SchedulerHandlerTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -52,6 +52,16 @@ import io.airbyte.commons.features.EnvVariableFeatureFlags; import io.airbyte.commons.json.Jsons; import io.airbyte.commons.lang.Exceptions; +import io.airbyte.commons.server.converters.ConfigurationUpdate; +import io.airbyte.commons.server.converters.JobConverter; +import io.airbyte.commons.server.errors.ValueConflictKnownException; +import io.airbyte.commons.server.handlers.helpers.CatalogConverter; +import io.airbyte.commons.server.helpers.DestinationHelpers; +import io.airbyte.commons.server.helpers.SourceHelpers; +import io.airbyte.commons.server.scheduler.EventRunner; +import io.airbyte.commons.server.scheduler.SynchronousJobMetadata; +import io.airbyte.commons.server.scheduler.SynchronousResponse; +import io.airbyte.commons.server.scheduler.SynchronousSchedulerClient; import io.airbyte.commons.temporal.ErrorCode; import io.airbyte.commons.temporal.TemporalClient.ManualOperationResult; import io.airbyte.commons.version.Version; @@ -76,16 +86,6 @@ import io.airbyte.protocol.models.Field; import io.airbyte.protocol.models.JsonSchemaType; import io.airbyte.protocol.models.StreamDescriptor; -import io.airbyte.server.converters.ConfigurationUpdate; -import io.airbyte.server.converters.JobConverter; -import io.airbyte.server.errors.ValueConflictKnownException; -import io.airbyte.server.handlers.helpers.CatalogConverter; -import io.airbyte.server.helpers.DestinationHelpers; -import io.airbyte.server.helpers.SourceHelpers; -import io.airbyte.server.scheduler.EventRunner; -import io.airbyte.server.scheduler.SynchronousJobMetadata; -import io.airbyte.server.scheduler.SynchronousResponse; -import io.airbyte.server.scheduler.SynchronousSchedulerClient; import io.airbyte.validation.json.JsonSchemaValidator; import io.airbyte.validation.json.JsonValidationException; import java.io.IOException; diff --git a/airbyte-server/src/test/java/io/airbyte/server/handlers/SourceDefinitionsHandlerTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/SourceDefinitionsHandlerTest.java similarity index 98% rename from airbyte-server/src/test/java/io/airbyte/server/handlers/SourceDefinitionsHandlerTest.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/SourceDefinitionsHandlerTest.java index 424ae0d49e3d..76c2c70dd036 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/handlers/SourceDefinitionsHandlerTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/SourceDefinitionsHandlerTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -33,6 +33,12 @@ import io.airbyte.api.model.generated.WorkspaceIdRequestBody; import io.airbyte.commons.docker.DockerUtils; import io.airbyte.commons.json.Jsons; +import io.airbyte.commons.server.errors.IdNotFoundKnownException; +import io.airbyte.commons.server.errors.UnsupportedProtocolVersionException; +import io.airbyte.commons.server.scheduler.SynchronousJobMetadata; +import io.airbyte.commons.server.scheduler.SynchronousResponse; +import io.airbyte.commons.server.scheduler.SynchronousSchedulerClient; +import io.airbyte.commons.server.services.AirbyteGithubStore; import io.airbyte.commons.version.AirbyteProtocolVersionRange; import io.airbyte.commons.version.Version; import io.airbyte.config.ActorDefinitionResourceRequirements; @@ -45,12 +51,6 @@ import io.airbyte.config.persistence.ConfigNotFoundException; import io.airbyte.config.persistence.ConfigRepository; import io.airbyte.protocol.models.ConnectorSpecification; -import io.airbyte.server.errors.IdNotFoundKnownException; -import io.airbyte.server.errors.UnsupportedProtocolVersionException; -import io.airbyte.server.scheduler.SynchronousJobMetadata; -import io.airbyte.server.scheduler.SynchronousResponse; -import io.airbyte.server.scheduler.SynchronousSchedulerClient; -import io.airbyte.server.services.AirbyteGithubStore; import io.airbyte.validation.json.JsonValidationException; import java.io.IOException; import java.net.URI; diff --git a/airbyte-server/src/test/java/io/airbyte/server/handlers/SourceHandlerTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/SourceHandlerTest.java similarity index 98% rename from airbyte-server/src/test/java/io/airbyte/server/handlers/SourceHandlerTest.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/SourceHandlerTest.java index 758bad37f909..ba3b053da7aa 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/handlers/SourceHandlerTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/SourceHandlerTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -27,6 +27,10 @@ import io.airbyte.api.model.generated.SourceUpdate; import io.airbyte.api.model.generated.WorkspaceIdRequestBody; import io.airbyte.commons.json.Jsons; +import io.airbyte.commons.server.converters.ConfigurationUpdate; +import io.airbyte.commons.server.helpers.ConnectionHelpers; +import io.airbyte.commons.server.helpers.ConnectorSpecificationHelpers; +import io.airbyte.commons.server.helpers.SourceHelpers; import io.airbyte.config.SourceConnection; import io.airbyte.config.StandardSourceDefinition; import io.airbyte.config.StandardSync; @@ -37,10 +41,6 @@ import io.airbyte.config.persistence.split_secrets.JsonSecretsProcessor; import io.airbyte.persistence.job.factory.OAuthConfigSupplier; import io.airbyte.protocol.models.ConnectorSpecification; -import io.airbyte.server.converters.ConfigurationUpdate; -import io.airbyte.server.helpers.ConnectionHelpers; -import io.airbyte.server.helpers.ConnectorSpecificationHelpers; -import io.airbyte.server.helpers.SourceHelpers; import io.airbyte.validation.json.JsonSchemaValidator; import io.airbyte.validation.json.JsonValidationException; import java.io.IOException; diff --git a/airbyte-server/src/test/java/io/airbyte/server/handlers/StateHandlerTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/StateHandlerTest.java similarity index 99% rename from airbyte-server/src/test/java/io/airbyte/server/handlers/StateHandlerTest.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/StateHandlerTest.java index 53cc95fc9027..f43633cc98af 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/handlers/StateHandlerTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/StateHandlerTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.mock; diff --git a/airbyte-server/src/test/java/io/airbyte/server/handlers/WebBackendCheckUpdatesHandlerTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/WebBackendCheckUpdatesHandlerTest.java similarity index 98% rename from airbyte-server/src/test/java/io/airbyte/server/handlers/WebBackendCheckUpdatesHandlerTest.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/WebBackendCheckUpdatesHandlerTest.java index 78ac5ee79b56..4c9e51f910cc 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/handlers/WebBackendCheckUpdatesHandlerTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/WebBackendCheckUpdatesHandlerTest.java @@ -2,17 +2,17 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import io.airbyte.api.model.generated.WebBackendCheckUpdatesRead; +import io.airbyte.commons.server.services.AirbyteGithubStore; import io.airbyte.config.StandardDestinationDefinition; import io.airbyte.config.StandardSourceDefinition; import io.airbyte.config.persistence.ConfigRepository; -import io.airbyte.server.services.AirbyteGithubStore; import java.io.IOException; import java.util.List; import java.util.Map; diff --git a/airbyte-server/src/test/java/io/airbyte/server/handlers/WebBackendConnectionsHandlerTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/WebBackendConnectionsHandlerTest.java similarity index 99% rename from airbyte-server/src/test/java/io/airbyte/server/handlers/WebBackendConnectionsHandlerTest.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/WebBackendConnectionsHandlerTest.java index 0103d8f0f5fd..0b126417d3e7 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/handlers/WebBackendConnectionsHandlerTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/WebBackendConnectionsHandlerTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -75,6 +75,13 @@ import io.airbyte.api.model.generated.WebBackendWorkspaceState; import io.airbyte.commons.enums.Enums; import io.airbyte.commons.json.Jsons; +import io.airbyte.commons.server.handlers.helpers.CatalogConverter; +import io.airbyte.commons.server.helpers.ConnectionHelpers; +import io.airbyte.commons.server.helpers.DestinationDefinitionHelpers; +import io.airbyte.commons.server.helpers.DestinationHelpers; +import io.airbyte.commons.server.helpers.SourceDefinitionHelpers; +import io.airbyte.commons.server.helpers.SourceHelpers; +import io.airbyte.commons.server.scheduler.EventRunner; import io.airbyte.commons.temporal.TemporalClient.ManualOperationResult; import io.airbyte.config.ActorCatalog; import io.airbyte.config.ActorCatalogFetchEvent; @@ -93,13 +100,6 @@ import io.airbyte.protocol.models.ConfiguredAirbyteCatalog; import io.airbyte.protocol.models.Field; import io.airbyte.protocol.models.JsonSchemaType; -import io.airbyte.server.handlers.helpers.CatalogConverter; -import io.airbyte.server.helpers.ConnectionHelpers; -import io.airbyte.server.helpers.DestinationDefinitionHelpers; -import io.airbyte.server.helpers.DestinationHelpers; -import io.airbyte.server.helpers.SourceDefinitionHelpers; -import io.airbyte.server.helpers.SourceHelpers; -import io.airbyte.server.scheduler.EventRunner; import io.airbyte.validation.json.JsonValidationException; import java.io.IOException; import java.lang.reflect.Method; diff --git a/airbyte-server/src/test/java/io/airbyte/server/handlers/WebBackendGeographiesHandlerTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/WebBackendGeographiesHandlerTest.java similarity index 96% rename from airbyte-server/src/test/java/io/airbyte/server/handlers/WebBackendGeographiesHandlerTest.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/WebBackendGeographiesHandlerTest.java index e4f014aa3c1d..f0c14e2e69ff 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/handlers/WebBackendGeographiesHandlerTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/WebBackendGeographiesHandlerTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import io.airbyte.api.model.generated.Geography; import io.airbyte.api.model.generated.WebBackendGeographiesListResult; diff --git a/airbyte-server/src/test/java/io/airbyte/server/handlers/WorkspacesHandlerTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/WorkspacesHandlerTest.java similarity index 99% rename from airbyte-server/src/test/java/io/airbyte/server/handlers/WorkspacesHandlerTest.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/WorkspacesHandlerTest.java index 4e604e12855d..c3c6a9441938 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/handlers/WorkspacesHandlerTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/WorkspacesHandlerTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers; +package io.airbyte.commons.server.handlers; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; @@ -34,6 +34,7 @@ import io.airbyte.api.model.generated.WorkspaceUpdate; import io.airbyte.api.model.generated.WorkspaceUpdateName; import io.airbyte.commons.json.Jsons; +import io.airbyte.commons.server.converters.NotificationConverter; import io.airbyte.config.Geography; import io.airbyte.config.Notification; import io.airbyte.config.Notification.NotificationType; @@ -43,7 +44,6 @@ import io.airbyte.config.persistence.ConfigRepository; import io.airbyte.config.persistence.SecretsRepositoryWriter; import io.airbyte.config.persistence.split_secrets.SecretPersistence; -import io.airbyte.server.converters.NotificationConverter; import io.airbyte.validation.json.JsonValidationException; import java.io.IOException; import java.util.Collections; diff --git a/airbyte-server/src/test/java/io/airbyte/server/handlers/helper/OAuthPathExtractorTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/helper/OAuthPathExtractorTest.java similarity index 93% rename from airbyte-server/src/test/java/io/airbyte/server/handlers/helper/OAuthPathExtractorTest.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/helper/OAuthPathExtractorTest.java index e7c7d95f8308..5a45c37b2af5 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/handlers/helper/OAuthPathExtractorTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/helper/OAuthPathExtractorTest.java @@ -2,11 +2,11 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.handlers.helper; +package io.airbyte.commons.server.handlers.helper; import com.fasterxml.jackson.databind.JsonNode; import io.airbyte.commons.json.Jsons; -import io.airbyte.server.handlers.helpers.OAuthPathExtractor; +import io.airbyte.commons.server.handlers.helpers.OAuthPathExtractor; import java.util.List; import java.util.Map; import org.assertj.core.api.Assertions; diff --git a/airbyte-server/src/test/java/io/airbyte/server/helpers/ConnectionHelpers.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/ConnectionHelpers.java similarity index 99% rename from airbyte-server/src/test/java/io/airbyte/server/helpers/ConnectionHelpers.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/ConnectionHelpers.java index 00afd4ff6a80..300079b72964 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/helpers/ConnectionHelpers.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/ConnectionHelpers.java @@ -2,9 +2,9 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.helpers; +package io.airbyte.commons.server.helpers; -import static io.airbyte.server.handlers.helpers.CatalogConverter.toApi; +import static io.airbyte.commons.server.handlers.helpers.CatalogConverter.toApi; import com.fasterxml.jackson.databind.JsonNode; import com.google.common.collect.Lists; @@ -30,6 +30,7 @@ import io.airbyte.api.model.generated.SyncMode; import io.airbyte.api.model.generated.WebBackendConnectionListItem; import io.airbyte.commons.enums.Enums; +import io.airbyte.commons.server.converters.ApiPojoConverters; import io.airbyte.commons.text.Names; import io.airbyte.config.BasicSchedule; import io.airbyte.config.JobSyncConfig.NamespaceDefinitionType; @@ -45,7 +46,6 @@ import io.airbyte.protocol.models.Field; import io.airbyte.protocol.models.JsonSchemaType; import io.airbyte.protocol.models.StreamDescriptor; -import io.airbyte.server.converters.ApiPojoConverters; import java.util.ArrayList; import java.util.Collections; import java.util.List; diff --git a/airbyte-server/src/test/java/io/airbyte/server/helpers/ConnectorSpecificationHelpers.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/ConnectorSpecificationHelpers.java similarity index 84% rename from airbyte-server/src/test/java/io/airbyte/server/helpers/ConnectorSpecificationHelpers.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/ConnectorSpecificationHelpers.java index dd843b96cbdb..19b77c3d4269 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/helpers/ConnectorSpecificationHelpers.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/ConnectorSpecificationHelpers.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.helpers; +package io.airbyte.commons.server.helpers; import io.airbyte.commons.json.Jsons; import io.airbyte.protocol.models.ConnectorSpecification; @@ -17,7 +17,7 @@ public class ConnectorSpecificationHelpers { public static ConnectorSpecification generateConnectorSpecification() throws IOException { - final Path path = Paths.get("../airbyte-server/src/test/resources/json/TestSpecification.json"); + final Path path = Paths.get("../airbyte-commons-server/src/test/resources/json/TestSpecification.json"); try { return new ConnectorSpecification() diff --git a/airbyte-server/src/test/java/io/airbyte/server/helpers/DestinationDefinitionHelpers.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/DestinationDefinitionHelpers.java similarity index 92% rename from airbyte-server/src/test/java/io/airbyte/server/helpers/DestinationDefinitionHelpers.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/DestinationDefinitionHelpers.java index 24ee7a0d452c..b1c776a17d7e 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/helpers/DestinationDefinitionHelpers.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/DestinationDefinitionHelpers.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.helpers; +package io.airbyte.commons.server.helpers; import io.airbyte.config.StandardDestinationDefinition; import java.util.UUID; diff --git a/airbyte-server/src/test/java/io/airbyte/server/helpers/DestinationHelpers.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/DestinationHelpers.java similarity index 92% rename from airbyte-server/src/test/java/io/airbyte/server/helpers/DestinationHelpers.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/DestinationHelpers.java index a3eb07edee60..9c43b33bde4f 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/helpers/DestinationHelpers.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/DestinationHelpers.java @@ -2,14 +2,14 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.helpers; +package io.airbyte.commons.server.helpers; import com.fasterxml.jackson.databind.JsonNode; import io.airbyte.api.model.generated.DestinationRead; import io.airbyte.commons.json.Jsons; +import io.airbyte.commons.server.handlers.DestinationDefinitionsHandler; import io.airbyte.config.DestinationConnection; import io.airbyte.config.StandardDestinationDefinition; -import io.airbyte.server.handlers.DestinationDefinitionsHandler; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; @@ -20,7 +20,7 @@ public class DestinationHelpers { public static JsonNode getTestDestinationJson() throws IOException { final Path path = - Paths.get("../airbyte-server/src/test/resources/json/TestImplementation.json"); + Paths.get("../airbyte-commons-server/src/test/resources/json/TestImplementation.json"); return Jsons.deserialize(Files.readString(path)); } diff --git a/airbyte-server/src/test/java/io/airbyte/server/helpers/SourceDefinitionHelpers.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/SourceDefinitionHelpers.java similarity index 92% rename from airbyte-server/src/test/java/io/airbyte/server/helpers/SourceDefinitionHelpers.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/SourceDefinitionHelpers.java index 1c592baa4295..fd5a0bb8d26c 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/helpers/SourceDefinitionHelpers.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/SourceDefinitionHelpers.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.helpers; +package io.airbyte.commons.server.helpers; import io.airbyte.config.StandardSourceDefinition; import java.util.UUID; diff --git a/airbyte-server/src/test/java/io/airbyte/server/helpers/SourceHelpers.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/SourceHelpers.java similarity index 91% rename from airbyte-server/src/test/java/io/airbyte/server/helpers/SourceHelpers.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/SourceHelpers.java index 975256c751a7..699aff75f7f4 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/helpers/SourceHelpers.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/SourceHelpers.java @@ -2,14 +2,14 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.helpers; +package io.airbyte.commons.server.helpers; import com.fasterxml.jackson.databind.JsonNode; import io.airbyte.api.model.generated.SourceRead; import io.airbyte.commons.json.Jsons; +import io.airbyte.commons.server.handlers.SourceDefinitionsHandler; import io.airbyte.config.SourceConnection; import io.airbyte.config.StandardSourceDefinition; -import io.airbyte.server.handlers.SourceDefinitionsHandler; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; @@ -46,7 +46,7 @@ public static SourceConnection generateSource(final UUID sourceDefinitionId, fin } public static JsonNode getTestImplementationJson() throws IOException { - final Path path = Paths.get("../airbyte-server/src/test/resources/json/TestImplementation.json"); + final Path path = Paths.get("../airbyte-commons-server/src/test/resources/json/TestImplementation.json"); return Jsons.deserialize(Files.readString(path)); } diff --git a/airbyte-server/src/test/java/io/airbyte/server/scheduler/DefaultSynchronousSchedulerClientTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/scheduler/DefaultSynchronousSchedulerClientTest.java similarity index 99% rename from airbyte-server/src/test/java/io/airbyte/server/scheduler/DefaultSynchronousSchedulerClientTest.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/scheduler/DefaultSynchronousSchedulerClientTest.java index 9cc3761c224c..bd9bbdc92764 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/scheduler/DefaultSynchronousSchedulerClientTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/scheduler/DefaultSynchronousSchedulerClientTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.scheduler; +package io.airbyte.commons.server.scheduler; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; diff --git a/airbyte-server/src/test/java/io/airbyte/server/services/AirbyteGithubStoreTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/services/AirbyteGithubStoreTest.java similarity index 99% rename from airbyte-server/src/test/java/io/airbyte/server/services/AirbyteGithubStoreTest.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/services/AirbyteGithubStoreTest.java index 6f483ffdbdfe..80dfff70b701 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/services/AirbyteGithubStoreTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/services/AirbyteGithubStoreTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.services; +package io.airbyte.commons.server.services; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; diff --git a/airbyte-server/src/test/resources/icons/test-destination.svg b/airbyte-commons-server/src/test/resources/icons/test-destination.svg similarity index 100% rename from airbyte-server/src/test/resources/icons/test-destination.svg rename to airbyte-commons-server/src/test/resources/icons/test-destination.svg diff --git a/airbyte-server/src/test/resources/icons/test-source.svg b/airbyte-commons-server/src/test/resources/icons/test-source.svg similarity index 100% rename from airbyte-server/src/test/resources/icons/test-source.svg rename to airbyte-commons-server/src/test/resources/icons/test-source.svg diff --git a/airbyte-server/src/test/resources/json/TestImplementation.json b/airbyte-commons-server/src/test/resources/json/TestImplementation.json similarity index 100% rename from airbyte-server/src/test/resources/json/TestImplementation.json rename to airbyte-commons-server/src/test/resources/json/TestImplementation.json diff --git a/airbyte-server/src/test/resources/json/TestSpecification.json b/airbyte-commons-server/src/test/resources/json/TestSpecification.json similarity index 100% rename from airbyte-server/src/test/resources/json/TestSpecification.json rename to airbyte-commons-server/src/test/resources/json/TestSpecification.json diff --git a/airbyte-server/src/test/resources/migration/03a4c904-c91d-447f-ab59-27a43b52c2fd.gz b/airbyte-commons-server/src/test/resources/migration/03a4c904-c91d-447f-ab59-27a43b52c2fd.gz similarity index 100% rename from airbyte-server/src/test/resources/migration/03a4c904-c91d-447f-ab59-27a43b52c2fd.gz rename to airbyte-commons-server/src/test/resources/migration/03a4c904-c91d-447f-ab59-27a43b52c2fd.gz diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/DESTINATION_CONNECTION/4e00862d-5484-4f50-9860-f3bbb4317397.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/DESTINATION_CONNECTION/4e00862d-5484-4f50-9860-f3bbb4317397.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/DESTINATION_CONNECTION/4e00862d-5484-4f50-9860-f3bbb4317397.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/DESTINATION_CONNECTION/4e00862d-5484-4f50-9860-f3bbb4317397.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/DESTINATION_CONNECTION/5434615d-a3b7-4351-bc6b-a9a695555a30.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/DESTINATION_CONNECTION/5434615d-a3b7-4351-bc6b-a9a695555a30.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/DESTINATION_CONNECTION/5434615d-a3b7-4351-bc6b-a9a695555a30.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/DESTINATION_CONNECTION/5434615d-a3b7-4351-bc6b-a9a695555a30.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/SOURCE_CONNECTION/28ffee2b-372a-4f72-9b95-8ed56a8b99c5.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/SOURCE_CONNECTION/28ffee2b-372a-4f72-9b95-8ed56a8b99c5.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/SOURCE_CONNECTION/28ffee2b-372a-4f72-9b95-8ed56a8b99c5.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/SOURCE_CONNECTION/28ffee2b-372a-4f72-9b95-8ed56a8b99c5.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/SOURCE_CONNECTION/e48cae1a-1f5c-42cc-9ec1-a44ff7fb4969.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/SOURCE_CONNECTION/e48cae1a-1f5c-42cc-9ec1-a44ff7fb4969.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/SOURCE_CONNECTION/e48cae1a-1f5c-42cc-9ec1-a44ff7fb4969.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/SOURCE_CONNECTION/e48cae1a-1f5c-42cc-9ec1-a44ff7fb4969.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/22f6c74f-5699-40ff-833c-4a879ea40133.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/22f6c74f-5699-40ff-833c-4a879ea40133.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/22f6c74f-5699-40ff-833c-4a879ea40133.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/22f6c74f-5699-40ff-833c-4a879ea40133.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/25c5221d-dce2-4163-ade9-739ef790f503.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/25c5221d-dce2-4163-ade9-739ef790f503.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/25c5221d-dce2-4163-ade9-739ef790f503.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/25c5221d-dce2-4163-ade9-739ef790f503.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/424892c4-daac-4491-b35d-c6688ba547ba.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/424892c4-daac-4491-b35d-c6688ba547ba.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/424892c4-daac-4491-b35d-c6688ba547ba.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/424892c4-daac-4491-b35d-c6688ba547ba.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/8be1cf83-fde1-477f-a4ad-318d23c9f3c6.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/8be1cf83-fde1-477f-a4ad-318d23c9f3c6.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/8be1cf83-fde1-477f-a4ad-318d23c9f3c6.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/8be1cf83-fde1-477f-a4ad-318d23c9f3c6.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/a625d593-bba5-4a1c-a53d-2d246268a816.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/a625d593-bba5-4a1c-a53d-2d246268a816.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/a625d593-bba5-4a1c-a53d-2d246268a816.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/a625d593-bba5-4a1c-a53d-2d246268a816.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/af7c921e-5892-4ff2-b6c1-4a5ab258fb7e.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/af7c921e-5892-4ff2-b6c1-4a5ab258fb7e.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/af7c921e-5892-4ff2-b6c1-4a5ab258fb7e.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/af7c921e-5892-4ff2-b6c1-4a5ab258fb7e.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/f7a7d195-377f-cf5b-70a5-be6b819019dc.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/f7a7d195-377f-cf5b-70a5-be6b819019dc.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/f7a7d195-377f-cf5b-70a5-be6b819019dc.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_DESTINATION_DEFINITION/f7a7d195-377f-cf5b-70a5-be6b819019dc.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/00405b19-9768-4e0c-b1ae-9fc2ee2b2a8c.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/00405b19-9768-4e0c-b1ae-9fc2ee2b2a8c.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/00405b19-9768-4e0c-b1ae-9fc2ee2b2a8c.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/00405b19-9768-4e0c-b1ae-9fc2ee2b2a8c.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/2470e835-feaf-4db6-96f3-70fd645acc77.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/2470e835-feaf-4db6-96f3-70fd645acc77.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/2470e835-feaf-4db6-96f3-70fd645acc77.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/2470e835-feaf-4db6-96f3-70fd645acc77.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/2af123bf-0aaf-4e0d-9784-cb497f23741a.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/2af123bf-0aaf-4e0d-9784-cb497f23741a.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/2af123bf-0aaf-4e0d-9784-cb497f23741a.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/2af123bf-0aaf-4e0d-9784-cb497f23741a.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/396e4ca3-8a97-4b85-aa4e-c9d8c2d5f992.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/396e4ca3-8a97-4b85-aa4e-c9d8c2d5f992.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/396e4ca3-8a97-4b85-aa4e-c9d8c2d5f992.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/396e4ca3-8a97-4b85-aa4e-c9d8c2d5f992.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/41375467-61ae-4204-8e38-e2b8b7365f23.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/41375467-61ae-4204-8e38-e2b8b7365f23.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/41375467-61ae-4204-8e38-e2b8b7365f23.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/41375467-61ae-4204-8e38-e2b8b7365f23.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/435bb9a5-7887-4809-aa58-28c27df0d7ad.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/435bb9a5-7887-4809-aa58-28c27df0d7ad.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/435bb9a5-7887-4809-aa58-28c27df0d7ad.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/435bb9a5-7887-4809-aa58-28c27df0d7ad.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/445831eb-78db-4b1f-8f1f-0d96ad8739e2.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/445831eb-78db-4b1f-8f1f-0d96ad8739e2.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/445831eb-78db-4b1f-8f1f-0d96ad8739e2.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/445831eb-78db-4b1f-8f1f-0d96ad8739e2.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/4eb22946-2a79-4d20-a3e6-effd234613c3.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/4eb22946-2a79-4d20-a3e6-effd234613c3.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/4eb22946-2a79-4d20-a3e6-effd234613c3.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/4eb22946-2a79-4d20-a3e6-effd234613c3.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/57eb1576-8f52-463d-beb6-2e107cdf571d.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/57eb1576-8f52-463d-beb6-2e107cdf571d.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/57eb1576-8f52-463d-beb6-2e107cdf571d.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/57eb1576-8f52-463d-beb6-2e107cdf571d.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/59f1e50a-331f-4f09-b3e8-2e8d4d355f44.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/59f1e50a-331f-4f09-b3e8-2e8d4d355f44.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/59f1e50a-331f-4f09-b3e8-2e8d4d355f44.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/59f1e50a-331f-4f09-b3e8-2e8d4d355f44.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/68e63de2-bb83-4c7e-93fa-a8a9051e3993.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/68e63de2-bb83-4c7e-93fa-a8a9051e3993.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/68e63de2-bb83-4c7e-93fa-a8a9051e3993.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/68e63de2-bb83-4c7e-93fa-a8a9051e3993.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/71607ba1-c0ac-4799-8049-7f4b90dd50f7.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/71607ba1-c0ac-4799-8049-7f4b90dd50f7.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/71607ba1-c0ac-4799-8049-7f4b90dd50f7.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/71607ba1-c0ac-4799-8049-7f4b90dd50f7.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/778daa7c-feaf-4db6-96f3-70fd645acc77.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/778daa7c-feaf-4db6-96f3-70fd645acc77.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/778daa7c-feaf-4db6-96f3-70fd645acc77.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/778daa7c-feaf-4db6-96f3-70fd645acc77.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/859e501d-2b67-471f-91bb-1c801414d28f.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/859e501d-2b67-471f-91bb-1c801414d28f.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/859e501d-2b67-471f-91bb-1c801414d28f.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/859e501d-2b67-471f-91bb-1c801414d28f.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/9e0556f4-69df-4522-a3fb-03264d36b348.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/9e0556f4-69df-4522-a3fb-03264d36b348.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/9e0556f4-69df-4522-a3fb-03264d36b348.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/9e0556f4-69df-4522-a3fb-03264d36b348.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/9fed261d-d107-47fd-8c8b-323023db6e20.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/9fed261d-d107-47fd-8c8b-323023db6e20.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/9fed261d-d107-47fd-8c8b-323023db6e20.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/9fed261d-d107-47fd-8c8b-323023db6e20.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/aea2fd0d-377d-465e-86c0-4fdc4f688e51.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/aea2fd0d-377d-465e-86c0-4fdc4f688e51.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/aea2fd0d-377d-465e-86c0-4fdc4f688e51.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/aea2fd0d-377d-465e-86c0-4fdc4f688e51.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/b03a9f3e-22a5-11eb-adc1-0242ac120002.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/b03a9f3e-22a5-11eb-adc1-0242ac120002.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/b03a9f3e-22a5-11eb-adc1-0242ac120002.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/b03a9f3e-22a5-11eb-adc1-0242ac120002.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/b1892b11-788d-44bd-b9ec-3a436f7b54ce.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/b1892b11-788d-44bd-b9ec-3a436f7b54ce.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/b1892b11-788d-44bd-b9ec-3a436f7b54ce.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/b1892b11-788d-44bd-b9ec-3a436f7b54ce.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/b5ea17b1-f170-46dc-bc31-cc744ca984c1.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/b5ea17b1-f170-46dc-bc31-cc744ca984c1.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/b5ea17b1-f170-46dc-bc31-cc744ca984c1.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/b5ea17b1-f170-46dc-bc31-cc744ca984c1.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/cd42861b-01fc-4658-a8ab-5d11d0510f01.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/cd42861b-01fc-4658-a8ab-5d11d0510f01.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/cd42861b-01fc-4658-a8ab-5d11d0510f01.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/cd42861b-01fc-4658-a8ab-5d11d0510f01.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/d2147be5-fa36-4936-977e-f031affa5895.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/d2147be5-fa36-4936-977e-f031affa5895.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/d2147be5-fa36-4936-977e-f031affa5895.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/d2147be5-fa36-4936-977e-f031affa5895.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/d29764f8-80d7-4dd7-acbe-1a42005ee5aa.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/d29764f8-80d7-4dd7-acbe-1a42005ee5aa.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/d29764f8-80d7-4dd7-acbe-1a42005ee5aa.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/d29764f8-80d7-4dd7-acbe-1a42005ee5aa.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/d8313939-3782-41b0-be29-b3ca20d8dd3a.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/d8313939-3782-41b0-be29-b3ca20d8dd3a.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/d8313939-3782-41b0-be29-b3ca20d8dd3a.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/d8313939-3782-41b0-be29-b3ca20d8dd3a.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/decd338e-5647-4c0b-adf4-da0e75f5a750.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/decd338e-5647-4c0b-adf4-da0e75f5a750.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/decd338e-5647-4c0b-adf4-da0e75f5a750.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/decd338e-5647-4c0b-adf4-da0e75f5a750.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/e094cb9a-26de-4645-8761-65c0c425d1de.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/e094cb9a-26de-4645-8761-65c0c425d1de.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/e094cb9a-26de-4645-8761-65c0c425d1de.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/e094cb9a-26de-4645-8761-65c0c425d1de.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/e7778cfc-e97c-4458-9ecb-b4f2bba8946c.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/e7778cfc-e97c-4458-9ecb-b4f2bba8946c.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/e7778cfc-e97c-4458-9ecb-b4f2bba8946c.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/e7778cfc-e97c-4458-9ecb-b4f2bba8946c.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/e87ffa8e-a3b5-f69c-9076-6011339de1f6.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/e87ffa8e-a3b5-f69c-9076-6011339de1f6.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/e87ffa8e-a3b5-f69c-9076-6011339de1f6.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/e87ffa8e-a3b5-f69c-9076-6011339de1f6.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/eaf50f04-21dd-4620-913b-2a83f5635227.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/eaf50f04-21dd-4620-913b-2a83f5635227.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/eaf50f04-21dd-4620-913b-2a83f5635227.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/eaf50f04-21dd-4620-913b-2a83f5635227.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/ec4b9503-13cb-48ab-a4ab-6ade4be46567.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/ec4b9503-13cb-48ab-a4ab-6ade4be46567.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/ec4b9503-13cb-48ab-a4ab-6ade4be46567.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/ec4b9503-13cb-48ab-a4ab-6ade4be46567.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/ed799e2b-2158-4c66-8da4-b40fe63bc72a.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/ed799e2b-2158-4c66-8da4-b40fe63bc72a.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/ed799e2b-2158-4c66-8da4-b40fe63bc72a.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/ed799e2b-2158-4c66-8da4-b40fe63bc72a.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/ef69ef6e-aa7f-4af1-a01d-ef775033524e.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/ef69ef6e-aa7f-4af1-a01d-ef775033524e.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/ef69ef6e-aa7f-4af1-a01d-ef775033524e.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/ef69ef6e-aa7f-4af1-a01d-ef775033524e.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/fbb5fbe2-16ad-4cf4-af7d-ff9d9c316c87.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/fbb5fbe2-16ad-4cf4-af7d-ff9d9c316c87.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/fbb5fbe2-16ad-4cf4-af7d-ff9d9c316c87.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SOURCE_DEFINITION/fbb5fbe2-16ad-4cf4-af7d-ff9d9c316c87.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SYNC/49dae3f0-158b-4737-b6e4-0eed77d4b74e.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SYNC/49dae3f0-158b-4737-b6e4-0eed77d4b74e.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SYNC/49dae3f0-158b-4737-b6e4-0eed77d4b74e.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SYNC/49dae3f0-158b-4737-b6e4-0eed77d4b74e.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SYNC/a294256f-1abe-4837-925f-91602c7207b4.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SYNC/a294256f-1abe-4837-925f-91602c7207b4.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SYNC/a294256f-1abe-4837-925f-91602c7207b4.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SYNC/a294256f-1abe-4837-925f-91602c7207b4.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SYNC_SCHEDULE/49dae3f0-158b-4737-b6e4-0eed77d4b74e.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SYNC_SCHEDULE/49dae3f0-158b-4737-b6e4-0eed77d4b74e.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SYNC_SCHEDULE/49dae3f0-158b-4737-b6e4-0eed77d4b74e.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SYNC_SCHEDULE/49dae3f0-158b-4737-b6e4-0eed77d4b74e.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SYNC_SCHEDULE/a294256f-1abe-4837-925f-91602c7207b4.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SYNC_SCHEDULE/a294256f-1abe-4837-925f-91602c7207b4.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_SYNC_SCHEDULE/a294256f-1abe-4837-925f-91602c7207b4.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_SYNC_SCHEDULE/a294256f-1abe-4837-925f-91602c7207b4.json diff --git a/airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_WORKSPACE/5ae6b09b-fdec-41af-aaf7-7d94cfc33ef6.json b/airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_WORKSPACE/5ae6b09b-fdec-41af-aaf7-7d94cfc33ef6.json similarity index 100% rename from airbyte-server/src/test/resources/migration/dummy_data/config/STANDARD_WORKSPACE/5ae6b09b-fdec-41af-aaf7-7d94cfc33ef6.json rename to airbyte-commons-server/src/test/resources/migration/dummy_data/config/STANDARD_WORKSPACE/5ae6b09b-fdec-41af-aaf7-7d94cfc33ef6.json diff --git a/airbyte-server/src/test/resources/migration/schema.sql b/airbyte-commons-server/src/test/resources/migration/schema.sql similarity index 100% rename from airbyte-server/src/test/resources/migration/schema.sql rename to airbyte-commons-server/src/test/resources/migration/schema.sql diff --git a/airbyte-commons/build.gradle b/airbyte-commons/build.gradle index f09f252094b6..3c4c0f9e1961 100644 --- a/airbyte-commons/build.gradle +++ b/airbyte-commons/build.gradle @@ -3,43 +3,10 @@ plugins { } dependencies { - implementation project(':airbyte-analytics') - implementation project(':airbyte-api') - implementation project(':airbyte-commons-docker') - implementation project(':airbyte-commons-temporal') - implementation project(':airbyte-commons-worker') - implementation project(':airbyte-config:init') - implementation project(':airbyte-config:config-models') - implementation project(':airbyte-config:config-persistence') - implementation project(':airbyte-config:specs') - implementation project(':airbyte-metrics:metrics-lib') - implementation project(':airbyte-db:db-lib') - implementation project(":airbyte-json-validation") - implementation project(':airbyte-notification') - implementation project(':airbyte-oauth') - implementation project(':airbyte-protocol:protocol-models') - implementation project(':airbyte-persistence:job-persistence') + // Dependencies for this module should be specified in the top-level build.gradle. See readme for more explanation. - implementation 'com.github.slugify:slugify:2.4' - implementation 'commons-cli:commons-cli:1.4' - implementation libs.temporal.sdk - implementation 'org.apache.cxf:cxf-core:3.4.2' - implementation 'org.eclipse.jetty:jetty-server:9.4.31.v20200723' - implementation 'org.eclipse.jetty:jetty-servlet:9.4.31.v20200723' - implementation 'org.glassfish.jaxb:jaxb-runtime:3.0.2' - implementation 'org.glassfish.jersey.containers:jersey-container-servlet' - implementation 'org.glassfish.jersey.inject:jersey-hk2' - implementation 'org.glassfish.jersey.media:jersey-media-json-jackson' - implementation 'org.glassfish.jersey.ext:jersey-bean-validation' - implementation 'org.quartz-scheduler:quartz:2.3.2' - implementation 'io.sentry:sentry:6.3.1' - implementation 'io.swagger:swagger-annotations:1.6.2' - - testImplementation project(':airbyte-test-utils') - testImplementation libs.postgresql - testImplementation libs.platform.testcontainers.postgresql - testImplementation 'com.squareup.okhttp3:mockwebserver:4.9.1' - testImplementation 'org.mockito:mockito-inline:4.7.0' + // this dependency is an exception to the above rule because it is only used INTERNALLY to the commons library. + implementation 'com.jayway.jsonpath:json-path:2.7.0' } Task publishArtifactsTask = getPublishArtifactsTask("$rootProject.ext.version", project) diff --git a/airbyte-server/build.gradle b/airbyte-server/build.gradle index 19d391456bcd..c75ccaf1add0 100644 --- a/airbyte-server/build.gradle +++ b/airbyte-server/build.gradle @@ -35,6 +35,7 @@ dependencies { implementation project(':airbyte-api') implementation project(':airbyte-commons-docker') implementation project(':airbyte-commons-temporal') + implementation project(':airbyte-commons-server') implementation project(':airbyte-commons-worker') implementation project(':airbyte-config:init') implementation project(':airbyte-config:config-models') diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/IdNotFoundExceptionMapper.java b/airbyte-server/src/main/java/io/airbyte/commons/server/errors/IdNotFoundExceptionMapper.java similarity index 96% rename from airbyte-server/src/main/java/io/airbyte/server/errors/IdNotFoundExceptionMapper.java rename to airbyte-server/src/main/java/io/airbyte/commons/server/errors/IdNotFoundExceptionMapper.java index 4cd9b709cf04..0dfc234bee28 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/IdNotFoundExceptionMapper.java +++ b/airbyte-server/src/main/java/io/airbyte/commons/server/errors/IdNotFoundExceptionMapper.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.errors; +package io.airbyte.commons.server.errors; import io.micronaut.context.annotation.Requires; import io.micronaut.http.HttpRequest; diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidInputExceptionHandler.java b/airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidInputExceptionHandler.java similarity index 98% rename from airbyte-server/src/main/java/io/airbyte/server/errors/InvalidInputExceptionHandler.java rename to airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidInputExceptionHandler.java index 6cdc923e3ebf..0acf0876a496 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidInputExceptionHandler.java +++ b/airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidInputExceptionHandler.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.errors; +package io.airbyte.commons.server.errors; import io.airbyte.api.model.generated.InvalidInputExceptionInfo; import io.airbyte.api.model.generated.InvalidInputProperty; diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidInputExceptionMapper.java b/airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidInputExceptionMapper.java similarity index 94% rename from airbyte-server/src/main/java/io/airbyte/server/errors/InvalidInputExceptionMapper.java rename to airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidInputExceptionMapper.java index 4fe9b202265c..70ce1201d773 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidInputExceptionMapper.java +++ b/airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidInputExceptionMapper.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.errors; +package io.airbyte.commons.server.errors; import io.airbyte.commons.json.Jsons; import javax.validation.ConstraintViolationException; diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonExceptionHandler.java b/airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonExceptionHandler.java similarity index 96% rename from airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonExceptionHandler.java rename to airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonExceptionHandler.java index ee7a3e57a2e9..b64c4d18a15b 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonExceptionHandler.java +++ b/airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonExceptionHandler.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.errors; +package io.airbyte.commons.server.errors; import com.fasterxml.jackson.core.JsonParseException; import io.micronaut.context.annotation.Requires; diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonExceptionMapper.java b/airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonExceptionMapper.java similarity index 93% rename from airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonExceptionMapper.java rename to airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonExceptionMapper.java index c126f1299325..a073c369aca5 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonExceptionMapper.java +++ b/airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonExceptionMapper.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.errors; +package io.airbyte.commons.server.errors; import com.fasterxml.jackson.core.JsonParseException; import javax.ws.rs.core.Response; diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonInputExceptionHandler.java b/airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonInputExceptionHandler.java similarity index 96% rename from airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonInputExceptionHandler.java rename to airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonInputExceptionHandler.java index fe5f7abaa4b8..55b74cda4916 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonInputExceptionHandler.java +++ b/airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonInputExceptionHandler.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.errors; +package io.airbyte.commons.server.errors; import com.fasterxml.jackson.databind.JsonMappingException; import io.micronaut.context.annotation.Requires; diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonInputExceptionMapper.java b/airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonInputExceptionMapper.java similarity index 94% rename from airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonInputExceptionMapper.java rename to airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonInputExceptionMapper.java index 90700f771782..d504333c4f0e 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonInputExceptionMapper.java +++ b/airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonInputExceptionMapper.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.errors; +package io.airbyte.commons.server.errors; import com.fasterxml.jackson.databind.JsonMappingException; import io.airbyte.commons.json.Jsons; diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/KnownExceptionHandler.java b/airbyte-server/src/main/java/io/airbyte/commons/server/errors/KnownExceptionHandler.java similarity index 95% rename from airbyte-server/src/main/java/io/airbyte/server/errors/KnownExceptionHandler.java rename to airbyte-server/src/main/java/io/airbyte/commons/server/errors/KnownExceptionHandler.java index 4b928ded5926..6f487c99bef3 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/KnownExceptionHandler.java +++ b/airbyte-server/src/main/java/io/airbyte/commons/server/errors/KnownExceptionHandler.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.errors; +package io.airbyte.commons.server.errors; import io.airbyte.commons.json.Jsons; import io.micronaut.context.annotation.Requires; diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/KnownExceptionMapper.java b/airbyte-server/src/main/java/io/airbyte/commons/server/errors/KnownExceptionMapper.java similarity index 95% rename from airbyte-server/src/main/java/io/airbyte/server/errors/KnownExceptionMapper.java rename to airbyte-server/src/main/java/io/airbyte/commons/server/errors/KnownExceptionMapper.java index 9d81a3fc7174..5ead770ad91c 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/KnownExceptionMapper.java +++ b/airbyte-server/src/main/java/io/airbyte/commons/server/errors/KnownExceptionMapper.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.errors; +package io.airbyte.commons.server.errors; import io.airbyte.commons.json.Jsons; import io.micronaut.context.annotation.Requires; diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/NotFoundExceptionHandler.java b/airbyte-server/src/main/java/io/airbyte/commons/server/errors/NotFoundExceptionHandler.java similarity index 96% rename from airbyte-server/src/main/java/io/airbyte/server/errors/NotFoundExceptionHandler.java rename to airbyte-server/src/main/java/io/airbyte/commons/server/errors/NotFoundExceptionHandler.java index 86d83a33bdb1..8de9647cabe0 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/NotFoundExceptionHandler.java +++ b/airbyte-server/src/main/java/io/airbyte/commons/server/errors/NotFoundExceptionHandler.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.errors; +package io.airbyte.commons.server.errors; import io.micronaut.context.annotation.Requires; import io.micronaut.http.HttpRequest; diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/NotFoundExceptionMapper.java b/airbyte-server/src/main/java/io/airbyte/commons/server/errors/NotFoundExceptionMapper.java similarity index 96% rename from airbyte-server/src/main/java/io/airbyte/server/errors/NotFoundExceptionMapper.java rename to airbyte-server/src/main/java/io/airbyte/commons/server/errors/NotFoundExceptionMapper.java index 0317cdf952cb..93a430472a6b 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/NotFoundExceptionMapper.java +++ b/airbyte-server/src/main/java/io/airbyte/commons/server/errors/NotFoundExceptionMapper.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.errors; +package io.airbyte.commons.server.errors; import io.airbyte.commons.json.Jsons; import javax.ws.rs.NotFoundException; diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/UncaughtExceptionHandler.java b/airbyte-server/src/main/java/io/airbyte/commons/server/errors/UncaughtExceptionHandler.java similarity index 96% rename from airbyte-server/src/main/java/io/airbyte/server/errors/UncaughtExceptionHandler.java rename to airbyte-server/src/main/java/io/airbyte/commons/server/errors/UncaughtExceptionHandler.java index afaf26bd4842..33ddf10dd20a 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/UncaughtExceptionHandler.java +++ b/airbyte-server/src/main/java/io/airbyte/commons/server/errors/UncaughtExceptionHandler.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.errors; +package io.airbyte.commons.server.errors; import io.micronaut.context.annotation.Requires; import io.micronaut.http.HttpRequest; diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/UncaughtExceptionMapper.java b/airbyte-server/src/main/java/io/airbyte/commons/server/errors/UncaughtExceptionMapper.java similarity index 95% rename from airbyte-server/src/main/java/io/airbyte/server/errors/UncaughtExceptionMapper.java rename to airbyte-server/src/main/java/io/airbyte/commons/server/errors/UncaughtExceptionMapper.java index 3aac5522570e..8057734d660a 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/UncaughtExceptionMapper.java +++ b/airbyte-server/src/main/java/io/airbyte/commons/server/errors/UncaughtExceptionMapper.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.errors; +package io.airbyte.commons.server.errors; import io.airbyte.api.model.generated.KnownExceptionInfo; import io.airbyte.commons.json.Jsons; diff --git a/airbyte-server/src/main/java/io/airbyte/server/ServerApp.java b/airbyte-server/src/main/java/io/airbyte/server/ServerApp.java index 16f3405d07e5..5731bf7d491b 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/ServerApp.java +++ b/airbyte-server/src/main/java/io/airbyte/server/ServerApp.java @@ -10,6 +10,12 @@ import io.airbyte.commons.features.EnvVariableFeatureFlags; import io.airbyte.commons.features.FeatureFlags; import io.airbyte.commons.resources.MoreResources; +import io.airbyte.commons.server.errors.*; +import io.airbyte.commons.server.handlers.*; +import io.airbyte.commons.server.scheduler.DefaultSynchronousSchedulerClient; +import io.airbyte.commons.server.scheduler.EventRunner; +import io.airbyte.commons.server.scheduler.TemporalEventRunner; +import io.airbyte.commons.server.services.AirbyteGithubStore; import io.airbyte.commons.temporal.ConnectionManagerUtils; import io.airbyte.commons.temporal.StreamResetRecordsHelper; import io.airbyte.commons.temporal.TemporalClient; @@ -38,12 +44,6 @@ import io.airbyte.persistence.job.errorreporter.JobErrorReportingClientFactory; import io.airbyte.persistence.job.factory.OAuthConfigSupplier; import io.airbyte.persistence.job.tracker.JobTracker; -import io.airbyte.server.errors.*; -import io.airbyte.server.handlers.*; -import io.airbyte.server.scheduler.DefaultSynchronousSchedulerClient; -import io.airbyte.server.scheduler.EventRunner; -import io.airbyte.server.scheduler.TemporalEventRunner; -import io.airbyte.server.services.AirbyteGithubStore; import io.airbyte.validation.json.JsonSchemaValidator; import io.airbyte.workers.helper.ConnectionHelper; import io.temporal.serviceclient.WorkflowServiceStubs; diff --git a/airbyte-server/src/main/java/io/airbyte/server/ServerFactory.java b/airbyte-server/src/main/java/io/airbyte/server/ServerFactory.java index 4fb830771906..2ceb52bd9e4d 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/ServerFactory.java +++ b/airbyte-server/src/main/java/io/airbyte/server/ServerFactory.java @@ -5,6 +5,9 @@ package io.airbyte.server; import io.airbyte.analytics.TrackingClient; +import io.airbyte.commons.server.handlers.*; +import io.airbyte.commons.server.scheduler.EventRunner; +import io.airbyte.commons.server.scheduler.SynchronousSchedulerClient; import io.airbyte.commons.version.AirbyteVersion; import io.airbyte.config.Configs.WorkerEnvironment; import io.airbyte.config.helpers.LogConfigs; @@ -13,9 +16,6 @@ import io.airbyte.config.persistence.SecretsRepositoryWriter; import io.airbyte.db.Database; import io.airbyte.persistence.job.JobPersistence; -import io.airbyte.server.handlers.*; -import io.airbyte.server.scheduler.EventRunner; -import io.airbyte.server.scheduler.SynchronousSchedulerClient; import java.net.http.HttpClient; import java.nio.file.Path; import java.util.HashSet; diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/ApiHelper.java b/airbyte-server/src/main/java/io/airbyte/server/apis/ApiHelper.java index b24eda21e754..63541a77b34c 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/ApiHelper.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/ApiHelper.java @@ -4,9 +4,9 @@ package io.airbyte.server.apis; +import io.airbyte.commons.server.errors.BadObjectSchemaKnownException; +import io.airbyte.commons.server.errors.IdNotFoundKnownException; import io.airbyte.config.persistence.ConfigNotFoundException; -import io.airbyte.server.errors.BadObjectSchemaKnownException; -import io.airbyte.server.errors.IdNotFoundKnownException; import io.airbyte.validation.json.JsonValidationException; import java.io.IOException; import org.slf4j.LoggerFactory; diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/AttemptApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/AttemptApiController.java index c7c112405b44..64e8c4730d8f 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/AttemptApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/AttemptApiController.java @@ -10,7 +10,7 @@ import io.airbyte.api.model.generated.InternalOperationResult; import io.airbyte.api.model.generated.SaveStatsRequestBody; import io.airbyte.api.model.generated.SetWorkflowInAttemptRequestBody; -import io.airbyte.server.handlers.AttemptHandler; +import io.airbyte.commons.server.handlers.AttemptHandler; import io.micronaut.context.annotation.Requires; import io.micronaut.http.MediaType; import io.micronaut.http.annotation.Body; diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/ConnectionApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/ConnectionApiController.java index f61b89e41447..9eb2d309ddc0 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/ConnectionApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/ConnectionApiController.java @@ -16,9 +16,9 @@ import io.airbyte.api.model.generated.ConnectionUpdate; import io.airbyte.api.model.generated.JobInfoRead; import io.airbyte.api.model.generated.WorkspaceIdRequestBody; -import io.airbyte.server.handlers.ConnectionsHandler; -import io.airbyte.server.handlers.OperationsHandler; -import io.airbyte.server.handlers.SchedulerHandler; +import io.airbyte.commons.server.handlers.ConnectionsHandler; +import io.airbyte.commons.server.handlers.OperationsHandler; +import io.airbyte.commons.server.handlers.SchedulerHandler; import io.micronaut.context.annotation.Context; import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Body; diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationApiController.java index 7a20184b0e4d..289bf599f1f7 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationApiController.java @@ -17,8 +17,8 @@ import io.airbyte.api.model.generated.DestinationSearch; import io.airbyte.api.model.generated.DestinationUpdate; import io.airbyte.api.model.generated.WorkspaceIdRequestBody; -import io.airbyte.server.handlers.DestinationHandler; -import io.airbyte.server.handlers.SchedulerHandler; +import io.airbyte.commons.server.handlers.DestinationHandler; +import io.airbyte.commons.server.handlers.SchedulerHandler; import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Body; import io.micronaut.http.annotation.Controller; diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationDefinitionApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationDefinitionApiController.java index ab559f6b3b09..a5bd2a43f3a6 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationDefinitionApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationDefinitionApiController.java @@ -19,7 +19,7 @@ import io.airbyte.api.model.generated.PrivateDestinationDefinitionRead; import io.airbyte.api.model.generated.PrivateDestinationDefinitionReadList; import io.airbyte.api.model.generated.WorkspaceIdRequestBody; -import io.airbyte.server.handlers.DestinationDefinitionsHandler; +import io.airbyte.commons.server.handlers.DestinationDefinitionsHandler; import io.micronaut.context.annotation.Context; import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Controller; diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationDefinitionSpecificationApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationDefinitionSpecificationApiController.java index d93bc6dcbe99..a6c013df9542 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationDefinitionSpecificationApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationDefinitionSpecificationApiController.java @@ -9,7 +9,7 @@ import io.airbyte.api.generated.DestinationDefinitionSpecificationApi; import io.airbyte.api.model.generated.DestinationDefinitionIdWithWorkspaceId; import io.airbyte.api.model.generated.DestinationDefinitionSpecificationRead; -import io.airbyte.server.handlers.SchedulerHandler; +import io.airbyte.commons.server.handlers.SchedulerHandler; import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationOauthApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationOauthApiController.java index 58286dfacd48..3d508935a4bd 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationOauthApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationOauthApiController.java @@ -12,7 +12,7 @@ import io.airbyte.api.model.generated.DestinationOauthConsentRequest; import io.airbyte.api.model.generated.OAuthConsentRead; import io.airbyte.api.model.generated.SetInstancewideDestinationOauthParamsRequestBody; -import io.airbyte.server.handlers.OAuthHandler; +import io.airbyte.commons.server.handlers.OAuthHandler; import io.micronaut.context.annotation.Context; import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Controller; diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/HealthApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/HealthApiController.java index 3ffb6851cbc5..de386a536775 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/HealthApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/HealthApiController.java @@ -6,7 +6,7 @@ import io.airbyte.api.generated.HealthApi; import io.airbyte.api.model.generated.HealthCheckRead; -import io.airbyte.server.handlers.HealthCheckHandler; +import io.airbyte.commons.server.handlers.HealthCheckHandler; import io.micronaut.context.annotation.Requires; import io.micronaut.http.MediaType; import io.micronaut.http.annotation.Controller; diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/JobsApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/JobsApiController.java index b930472e5d23..8ca1195c92f4 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/JobsApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/JobsApiController.java @@ -18,8 +18,8 @@ import io.airbyte.api.model.generated.JobListRequestBody; import io.airbyte.api.model.generated.JobOptionalRead; import io.airbyte.api.model.generated.JobReadList; -import io.airbyte.server.handlers.JobHistoryHandler; -import io.airbyte.server.handlers.SchedulerHandler; +import io.airbyte.commons.server.handlers.JobHistoryHandler; +import io.airbyte.commons.server.handlers.SchedulerHandler; import io.micronaut.context.annotation.Context; import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Controller; diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/LogsApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/LogsApiController.java index 13257412cf04..e98749577545 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/LogsApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/LogsApiController.java @@ -8,7 +8,7 @@ import io.airbyte.api.generated.LogsApi; import io.airbyte.api.model.generated.LogsRequestBody; -import io.airbyte.server.handlers.LogsHandler; +import io.airbyte.commons.server.handlers.LogsHandler; import io.micronaut.context.annotation.Context; import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Controller; diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/NotificationsApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/NotificationsApiController.java index c81799b9ac92..e2cf648e3398 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/NotificationsApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/NotificationsApiController.java @@ -9,7 +9,7 @@ import io.airbyte.api.generated.NotificationsApi; import io.airbyte.api.model.generated.Notification; import io.airbyte.api.model.generated.NotificationRead; -import io.airbyte.server.handlers.WorkspacesHandler; +import io.airbyte.commons.server.handlers.WorkspacesHandler; import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Body; import io.micronaut.http.annotation.Controller; diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/OpenapiApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/OpenapiApiController.java index 5e574a23deb9..0f1754d01492 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/OpenapiApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/OpenapiApiController.java @@ -7,7 +7,7 @@ import static io.airbyte.commons.auth.AuthRoleConstants.AUTHENTICATED_USER; import io.airbyte.api.generated.OpenapiApi; -import io.airbyte.server.handlers.OpenApiConfigHandler; +import io.airbyte.commons.server.handlers.OpenApiConfigHandler; import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Get; diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/OperationApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/OperationApiController.java index 172fbb76e40a..81b32a9975e0 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/OperationApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/OperationApiController.java @@ -17,7 +17,7 @@ import io.airbyte.api.model.generated.OperationReadList; import io.airbyte.api.model.generated.OperationUpdate; import io.airbyte.api.model.generated.OperatorConfiguration; -import io.airbyte.server.handlers.OperationsHandler; +import io.airbyte.commons.server.handlers.OperationsHandler; import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Body; import io.micronaut.http.annotation.Controller; diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/SchedulerApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/SchedulerApiController.java index 365dc04afc46..4799406c8a42 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/SchedulerApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/SchedulerApiController.java @@ -12,7 +12,7 @@ import io.airbyte.api.model.generated.DestinationCoreConfig; import io.airbyte.api.model.generated.SourceCoreConfig; import io.airbyte.api.model.generated.SourceDiscoverSchemaRead; -import io.airbyte.server.handlers.SchedulerHandler; +import io.airbyte.commons.server.handlers.SchedulerHandler; import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/SourceApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/SourceApiController.java index 0c680f742989..342d99503011 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/SourceApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/SourceApiController.java @@ -20,8 +20,8 @@ import io.airbyte.api.model.generated.SourceSearch; import io.airbyte.api.model.generated.SourceUpdate; import io.airbyte.api.model.generated.WorkspaceIdRequestBody; -import io.airbyte.server.handlers.SchedulerHandler; -import io.airbyte.server.handlers.SourceHandler; +import io.airbyte.commons.server.handlers.SchedulerHandler; +import io.airbyte.commons.server.handlers.SourceHandler; import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/SourceDefinitionApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/SourceDefinitionApiController.java index 97a030dc7f70..7dbb288f38b7 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/SourceDefinitionApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/SourceDefinitionApiController.java @@ -19,7 +19,7 @@ import io.airbyte.api.model.generated.SourceDefinitionReadList; import io.airbyte.api.model.generated.SourceDefinitionUpdate; import io.airbyte.api.model.generated.WorkspaceIdRequestBody; -import io.airbyte.server.handlers.SourceDefinitionsHandler; +import io.airbyte.commons.server.handlers.SourceDefinitionsHandler; import io.micronaut.context.annotation.Context; import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Controller; diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/SourceDefinitionSpecificationApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/SourceDefinitionSpecificationApiController.java index e87b5c28bddc..2e094bc3f705 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/SourceDefinitionSpecificationApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/SourceDefinitionSpecificationApiController.java @@ -9,7 +9,7 @@ import io.airbyte.api.generated.SourceDefinitionSpecificationApi; import io.airbyte.api.model.generated.SourceDefinitionIdWithWorkspaceId; import io.airbyte.api.model.generated.SourceDefinitionSpecificationRead; -import io.airbyte.server.handlers.SchedulerHandler; +import io.airbyte.commons.server.handlers.SchedulerHandler; import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/SourceOauthApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/SourceOauthApiController.java index 52cbc82beb97..785c41519bf5 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/SourceOauthApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/SourceOauthApiController.java @@ -12,7 +12,7 @@ import io.airbyte.api.model.generated.OAuthConsentRead; import io.airbyte.api.model.generated.SetInstancewideSourceOauthParamsRequestBody; import io.airbyte.api.model.generated.SourceOauthConsentRequest; -import io.airbyte.server.handlers.OAuthHandler; +import io.airbyte.commons.server.handlers.OAuthHandler; import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Body; import io.micronaut.http.annotation.Controller; diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/StateApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/StateApiController.java index 870a499d5999..02b1941e5bd8 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/StateApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/StateApiController.java @@ -11,7 +11,7 @@ import io.airbyte.api.model.generated.ConnectionIdRequestBody; import io.airbyte.api.model.generated.ConnectionState; import io.airbyte.api.model.generated.ConnectionStateCreateOrUpdate; -import io.airbyte.server.handlers.StateHandler; +import io.airbyte.commons.server.handlers.StateHandler; import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/WebBackendApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/WebBackendApiController.java index af8c5a3ad316..b5c515e37f93 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/WebBackendApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/WebBackendApiController.java @@ -21,9 +21,9 @@ import io.airbyte.api.model.generated.WebBackendGeographiesListResult; import io.airbyte.api.model.generated.WebBackendWorkspaceState; import io.airbyte.api.model.generated.WebBackendWorkspaceStateResult; -import io.airbyte.server.handlers.WebBackendCheckUpdatesHandler; -import io.airbyte.server.handlers.WebBackendConnectionsHandler; -import io.airbyte.server.handlers.WebBackendGeographiesHandler; +import io.airbyte.commons.server.handlers.WebBackendCheckUpdatesHandler; +import io.airbyte.commons.server.handlers.WebBackendConnectionsHandler; +import io.airbyte.commons.server.handlers.WebBackendGeographiesHandler; import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/WorkspaceApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/WorkspaceApiController.java index 1942a4d03afb..be44d089283b 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/WorkspaceApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/WorkspaceApiController.java @@ -17,7 +17,7 @@ import io.airbyte.api.model.generated.WorkspaceReadList; import io.airbyte.api.model.generated.WorkspaceUpdate; import io.airbyte.api.model.generated.WorkspaceUpdateName; -import io.airbyte.server.handlers.WorkspacesHandler; +import io.airbyte.commons.server.handlers.WorkspacesHandler; import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Body; import io.micronaut.http.annotation.Controller; diff --git a/airbyte-server/src/main/java/io/airbyte/server/config/ApplicationBeanFactory.java b/airbyte-server/src/main/java/io/airbyte/server/config/ApplicationBeanFactory.java index 13111f657156..e21046c46c68 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/config/ApplicationBeanFactory.java +++ b/airbyte-server/src/main/java/io/airbyte/server/config/ApplicationBeanFactory.java @@ -7,6 +7,9 @@ import io.airbyte.analytics.TrackingClient; import io.airbyte.commons.features.EnvVariableFeatureFlags; import io.airbyte.commons.features.FeatureFlags; +import io.airbyte.commons.server.scheduler.EventRunner; +import io.airbyte.commons.server.scheduler.TemporalEventRunner; +import io.airbyte.commons.server.services.AirbyteGithubStore; import io.airbyte.commons.temporal.TemporalClient; import io.airbyte.commons.version.AirbyteProtocolVersionRange; import io.airbyte.commons.version.AirbyteVersion; @@ -18,9 +21,6 @@ import io.airbyte.persistence.job.JobPersistence; import io.airbyte.persistence.job.WebUrlHelper; import io.airbyte.persistence.job.tracker.JobTracker; -import io.airbyte.server.scheduler.EventRunner; -import io.airbyte.server.scheduler.TemporalEventRunner; -import io.airbyte.server.services.AirbyteGithubStore; import io.airbyte.validation.json.JsonSchemaValidator; import io.micronaut.context.annotation.Factory; import io.micronaut.context.annotation.Value; diff --git a/airbyte-server/src/main/java/io/airbyte/server/config/TemporalBeanFactory.java b/airbyte-server/src/main/java/io/airbyte/server/config/TemporalBeanFactory.java index 069a3853193f..f3dd40c530af 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/config/TemporalBeanFactory.java +++ b/airbyte-server/src/main/java/io/airbyte/server/config/TemporalBeanFactory.java @@ -7,6 +7,8 @@ import io.airbyte.analytics.Deployment; import io.airbyte.analytics.TrackingClient; import io.airbyte.analytics.TrackingClientSingleton; +import io.airbyte.commons.server.scheduler.DefaultSynchronousSchedulerClient; +import io.airbyte.commons.server.scheduler.SynchronousSchedulerClient; import io.airbyte.commons.temporal.TemporalClient; import io.airbyte.commons.version.AirbyteVersion; import io.airbyte.config.Configs.DeploymentMode; @@ -17,8 +19,6 @@ import io.airbyte.persistence.job.errorreporter.JobErrorReporter; import io.airbyte.persistence.job.factory.OAuthConfigSupplier; import io.airbyte.persistence.job.tracker.JobTracker; -import io.airbyte.server.scheduler.DefaultSynchronousSchedulerClient; -import io.airbyte.server.scheduler.SynchronousSchedulerClient; import io.micronaut.context.annotation.Factory; import io.micronaut.context.annotation.Value; import jakarta.inject.Singleton; diff --git a/airbyte-server/src/test/java/io/airbyte/server/apis/HealthCheckApiTest.java b/airbyte-server/src/test/java/io/airbyte/server/apis/HealthCheckApiTest.java index cc4f5d814e35..eb9f258eb178 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/apis/HealthCheckApiTest.java +++ b/airbyte-server/src/test/java/io/airbyte/server/apis/HealthCheckApiTest.java @@ -9,7 +9,7 @@ import static org.mockito.Mockito.when; import io.airbyte.api.model.generated.HealthCheckRead; -import io.airbyte.server.handlers.HealthCheckHandler; +import io.airbyte.commons.server.handlers.HealthCheckHandler; import org.junit.jupiter.api.Test; class HealthCheckApiTest { From b4f0b256dfe331c30e13c25dbd5419f4345295f5 Mon Sep 17 00:00:00 2001 From: benmoriceau Date: Mon, 23 Jan 2023 14:08:28 -0800 Subject: [PATCH 4/8] Format --- airbyte-server/src/main/java/io/airbyte/server/ServerApp.java | 2 +- .../server/errors/IdNotFoundExceptionMapper.java | 4 +++- .../server/errors/InvalidInputExceptionHandler.java | 2 +- .../server/errors/InvalidInputExceptionMapper.java | 2 +- .../server/errors/InvalidJsonExceptionHandler.java | 3 ++- .../server/errors/InvalidJsonExceptionMapper.java | 3 ++- .../server/errors/InvalidJsonInputExceptionHandler.java | 3 ++- .../server/errors/InvalidJsonInputExceptionMapper.java | 3 ++- .../{commons => }/server/errors/KnownExceptionHandler.java | 3 ++- .../{commons => }/server/errors/KnownExceptionMapper.java | 3 ++- .../{commons => }/server/errors/NotFoundExceptionHandler.java | 4 +++- .../{commons => }/server/errors/NotFoundExceptionMapper.java | 3 ++- .../{commons => }/server/errors/UncaughtExceptionHandler.java | 3 ++- .../{commons => }/server/errors/UncaughtExceptionMapper.java | 3 ++- 14 files changed, 27 insertions(+), 14 deletions(-) rename airbyte-server/src/main/java/io/airbyte/{commons => }/server/errors/IdNotFoundExceptionMapper.java (89%) rename airbyte-server/src/main/java/io/airbyte/{commons => }/server/errors/InvalidInputExceptionHandler.java (98%) rename airbyte-server/src/main/java/io/airbyte/{commons => }/server/errors/InvalidInputExceptionMapper.java (94%) rename airbyte-server/src/main/java/io/airbyte/{commons => }/server/errors/InvalidJsonExceptionHandler.java (91%) rename airbyte-server/src/main/java/io/airbyte/{commons => }/server/errors/InvalidJsonExceptionMapper.java (87%) rename airbyte-server/src/main/java/io/airbyte/{commons => }/server/errors/InvalidJsonInputExceptionHandler.java (92%) rename airbyte-server/src/main/java/io/airbyte/{commons => }/server/errors/InvalidJsonInputExceptionMapper.java (88%) rename airbyte-server/src/main/java/io/airbyte/{commons => }/server/errors/KnownExceptionHandler.java (90%) rename airbyte-server/src/main/java/io/airbyte/{commons => }/server/errors/KnownExceptionMapper.java (90%) rename airbyte-server/src/main/java/io/airbyte/{commons => }/server/errors/NotFoundExceptionHandler.java (89%) rename airbyte-server/src/main/java/io/airbyte/{commons => }/server/errors/NotFoundExceptionMapper.java (91%) rename airbyte-server/src/main/java/io/airbyte/{commons => }/server/errors/UncaughtExceptionHandler.java (92%) rename airbyte-server/src/main/java/io/airbyte/{commons => }/server/errors/UncaughtExceptionMapper.java (90%) diff --git a/airbyte-server/src/main/java/io/airbyte/server/ServerApp.java b/airbyte-server/src/main/java/io/airbyte/server/ServerApp.java index 5731bf7d491b..3c42df88413d 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/ServerApp.java +++ b/airbyte-server/src/main/java/io/airbyte/server/ServerApp.java @@ -10,7 +10,6 @@ import io.airbyte.commons.features.EnvVariableFeatureFlags; import io.airbyte.commons.features.FeatureFlags; import io.airbyte.commons.resources.MoreResources; -import io.airbyte.commons.server.errors.*; import io.airbyte.commons.server.handlers.*; import io.airbyte.commons.server.scheduler.DefaultSynchronousSchedulerClient; import io.airbyte.commons.server.scheduler.EventRunner; @@ -44,6 +43,7 @@ import io.airbyte.persistence.job.errorreporter.JobErrorReportingClientFactory; import io.airbyte.persistence.job.factory.OAuthConfigSupplier; import io.airbyte.persistence.job.tracker.JobTracker; +import io.airbyte.server.errors.*; import io.airbyte.validation.json.JsonSchemaValidator; import io.airbyte.workers.helper.ConnectionHelper; import io.temporal.serviceclient.WorkflowServiceStubs; diff --git a/airbyte-server/src/main/java/io/airbyte/commons/server/errors/IdNotFoundExceptionMapper.java b/airbyte-server/src/main/java/io/airbyte/server/errors/IdNotFoundExceptionMapper.java similarity index 89% rename from airbyte-server/src/main/java/io/airbyte/commons/server/errors/IdNotFoundExceptionMapper.java rename to airbyte-server/src/main/java/io/airbyte/server/errors/IdNotFoundExceptionMapper.java index 0dfc234bee28..735ebc2f0bac 100644 --- a/airbyte-server/src/main/java/io/airbyte/commons/server/errors/IdNotFoundExceptionMapper.java +++ b/airbyte-server/src/main/java/io/airbyte/server/errors/IdNotFoundExceptionMapper.java @@ -2,8 +2,10 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.commons.server.errors; +package io.airbyte.server.errors; +import io.airbyte.commons.server.errors.IdNotFoundKnownException; +import io.airbyte.commons.server.errors.KnownException; import io.micronaut.context.annotation.Requires; import io.micronaut.http.HttpRequest; import io.micronaut.http.HttpResponse; diff --git a/airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidInputExceptionHandler.java b/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidInputExceptionHandler.java similarity index 98% rename from airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidInputExceptionHandler.java rename to airbyte-server/src/main/java/io/airbyte/server/errors/InvalidInputExceptionHandler.java index 0acf0876a496..6cdc923e3ebf 100644 --- a/airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidInputExceptionHandler.java +++ b/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidInputExceptionHandler.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.commons.server.errors; +package io.airbyte.server.errors; import io.airbyte.api.model.generated.InvalidInputExceptionInfo; import io.airbyte.api.model.generated.InvalidInputProperty; diff --git a/airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidInputExceptionMapper.java b/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidInputExceptionMapper.java similarity index 94% rename from airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidInputExceptionMapper.java rename to airbyte-server/src/main/java/io/airbyte/server/errors/InvalidInputExceptionMapper.java index 70ce1201d773..4fe9b202265c 100644 --- a/airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidInputExceptionMapper.java +++ b/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidInputExceptionMapper.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.commons.server.errors; +package io.airbyte.server.errors; import io.airbyte.commons.json.Jsons; import javax.validation.ConstraintViolationException; diff --git a/airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonExceptionHandler.java b/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonExceptionHandler.java similarity index 91% rename from airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonExceptionHandler.java rename to airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonExceptionHandler.java index b64c4d18a15b..e8aa3ceefb98 100644 --- a/airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonExceptionHandler.java +++ b/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonExceptionHandler.java @@ -2,9 +2,10 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.commons.server.errors; +package io.airbyte.server.errors; import com.fasterxml.jackson.core.JsonParseException; +import io.airbyte.commons.server.errors.KnownException; import io.micronaut.context.annotation.Requires; import io.micronaut.http.HttpRequest; import io.micronaut.http.HttpResponse; diff --git a/airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonExceptionMapper.java b/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonExceptionMapper.java similarity index 87% rename from airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonExceptionMapper.java rename to airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonExceptionMapper.java index a073c369aca5..5f77149614c6 100644 --- a/airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonExceptionMapper.java +++ b/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonExceptionMapper.java @@ -2,9 +2,10 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.commons.server.errors; +package io.airbyte.server.errors; import com.fasterxml.jackson.core.JsonParseException; +import io.airbyte.commons.server.errors.KnownException; import javax.ws.rs.core.Response; import javax.ws.rs.ext.ExceptionMapper; import javax.ws.rs.ext.Provider; diff --git a/airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonInputExceptionHandler.java b/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonInputExceptionHandler.java similarity index 92% rename from airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonInputExceptionHandler.java rename to airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonInputExceptionHandler.java index 55b74cda4916..ebb9a5158667 100644 --- a/airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonInputExceptionHandler.java +++ b/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonInputExceptionHandler.java @@ -2,9 +2,10 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.commons.server.errors; +package io.airbyte.server.errors; import com.fasterxml.jackson.databind.JsonMappingException; +import io.airbyte.commons.server.errors.KnownException; import io.micronaut.context.annotation.Requires; import io.micronaut.http.HttpRequest; import io.micronaut.http.HttpResponse; diff --git a/airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonInputExceptionMapper.java b/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonInputExceptionMapper.java similarity index 88% rename from airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonInputExceptionMapper.java rename to airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonInputExceptionMapper.java index d504333c4f0e..3c10d5650345 100644 --- a/airbyte-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonInputExceptionMapper.java +++ b/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonInputExceptionMapper.java @@ -2,10 +2,11 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.commons.server.errors; +package io.airbyte.server.errors; import com.fasterxml.jackson.databind.JsonMappingException; import io.airbyte.commons.json.Jsons; +import io.airbyte.commons.server.errors.KnownException; import javax.ws.rs.core.Response; import javax.ws.rs.ext.ExceptionMapper; import javax.ws.rs.ext.Provider; diff --git a/airbyte-server/src/main/java/io/airbyte/commons/server/errors/KnownExceptionHandler.java b/airbyte-server/src/main/java/io/airbyte/server/errors/KnownExceptionHandler.java similarity index 90% rename from airbyte-server/src/main/java/io/airbyte/commons/server/errors/KnownExceptionHandler.java rename to airbyte-server/src/main/java/io/airbyte/server/errors/KnownExceptionHandler.java index 6f487c99bef3..1d4b932fe00a 100644 --- a/airbyte-server/src/main/java/io/airbyte/commons/server/errors/KnownExceptionHandler.java +++ b/airbyte-server/src/main/java/io/airbyte/server/errors/KnownExceptionHandler.java @@ -2,9 +2,10 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.commons.server.errors; +package io.airbyte.server.errors; import io.airbyte.commons.json.Jsons; +import io.airbyte.commons.server.errors.KnownException; import io.micronaut.context.annotation.Requires; import io.micronaut.http.HttpRequest; import io.micronaut.http.HttpResponse; diff --git a/airbyte-server/src/main/java/io/airbyte/commons/server/errors/KnownExceptionMapper.java b/airbyte-server/src/main/java/io/airbyte/server/errors/KnownExceptionMapper.java similarity index 90% rename from airbyte-server/src/main/java/io/airbyte/commons/server/errors/KnownExceptionMapper.java rename to airbyte-server/src/main/java/io/airbyte/server/errors/KnownExceptionMapper.java index 5ead770ad91c..5abaef4727be 100644 --- a/airbyte-server/src/main/java/io/airbyte/commons/server/errors/KnownExceptionMapper.java +++ b/airbyte-server/src/main/java/io/airbyte/server/errors/KnownExceptionMapper.java @@ -2,9 +2,10 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.commons.server.errors; +package io.airbyte.server.errors; import io.airbyte.commons.json.Jsons; +import io.airbyte.commons.server.errors.KnownException; import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Produces; import jakarta.inject.Singleton; diff --git a/airbyte-server/src/main/java/io/airbyte/commons/server/errors/NotFoundExceptionHandler.java b/airbyte-server/src/main/java/io/airbyte/server/errors/NotFoundExceptionHandler.java similarity index 89% rename from airbyte-server/src/main/java/io/airbyte/commons/server/errors/NotFoundExceptionHandler.java rename to airbyte-server/src/main/java/io/airbyte/server/errors/NotFoundExceptionHandler.java index 8de9647cabe0..e522fea2c78b 100644 --- a/airbyte-server/src/main/java/io/airbyte/commons/server/errors/NotFoundExceptionHandler.java +++ b/airbyte-server/src/main/java/io/airbyte/server/errors/NotFoundExceptionHandler.java @@ -2,8 +2,10 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.commons.server.errors; +package io.airbyte.server.errors; +import io.airbyte.commons.server.errors.IdNotFoundKnownException; +import io.airbyte.commons.server.errors.KnownException; import io.micronaut.context.annotation.Requires; import io.micronaut.http.HttpRequest; import io.micronaut.http.HttpResponse; diff --git a/airbyte-server/src/main/java/io/airbyte/commons/server/errors/NotFoundExceptionMapper.java b/airbyte-server/src/main/java/io/airbyte/server/errors/NotFoundExceptionMapper.java similarity index 91% rename from airbyte-server/src/main/java/io/airbyte/commons/server/errors/NotFoundExceptionMapper.java rename to airbyte-server/src/main/java/io/airbyte/server/errors/NotFoundExceptionMapper.java index 93a430472a6b..6de125c86909 100644 --- a/airbyte-server/src/main/java/io/airbyte/commons/server/errors/NotFoundExceptionMapper.java +++ b/airbyte-server/src/main/java/io/airbyte/server/errors/NotFoundExceptionMapper.java @@ -2,9 +2,10 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.commons.server.errors; +package io.airbyte.server.errors; import io.airbyte.commons.json.Jsons; +import io.airbyte.commons.server.errors.IdNotFoundKnownException; import javax.ws.rs.NotFoundException; import javax.ws.rs.core.Response; import javax.ws.rs.ext.ExceptionMapper; diff --git a/airbyte-server/src/main/java/io/airbyte/commons/server/errors/UncaughtExceptionHandler.java b/airbyte-server/src/main/java/io/airbyte/server/errors/UncaughtExceptionHandler.java similarity index 92% rename from airbyte-server/src/main/java/io/airbyte/commons/server/errors/UncaughtExceptionHandler.java rename to airbyte-server/src/main/java/io/airbyte/server/errors/UncaughtExceptionHandler.java index 33ddf10dd20a..00b032d524ec 100644 --- a/airbyte-server/src/main/java/io/airbyte/commons/server/errors/UncaughtExceptionHandler.java +++ b/airbyte-server/src/main/java/io/airbyte/server/errors/UncaughtExceptionHandler.java @@ -2,8 +2,9 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.commons.server.errors; +package io.airbyte.server.errors; +import io.airbyte.commons.server.errors.KnownException; import io.micronaut.context.annotation.Requires; import io.micronaut.http.HttpRequest; import io.micronaut.http.HttpResponse; diff --git a/airbyte-server/src/main/java/io/airbyte/commons/server/errors/UncaughtExceptionMapper.java b/airbyte-server/src/main/java/io/airbyte/server/errors/UncaughtExceptionMapper.java similarity index 90% rename from airbyte-server/src/main/java/io/airbyte/commons/server/errors/UncaughtExceptionMapper.java rename to airbyte-server/src/main/java/io/airbyte/server/errors/UncaughtExceptionMapper.java index 8057734d660a..4cd9d02c27de 100644 --- a/airbyte-server/src/main/java/io/airbyte/commons/server/errors/UncaughtExceptionMapper.java +++ b/airbyte-server/src/main/java/io/airbyte/server/errors/UncaughtExceptionMapper.java @@ -2,10 +2,11 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.commons.server.errors; +package io.airbyte.server.errors; import io.airbyte.api.model.generated.KnownExceptionInfo; import io.airbyte.commons.json.Jsons; +import io.airbyte.commons.server.errors.KnownException; import javax.ws.rs.core.Response; import javax.ws.rs.ext.ExceptionMapper; import javax.ws.rs.ext.Provider; From 1ebf569e0768c9c0bed1216de54b1053709a7fce Mon Sep 17 00:00:00 2001 From: benmoriceau Date: Mon, 23 Jan 2023 15:06:16 -0800 Subject: [PATCH 5/8] Better way to get resources --- .../commons/server/helpers/ConnectorSpecificationHelpers.java | 2 +- .../io/airbyte/commons/server/helpers/DestinationHelpers.java | 2 +- .../java/io/airbyte/commons/server/helpers/SourceHelpers.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/ConnectorSpecificationHelpers.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/ConnectorSpecificationHelpers.java index 19b77c3d4269..50ac208ba8dd 100644 --- a/airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/ConnectorSpecificationHelpers.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/ConnectorSpecificationHelpers.java @@ -17,7 +17,7 @@ public class ConnectorSpecificationHelpers { public static ConnectorSpecification generateConnectorSpecification() throws IOException { - final Path path = Paths.get("../airbyte-commons-server/src/test/resources/json/TestSpecification.json"); + final Path path = Paths.get(ConnectorSpecificationHelpers.class.getClassLoader().getResource("json/TestSpecification.json").getPath()); try { return new ConnectorSpecification() diff --git a/airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/DestinationHelpers.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/DestinationHelpers.java index 9c43b33bde4f..74bb05dca4f2 100644 --- a/airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/DestinationHelpers.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/DestinationHelpers.java @@ -20,7 +20,7 @@ public class DestinationHelpers { public static JsonNode getTestDestinationJson() throws IOException { final Path path = - Paths.get("../airbyte-commons-server/src/test/resources/json/TestImplementation.json"); + Paths.get(DestinationHelpers.class.getClassLoader().getResource("json/TestImplementation.json").getPath()); return Jsons.deserialize(Files.readString(path)); } diff --git a/airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/SourceHelpers.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/SourceHelpers.java index 699aff75f7f4..1b1604973bdb 100644 --- a/airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/SourceHelpers.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/helpers/SourceHelpers.java @@ -46,7 +46,7 @@ public static SourceConnection generateSource(final UUID sourceDefinitionId, fin } public static JsonNode getTestImplementationJson() throws IOException { - final Path path = Paths.get("../airbyte-commons-server/src/test/resources/json/TestImplementation.json"); + final Path path = Paths.get(SourceHelpers.class.getClassLoader().getResource("json/TestImplementation.json").getPath()); return Jsons.deserialize(Files.readString(path)); } From 14096074289a64ce9cf6b73c568a2f359014ee24 Mon Sep 17 00:00:00 2001 From: benmoriceau Date: Mon, 23 Jan 2023 15:43:52 -0800 Subject: [PATCH 6/8] Extract the old mapper --- .../commons}/server/RequestLogger.java | 2 +- .../errors/IdNotFoundExceptionMapper.java | 4 +- .../errors/InvalidInputExceptionMapper.java | 47 +++++++++++++++++++ .../errors/InvalidJsonExceptionMapper.java | 3 +- .../InvalidJsonInputExceptionMapper.java | 3 +- .../server/errors/KnownExceptionMapper.java | 3 +- .../errors/NotFoundExceptionMapper.java | 3 +- .../errors/UncaughtExceptionMapper.java | 3 +- .../java/io/airbyte/server/ServerApp.java | 3 +- .../errors/InvalidInputExceptionHandler.java | 26 +--------- .../errors/InvalidInputExceptionMapper.java | 24 ---------- .../io/airbyte/server/RequestLoggerTest.java | 1 + 12 files changed, 59 insertions(+), 63 deletions(-) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/RequestLogger.java (99%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/errors/IdNotFoundExceptionMapper.java (89%) create mode 100644 airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/InvalidInputExceptionMapper.java rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/errors/InvalidJsonExceptionMapper.java (87%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/errors/InvalidJsonInputExceptionMapper.java (88%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/errors/KnownExceptionMapper.java (90%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/errors/NotFoundExceptionMapper.java (91%) rename {airbyte-server/src/main/java/io/airbyte => airbyte-commons-server/src/main/java/io/airbyte/commons}/server/errors/UncaughtExceptionMapper.java (90%) delete mode 100644 airbyte-server/src/main/java/io/airbyte/server/errors/InvalidInputExceptionMapper.java diff --git a/airbyte-server/src/main/java/io/airbyte/server/RequestLogger.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/RequestLogger.java similarity index 99% rename from airbyte-server/src/main/java/io/airbyte/server/RequestLogger.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/RequestLogger.java index 6406d6b86026..2d43ff574a2c 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/RequestLogger.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/RequestLogger.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server; +package io.airbyte.commons.server; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ObjectNode; diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/IdNotFoundExceptionMapper.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/IdNotFoundExceptionMapper.java similarity index 89% rename from airbyte-server/src/main/java/io/airbyte/server/errors/IdNotFoundExceptionMapper.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/IdNotFoundExceptionMapper.java index 735ebc2f0bac..0dfc234bee28 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/IdNotFoundExceptionMapper.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/IdNotFoundExceptionMapper.java @@ -2,10 +2,8 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.errors; +package io.airbyte.commons.server.errors; -import io.airbyte.commons.server.errors.IdNotFoundKnownException; -import io.airbyte.commons.server.errors.KnownException; import io.micronaut.context.annotation.Requires; import io.micronaut.http.HttpRequest; import io.micronaut.http.HttpResponse; diff --git a/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/InvalidInputExceptionMapper.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/InvalidInputExceptionMapper.java new file mode 100644 index 000000000000..fd8b0b368a69 --- /dev/null +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/InvalidInputExceptionMapper.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2022 Airbyte, Inc., all rights reserved. + */ + +package io.airbyte.commons.server.errors; + +import io.airbyte.api.model.generated.InvalidInputExceptionInfo; +import io.airbyte.api.model.generated.InvalidInputProperty; +import io.airbyte.commons.json.Jsons; +import java.util.ArrayList; +import java.util.List; +import javax.validation.ConstraintViolation; +import javax.validation.ConstraintViolationException; +import javax.ws.rs.core.Response; +import javax.ws.rs.ext.ExceptionMapper; +import javax.ws.rs.ext.Provider; +import org.apache.logging.log4j.core.util.Throwables; + +@Provider +public class InvalidInputExceptionMapper implements ExceptionMapper { + + public static InvalidInputExceptionInfo infoFromConstraints(final ConstraintViolationException cve) { + final InvalidInputExceptionInfo exceptionInfo = new InvalidInputExceptionInfo() + .exceptionClassName(cve.getClass().getName()) + .message("Some properties contained invalid input.") + .exceptionStack(Throwables.toStringList(cve)); + + final List props = new ArrayList(); + for (final ConstraintViolation cv : cve.getConstraintViolations()) { + props.add(new InvalidInputProperty() + .propertyPath(cv.getPropertyPath().toString()) + .message(cv.getMessage()) + .invalidValue(cv.getInvalidValue() != null ? cv.getInvalidValue().toString() : "null")); + } + exceptionInfo.validationErrors(props); + return exceptionInfo; + } + + @Override + public Response toResponse(final ConstraintViolationException e) { + return Response.status(Response.Status.BAD_REQUEST) + .entity(Jsons.serialize(InvalidInputExceptionMapper.infoFromConstraints(e))) + .type("application/json") + .build(); + } + +} diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonExceptionMapper.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonExceptionMapper.java similarity index 87% rename from airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonExceptionMapper.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonExceptionMapper.java index 5f77149614c6..a073c369aca5 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonExceptionMapper.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonExceptionMapper.java @@ -2,10 +2,9 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.errors; +package io.airbyte.commons.server.errors; import com.fasterxml.jackson.core.JsonParseException; -import io.airbyte.commons.server.errors.KnownException; import javax.ws.rs.core.Response; import javax.ws.rs.ext.ExceptionMapper; import javax.ws.rs.ext.Provider; diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonInputExceptionMapper.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonInputExceptionMapper.java similarity index 88% rename from airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonInputExceptionMapper.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonInputExceptionMapper.java index 3c10d5650345..d504333c4f0e 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidJsonInputExceptionMapper.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/InvalidJsonInputExceptionMapper.java @@ -2,11 +2,10 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.errors; +package io.airbyte.commons.server.errors; import com.fasterxml.jackson.databind.JsonMappingException; import io.airbyte.commons.json.Jsons; -import io.airbyte.commons.server.errors.KnownException; import javax.ws.rs.core.Response; import javax.ws.rs.ext.ExceptionMapper; import javax.ws.rs.ext.Provider; diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/KnownExceptionMapper.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/KnownExceptionMapper.java similarity index 90% rename from airbyte-server/src/main/java/io/airbyte/server/errors/KnownExceptionMapper.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/KnownExceptionMapper.java index 5abaef4727be..5ead770ad91c 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/KnownExceptionMapper.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/KnownExceptionMapper.java @@ -2,10 +2,9 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.errors; +package io.airbyte.commons.server.errors; import io.airbyte.commons.json.Jsons; -import io.airbyte.commons.server.errors.KnownException; import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Produces; import jakarta.inject.Singleton; diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/NotFoundExceptionMapper.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/NotFoundExceptionMapper.java similarity index 91% rename from airbyte-server/src/main/java/io/airbyte/server/errors/NotFoundExceptionMapper.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/NotFoundExceptionMapper.java index 6de125c86909..93a430472a6b 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/NotFoundExceptionMapper.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/NotFoundExceptionMapper.java @@ -2,10 +2,9 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.errors; +package io.airbyte.commons.server.errors; import io.airbyte.commons.json.Jsons; -import io.airbyte.commons.server.errors.IdNotFoundKnownException; import javax.ws.rs.NotFoundException; import javax.ws.rs.core.Response; import javax.ws.rs.ext.ExceptionMapper; diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/UncaughtExceptionMapper.java b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/UncaughtExceptionMapper.java similarity index 90% rename from airbyte-server/src/main/java/io/airbyte/server/errors/UncaughtExceptionMapper.java rename to airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/UncaughtExceptionMapper.java index 4cd9d02c27de..8057734d660a 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/UncaughtExceptionMapper.java +++ b/airbyte-commons-server/src/main/java/io/airbyte/commons/server/errors/UncaughtExceptionMapper.java @@ -2,11 +2,10 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server.errors; +package io.airbyte.commons.server.errors; import io.airbyte.api.model.generated.KnownExceptionInfo; import io.airbyte.commons.json.Jsons; -import io.airbyte.commons.server.errors.KnownException; import javax.ws.rs.core.Response; import javax.ws.rs.ext.ExceptionMapper; import javax.ws.rs.ext.Provider; diff --git a/airbyte-server/src/main/java/io/airbyte/server/ServerApp.java b/airbyte-server/src/main/java/io/airbyte/server/ServerApp.java index 3c42df88413d..30e11d97c09c 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/ServerApp.java +++ b/airbyte-server/src/main/java/io/airbyte/server/ServerApp.java @@ -10,6 +10,8 @@ import io.airbyte.commons.features.EnvVariableFeatureFlags; import io.airbyte.commons.features.FeatureFlags; import io.airbyte.commons.resources.MoreResources; +import io.airbyte.commons.server.RequestLogger; +import io.airbyte.commons.server.errors.*; import io.airbyte.commons.server.handlers.*; import io.airbyte.commons.server.scheduler.DefaultSynchronousSchedulerClient; import io.airbyte.commons.server.scheduler.EventRunner; @@ -43,7 +45,6 @@ import io.airbyte.persistence.job.errorreporter.JobErrorReportingClientFactory; import io.airbyte.persistence.job.factory.OAuthConfigSupplier; import io.airbyte.persistence.job.tracker.JobTracker; -import io.airbyte.server.errors.*; import io.airbyte.validation.json.JsonSchemaValidator; import io.airbyte.workers.helper.ConnectionHelper; import io.temporal.serviceclient.WorkflowServiceStubs; diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidInputExceptionHandler.java b/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidInputExceptionHandler.java index 6cdc923e3ebf..77d11239d1d5 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidInputExceptionHandler.java +++ b/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidInputExceptionHandler.java @@ -4,9 +4,8 @@ package io.airbyte.server.errors; -import io.airbyte.api.model.generated.InvalidInputExceptionInfo; -import io.airbyte.api.model.generated.InvalidInputProperty; import io.airbyte.commons.json.Jsons; +import io.airbyte.commons.server.errors.InvalidInputExceptionMapper; import io.micronaut.context.annotation.Requires; import io.micronaut.http.HttpRequest; import io.micronaut.http.HttpResponse; @@ -15,11 +14,7 @@ import io.micronaut.http.annotation.Produces; import io.micronaut.http.server.exceptions.ExceptionHandler; import jakarta.inject.Singleton; -import java.util.ArrayList; -import java.util.List; -import javax.validation.ConstraintViolation; import javax.validation.ConstraintViolationException; -import org.apache.logging.log4j.core.util.Throwables; // https://www.baeldung.com/jersey-bean-validation#custom-exception-handler // handles exceptions related to the request body not matching the openapi config. @@ -28,27 +23,10 @@ @Requires(classes = ConstraintViolationException.class) public class InvalidInputExceptionHandler implements ExceptionHandler { - public static InvalidInputExceptionInfo infoFromConstraints(final ConstraintViolationException cve) { - final InvalidInputExceptionInfo exceptionInfo = new InvalidInputExceptionInfo() - .exceptionClassName(cve.getClass().getName()) - .message("Some properties contained invalid input.") - .exceptionStack(Throwables.toStringList(cve)); - - final List props = new ArrayList(); - for (final ConstraintViolation cv : cve.getConstraintViolations()) { - props.add(new InvalidInputProperty() - .propertyPath(cv.getPropertyPath().toString()) - .message(cv.getMessage()) - .invalidValue(cv.getInvalidValue() != null ? cv.getInvalidValue().toString() : "null")); - } - exceptionInfo.validationErrors(props); - return exceptionInfo; - } - @Override public HttpResponse handle(final HttpRequest request, final ConstraintViolationException exception) { return HttpResponse.status(HttpStatus.BAD_REQUEST) - .body(Jsons.serialize(InvalidInputExceptionHandler.infoFromConstraints(exception))) + .body(Jsons.serialize(InvalidInputExceptionMapper.infoFromConstraints(exception))) .contentType(MediaType.APPLICATION_JSON_TYPE); } diff --git a/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidInputExceptionMapper.java b/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidInputExceptionMapper.java deleted file mode 100644 index 4fe9b202265c..000000000000 --- a/airbyte-server/src/main/java/io/airbyte/server/errors/InvalidInputExceptionMapper.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2022 Airbyte, Inc., all rights reserved. - */ - -package io.airbyte.server.errors; - -import io.airbyte.commons.json.Jsons; -import javax.validation.ConstraintViolationException; -import javax.ws.rs.core.Response; -import javax.ws.rs.ext.ExceptionMapper; -import javax.ws.rs.ext.Provider; - -@Provider -public class InvalidInputExceptionMapper implements ExceptionMapper { - - @Override - public Response toResponse(final ConstraintViolationException e) { - return Response.status(Response.Status.BAD_REQUEST) - .entity(Jsons.serialize(InvalidInputExceptionHandler.infoFromConstraints(e))) - .type("application/json") - .build(); - } - -} diff --git a/airbyte-server/src/test/java/io/airbyte/server/RequestLoggerTest.java b/airbyte-server/src/test/java/io/airbyte/server/RequestLoggerTest.java index 46498b4e0b60..0faf150b69c2 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/RequestLoggerTest.java +++ b/airbyte-server/src/test/java/io/airbyte/server/RequestLoggerTest.java @@ -5,6 +5,7 @@ package io.airbyte.server; import io.airbyte.commons.io.IOs; +import io.airbyte.commons.server.RequestLogger; import io.airbyte.config.Configs.WorkerEnvironment; import io.airbyte.config.helpers.LogClientSingleton; import io.airbyte.config.helpers.LogConfigs; From 1868ee10a5ecd41ed951735f76bd3d34ea05cec5 Mon Sep 17 00:00:00 2001 From: benmoriceau Date: Mon, 23 Jan 2023 15:51:30 -0800 Subject: [PATCH 7/8] Move test as well --- .../test/java/io/airbyte/commons}/server/RequestLoggerTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename {airbyte-server/src/test/java/io/airbyte => airbyte-commons-server/src/test/java/io/airbyte/commons}/server/RequestLoggerTest.java (99%) diff --git a/airbyte-server/src/test/java/io/airbyte/server/RequestLoggerTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/RequestLoggerTest.java similarity index 99% rename from airbyte-server/src/test/java/io/airbyte/server/RequestLoggerTest.java rename to airbyte-commons-server/src/test/java/io/airbyte/commons/server/RequestLoggerTest.java index 0faf150b69c2..3ca1c5d23b12 100644 --- a/airbyte-server/src/test/java/io/airbyte/server/RequestLoggerTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/RequestLoggerTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2022 Airbyte, Inc., all rights reserved. */ -package io.airbyte.server; +package io.airbyte.commons.server; import io.airbyte.commons.io.IOs; import io.airbyte.commons.server.RequestLogger; From a10e91975db7e6ac1ed65bbad4cc27d4dfe7b98b Mon Sep 17 00:00:00 2001 From: benmoriceau Date: Mon, 23 Jan 2023 16:17:24 -0800 Subject: [PATCH 8/8] Format --- .../test/java/io/airbyte/commons/server/RequestLoggerTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/airbyte-commons-server/src/test/java/io/airbyte/commons/server/RequestLoggerTest.java b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/RequestLoggerTest.java index 3ca1c5d23b12..042baedd324e 100644 --- a/airbyte-commons-server/src/test/java/io/airbyte/commons/server/RequestLoggerTest.java +++ b/airbyte-commons-server/src/test/java/io/airbyte/commons/server/RequestLoggerTest.java @@ -5,7 +5,6 @@ package io.airbyte.commons.server; import io.airbyte.commons.io.IOs; -import io.airbyte.commons.server.RequestLogger; import io.airbyte.config.Configs.WorkerEnvironment; import io.airbyte.config.helpers.LogClientSingleton; import io.airbyte.config.helpers.LogConfigs;