-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert the server to micronaut (#19194)
* Extract Operation API * Extract scheduler API * Format * extract source api * Extract source definition api * Add path * Extract State API * extract webbackend api * extract webbackend api * extract workspace api * Extract source definition specification api * Remove configuration API * tmp * Checkstyle * tmp * tmp * Inject but don't resolve Bean * tmp * Tmp * fix build * TMP * Tmp * Clean up * better thread pool * Change port to 8080 * Fix port * Rm unused * Cors filter * Format * rename * Tmp * Config based * Rm health controller ref * tmp * Pool size * Mock healthcheck * Revert "Mock healthcheck" This reverts commit 4666776. * Revert "Revert "Mock healthcheck"" This reverts commit 267094a. * Restore health check * Tmp * format * Rm deprecated * Fix PMD * Tmp * Fix proxy test * Remove useless annotation * set auto commit as false * Clean up and PR comments * Bmoric/convert attempt micronaut (#19847) * tmp * Fix build * tmp * Tmp * tmp * tmp * Tmp * tmp * tmp * Clean up * Comments and banner * Non related files * rm tmp * Fix build * Format * Hit the micronaut server directly * micronaut OperationApiController (#20270) * micronaut OperationApiController * pass micronaut client to OperationApi * Bmoric/convert connection micronaut (#20211) * tmp * Fix build * tmp * Tmp * tmp * tmp * Tmp * tmp * tmp * Clean up * tmp * Convert Connection Api Controller * PR Comments * convert openapiapicontroller to micronaut (#20258) * convert openapiapicontroller to micronaut * merge health/openapi locations into one entry * Fix build * Format * Remove media type * Format Co-authored-by: Cole Snodgrass <cole@airbyte.io> * Bmoric/convert destination controller micronaut (#20269) * tmp * Fix build * tmp * Tmp * tmp * tmp * Tmp * tmp * tmp * Clean up * tmp * Convert Connection Api Controller * Tmp * PR Comments * convert openapiapicontroller to micronaut (#20258) * convert openapiapicontroller to micronaut * merge health/openapi locations into one entry * Fix bean * Add JsonSchemaValidator as a Bean * Fix build * Format * Format * Test fix * Pr comments * Remove media type * Format * Remove media type * Format * format * Add missing airbyte api client Co-authored-by: Cole Snodgrass <cole@airbyte.io> * Bmoric/convert destination definition controller micronaut (#20277) * tmp * Fix build * tmp * Tmp * tmp * tmp * Tmp * tmp * tmp * Clean up * tmp * Convert Connection Api Controller * Tmp * PR Comments * convert openapiapicontroller to micronaut (#20258) * convert openapiapicontroller to micronaut * merge health/openapi locations into one entry * Fix bean * Add JsonSchemaValidator as a Bean * Fix build * Format * Format * Test fix * Pr comments * Remove media type * Format * Remove media type * Format * Remove media type * Format * api client * missing annotation * format Co-authored-by: Cole Snodgrass <cole@airbyte.io> * convert StateApiController to Micronaut (#20329) * convert to micronaut * nginx updates * format * Move dest oauth to micronaut (#20318) * tmp * Fix build * tmp * Tmp * tmp * tmp * Tmp * tmp * tmp * Clean up * tmp * Convert Connection Api Controller * PR Comments * convert openapiapicontroller to micronaut (#20258) * convert openapiapicontroller to micronaut * merge health/openapi locations into one entry * Fix build * Format * Remove media type * Format * Move dest oauth to micronaut * Pr comments * format Co-authored-by: Cole Snodgrass <cole@airbyte.io> * Bmoric/convert source micronaut (#20334) * tmp * Fix build * tmp * Tmp * tmp * tmp * Tmp * tmp * tmp * Clean up * tmp * Convert Connection Api Controller * PR Comments * convert openapiapicontroller to micronaut (#20258) * convert openapiapicontroller to micronaut * merge health/openapi locations into one entry * Fix build * Format * Remove media type * Format * Tmp * tmp * Build * missing bean * format Co-authored-by: Cole Snodgrass <cole@airbyte.io> * Migrate to micronaut (#20339) * Migrate source to micronaut * convert SchedulerApiController to Micronaut (#20337) * wip; SchedulerApiController * remove @nAmed * remove @singleton * add back todo message * Bmoric/convert source definition micronaut (#20338) * tmp * Fix build * tmp * Tmp * tmp * tmp * Tmp * tmp * tmp * Clean up * tmp * Convert Connection Api Controller * PR Comments * convert openapiapicontroller to micronaut (#20258) * convert openapiapicontroller to micronaut * merge health/openapi locations into one entry * Fix build * Format * Remove media type * Format * Tmp * tmp * Build * missing bean * Tmp * Add Beans * fix Bean * Add passthrough * Clean up * Missing path * FIx typo * Fix conflicts * for mat Co-authored-by: Cole Snodgrass <cole@airbyte.io> * update SourceOauthApiController to Micronaut (#20386) * convert SourceOauthApiController to Micronaut * remove SourceOauthApi reference * convert WorkspaceApiController to micronaut (#20214) * wip; broken * convert WorkspaceApiController to micronaut * remove test controller * format * format * add @Body to SourceOauthApiController * consolidate nginx settings * remove unnecessary factories * Bmoric/convert jobs micronaut (#20382) * Convert jobs to micronaut * Nit * Format * Bmoric/convert source definition specification micronaut (#20379) * Migrate source definition specifications to micronaut * Format * Format * convert database assert call to Micronaut (#20406) * remove dupe config section; add DatabaseEventListener * move eventlistner to correct package; update implementation * convert NotificationsApiController to Micronaut (#20396) * convert NotificationsApiController to Micronaut * format * Migrate logs to micronaut (#20400) * Bmoric/convert webbackend micronaut (#20403) * Convert jobs to micronaut * Nit * Format * Migrate the webbackend to micronaut * Add missing Bean * Cleanup (#20459) * Cleanup * More cleanup * Disable in order to test cloud * Restore missing files * Fix test * Format and fix pmd * Add transactional * Fix version * Tentative * Cleanup the cleanup * Rm reference to the micronaut server * format * pmd * more pmd * fix build * Delete logs API * Revert "Delete logs API" This reverts commit fcb271d. * Rm flaky test * Format * Try to fix test * Format * Remove optional * Rm import * Test sleep * Simplify injection * update import * Remove sleep * More injection * Remove more requirement * imports * Remove more requirement * Fix yaml * Remove unused conf * Add role * Test acceptance test * Update env * Revert "Update to Micronaut 3.8.0 (#20716)" This reverts commit a28f937. * Update helm chart * Fix helm chart * Convert Application Listener * Format * Add explicit deployment mode * Change check port * Update version and bump version to the right value * Cleanup * Update FE end to end test * Allow head request * Fix controller * Format * Fix http client Bean * Format Co-authored-by: Cole Snodgrass <cole@airbyte.io>
- Loading branch information
1 parent
49bee81
commit 0b153d1
Showing
127 changed files
with
1,585 additions
and
1,578 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
airbyte-server/src/main/java/io/airbyte/server/Application.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* Copyright (c) 2022 Airbyte, Inc., all rights reserved. | ||
*/ | ||
|
||
package io.airbyte.server; | ||
|
||
import io.micronaut.runtime.Micronaut; | ||
|
||
public class Application { | ||
|
||
public static void main(final String[] args) { | ||
Micronaut.run(Application.class, args); | ||
} | ||
|
||
} |
50 changes: 50 additions & 0 deletions
50
airbyte-server/src/main/java/io/airbyte/server/DatabaseEventListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Copyright (c) 2022 Airbyte, Inc., all rights reserved. | ||
*/ | ||
|
||
package io.airbyte.server; | ||
|
||
import io.airbyte.db.check.DatabaseCheckException; | ||
import io.airbyte.db.check.DatabaseMigrationCheck; | ||
import io.micronaut.context.event.ApplicationEventListener; | ||
import io.micronaut.discovery.event.ServiceReadyEvent; | ||
import jakarta.inject.Named; | ||
import jakarta.inject.Singleton; | ||
import java.lang.invoke.MethodHandles; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
@Singleton | ||
public class DatabaseEventListener implements ApplicationEventListener<ServiceReadyEvent> { | ||
|
||
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); | ||
|
||
private final DatabaseMigrationCheck configsMigrationCheck; | ||
|
||
private final DatabaseMigrationCheck jobsMigrationCheck; | ||
|
||
public DatabaseEventListener( | ||
@Named("configsDatabaseMigrationCheck") final DatabaseMigrationCheck configsMigrationCheck, | ||
@Named("jobsDatabaseMigrationCheck") final DatabaseMigrationCheck jobsMigrationCheck) { | ||
this.configsMigrationCheck = configsMigrationCheck; | ||
this.jobsMigrationCheck = jobsMigrationCheck; | ||
} | ||
|
||
@Override | ||
public void onApplicationEvent(final ServiceReadyEvent event) { | ||
log.info("Checking configs database flyway migration version..."); | ||
try { | ||
configsMigrationCheck.check(); | ||
} catch (final DatabaseCheckException e) { | ||
throw new RuntimeException(e); | ||
} | ||
|
||
log.info("Checking jobs database flyway migration version..."); | ||
try { | ||
jobsMigrationCheck.check(); | ||
} catch (final DatabaseCheckException e) { | ||
throw new RuntimeException(e); | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.