1
0
mirror of synced 2026-01-06 06:04:16 -05:00
Commit Graph

433 Commits

Author SHA1 Message Date
Lake Mossman
3bab4c9d1b Persist state to reset connection job config (#13867)
* add current connection state to JobResetConnectionConfig

* pass state from reset connection config to job sync config in generate input activity

* format
2022-06-16 17:49:14 -07:00
Lake Mossman
e7f8128111 Save streams to reset in job config when creating reset job (#13703)
* save streams to reset in job config when creating reset job

* change streamDescriptors to streamsToReset
2022-06-13 13:57:14 -07:00
Jonathan Pearlin
2b31011bce Separate platform and connector testcontainer versions (#13642)
* Separate platform and connector testcontainer versions

* Fix dependency

* Fix dependency

* Fix dependency usage

* Prevent leaking testcontainer dependencies
2022-06-10 09:34:31 -04:00
Lake Mossman
73034c64da Sweep old scheduler code (#13400)
* sweep all scheduler application code and new-scheduler conditional logic

* remove airbyte-scheduler from deployments and docs

* format

* remove 'v2' from github actions

* add back scheduler in delete deployment command

* remove scheduler parameters from helm chart values

* add back job cleaner + test and add comment

* remove now-unused env vars from code and docs

* format

* remove feature flags from web backend connection handler as it is no longer needed

* remove feature flags from config api as it is now longer needed

* remove feature flags input from config api test

* format + shorter url

* remove scheduler parameters from helm chart readme
2022-06-06 10:49:17 -07:00
Octavia Squidington III
0aa21ddb87 Bump Airbyte version from 0.39.10-alpha to 0.39.11-alpha (#13490)
Co-authored-by: davinchia <davinchia@users.noreply.github.com>
2022-06-06 19:21:52 +08:00
Davin Chia
7788594e22 Start publishing proper artifacts. (#13484)
## What
Finale of https://github.com/airbytehq/airbyte/pull/13122.

We've renamed all directories in previous PRs. Here we remove the fat jar configuration and add publishing to all subprojects.

Explanation for what is happening:

Identically named subprojects have the following issues:
* publishing as is leads to classpath confusion when the jars with the same names are placed in the Java distribution. This leads to NoClassDefFound errors on runtime.
* deconflicting the jar names without changing directory names leads to dependency errors as the OSS jar pom files are generated using project dependencies (suggesting a dependency a sibling subproject in the same repo) that use subprojects group and name as a reference. This means the generated jars look for Jars that do not exists (as their names have been changed) and cannot compile.
* the workaround to changing a subproject's name involves resetting the subproject's name in the settings.gradle and depending on the new name in each build.gradle. This increases configuration burden and decreases the ease of reading, since one will have to check the settings.gradle to know what the right subproject name is. See https://github.com/gradle/gradle/issues/847 for more info.
* given that Gradle itself doesn't have support for identically named subprojects (see the linked issue), the simplest solution is to not allow duplicated directories. I've only renamed conflicting directories here to keep things simple. I will create a follow up issues to enforce non-identical subproject names in our builds.

## How
* Remove fat jar configuration.
* Add publishing to all subprojects.
2022-06-06 17:15:25 +08:00
Davin Chia
e9a94396e5 Fat Jar: Rename Dir Part 3 (#13480)
## What
Part 3 of https://github.com/airbytehq/airbyte/pull/13122.
Follow up to #13478  .

Explanation for what is happening:

Identically named subprojects have the following issues:

* publishing as is leads to classpath confusion when the jars with the same names are placed in the Java distribution. This leads to NoClassDefFound errors on runtime.
* deconflicting the jar names without changing directory names leads to dependency errors as the OSS jar pom files are generated using project dependencies (suggesting a dependency a sibling subproject in the same repo) that use subprojects group and name as a reference. This means the generated jars look for Jars that do not exists (as their names have been changed) and cannot compile.
* the workaround to changing a subproject's name involves resetting the subproject's name in the settings.gradle and depending on the new name in each build.gradle. This increases configuration burden and decreases the ease of reading, since one will have to check the settings.gradle to know what the right subproject name is. See https://github.com/gradle/gradle/issues/847 for more info.
* given that Gradle itself doesn't have support for identically named subprojects (see the linked issue), the simplest solution is to not allow duplicated directories. I've only renamed conflicting directories here to keep things simple. I will create a follow up issues to enforce non-identical subproject names in our builds.

## How
Rename airbyte-scheduler:models to airbyte-scheduler:scheduler-models.
Rename airbyte-scheduler:persistence to airbyte-scheduler:scheduler-persistence.
2022-06-06 03:13:36 +08:00
Davin Chia
eb99f47746 Fat Jar: Rename Dir Part 2 (#13478)
## What
Part 2 of https://github.com/airbytehq/airbyte/pull/13122.

Follow up to #13476 .

Explanation for what is happening:

Identically named subprojects have the following issues:

* publishing as is leads to classpath confusion when the jars with the same names are placed in the Java distribution. This leads to NoClassDefFound errors on runtime.
* deconflicting the jar names without changing directory names leads to dependency errors as the OSS jar pom files are generated using project dependencies (suggesting a dependency a sibling subproject in the same repo) that use subprojects group and name as a reference. This means the generated jars look for Jars that do not exists (as their names have been changed) and cannot compile.
* the workaround to changing a subproject's name involves resetting the subproject's name in the settings.gradle and depending on the new name in each build.gradle. This increases configuration burden and decreases the ease of reading, since one will have to check the settings.gradle to know what the right subproject name is. See https://github.com/gradle/gradle/issues/847 for more info.
* given that Gradle itself doesn't have support for identically named subprojects (see the linked issue), the simplest solution is to not allow duplicated directories. I've only renamed conflicting directories here to keep things simple. I will create a follow up issues to enforce non-identical subproject names in our builds.

* Rename airbyte-config:models to airbyte-config:config-models.
* Rename airbyte-config:persistence to airbyte-config:config-persistence.
2022-06-06 02:21:54 +08:00
Davin Chia
83a89aa843 Fat Jar: Rename Dir Part 1 (#13476)
Part 1 of #13122.

Rename airbyte-db:lib to airbyte-db:db-lib.
Rename airbyte-metrics:lib to airbyte-metrics:metrics-lib
Rename airbyte-protocol:models to airbyte-protocol:protocol-models.

Explanation for what is happening:

Identically named subprojects have the following issues:
- publishing as is leads to classpath confusion when the jars with the same names are placed in the Java distribution. This leads to NoClassDefFound errors on runtime.
- deconflicting the jar names without changing directory names leads to dependency errors as the OSS jar pom files are generated using project dependencies (suggesting a dependency a sibling subproject in the same repo) that use subprojects group and name as a reference. This means the generated jars look for Jars that do not exists (as their names have been changed) and cannot compile.
- the workaround to changing a subproject's name involves resetting the subproject's name in the settings.gradle and depending on the new name in each build.gradle. This increases configuration burden and decreases the ease of reading, since one will have to check the settings.gradle to know what the right subproject name is. See Projects with same name lead to unintended conflict resolution gradle/gradle#847 for more info.
- given that Gradle itself doesn't have support for identically named subprojects (see the linked issue), the simplest solution is to not allow duplicated directories. I've only renamed conflicting directories here to keep things simple. I will create a follow up issues to enforce non-identical subproject names in our builds.
2022-06-06 00:35:43 +08:00
Octavia Squidington III
12f51b7d4f Bump Airbyte version from 0.39.9-alpha to 0.39.10-alpha (#13470)
Co-authored-by: alovew <alovew@users.noreply.github.com>
2022-06-03 17:13:19 -07:00
Octavia Squidington III
ac01bd383d Bump Airbyte version from 0.39.8-alpha to 0.39.9-alpha (#13454)
Co-authored-by: girarda <girarda@users.noreply.github.com>
2022-06-03 10:14:28 -07:00
Octavia Squidington III
39de3318e5 Bump Airbyte version from 0.39.7-alpha to 0.39.8-alpha (#13402)
* Bump Airbyte version from 0.39.7-alpha to 0.39.8-alpha

* update date

* format

Co-authored-by: girarda <girarda@users.noreply.github.com>
Co-authored-by: Alexandre Girard <alexandre@airbyte.io>
2022-06-02 06:26:44 -07:00
Octavia Squidington III
8e173e6e96 Bump Airbyte version from 0.39.6-alpha to 0.39.7-alpha (#13358)
Co-authored-by: alovew <alovew@users.noreply.github.com>
2022-05-31 18:20:06 -07:00
Lake Mossman
fcbffe0495 Implement job state machine validations (#13213)
* add job state machine validations to persistence and tests

* update state machine diagram

* format

* remove terminal state transitions

* fail attempt before cancelling job, to respect job state machine

* update job status state machine diagram

* verify order of db calls
2022-05-31 17:21:20 -07:00
Octavia Squidington III
417bdc1cb2 Bump Airbyte version from 0.39.5-alpha to 0.39.6-alpha (#13350)
Co-authored-by: git-phu <git-phu@users.noreply.github.com>
2022-05-31 13:44:46 -07:00
Octavia Squidington III
3d9a972d28 Bump Airbyte version from 0.39.4-alpha to 0.39.5-alpha (#13288)
Co-authored-by: jdpgrailsdev <jdpgrailsdev@users.noreply.github.com>
2022-05-27 14:34:55 -04:00
Octavia Squidington III
85eb7483d1 Bump Airbyte version from 0.39.3-alpha to 0.39.4-alpha (#13279)
Co-authored-by: jdpgrailsdev <jdpgrailsdev@users.noreply.github.com>
2022-05-27 11:25:07 -04:00
Jonathan Pearlin
e06a9de60f Use Database Availability/Initialization Check (#13178)
* Use isolated database initialization logic

* Address PMD warnings

* Use test provider where possible

* Initialize database on bootloader load

* Combine availability and migration checks

* Ensure env vars are set

* Fix typo

* Avoid duplicate literals

* Add log message

* Use correct data source

* Revert change

* Update copyright

* Remove redundant exception catch/throw
2022-05-27 09:47:33 -04:00
Octavia Squidington III
296b5c588a Bump Airbyte version from 0.39.2-alpha to 0.39.3-alpha (#13239)
Co-authored-by: jdpgrailsdev <jdpgrailsdev@users.noreply.github.com>
2022-05-26 16:48:58 -04:00
Jonathan Pearlin
880c759cac Use "generated" in generated code package names (#13183) 2022-05-26 11:11:23 -04:00
mkhokh-33
d789efa103 Platform build fails due to test DefaultJobPersistenceTest.ListJobStatusAndTimestampWithConnection#testTimestampFiltering (#13193)
* comment assert for DefaultJobPersistenceTest.ListJobStatusAndTimestampWithConnection#testTimestampFiltering in order to fix platform build

* fix formatting
2022-05-26 13:53:33 +03:00
Alexandre Girard
3894134d11 Bump year in license short to 2022 (#13191)
* Bump to 2022

* format
2022-05-25 17:56:49 -07:00
Octavia Squidington III
ddf529cb78 Bump Airbyte version from 0.39.1-alpha to 0.39.2-alpha (#13188)
Co-authored-by: brianjlai <brianjlai@users.noreply.github.com>
2022-05-25 18:48:09 -04:00
Octavia Squidington III
fa62e689e5 Bump Airbyte version from 0.39.0-alpha to 0.39.1-alpha (#13067)
Co-authored-by: tealjulia <tealjulia@users.noreply.github.com>
2022-05-20 17:50:57 -04:00
Octavia Squidington III
06ad66c2f5 Bump Airbyte version from 0.38.4-alpha to 0.39.0-alpha (#13065)
Co-authored-by: lmossman <lmossman@users.noreply.github.com>
2022-05-20 13:12:57 -07:00
Davin Chia
6b7640c823 Reorganise Worker Module. (#12950)
I was reading this code when I realised this module is gradually developing into a sprawl. Reorganise to make this more readable and clarify certain operations.

A less-urgent follow up step here is to pull all process related code out of this module and combine it with the container-orchestrator module to achieve a clear split between 'job execution code' and 'process abstraction code'.

- Move all the worker implementations from top-level into the io.airbyte.workers.general package. Leave normalization related code in the normalization package as this is actually a special case of the dbt worker and should be deprecated once we implement general DBT support.
- Move all exceptions into an exceptions package.
- With this change, top level code in the airbyte workers module is now all interfaces + worker app set up code.
- Rename io.airbyte.workers.protocols.airbyte to io.airbyte.workers.internal to better represent this subpackage contains interfaces/implementations internal to the workers. Protocol is confusing since it implies some relation to the general airbyte protocol.
- Rename io.airbyte.workers.worker_run to io.airbyte.workers.run for conciseness.
- Merge io.airbyte.workers.test_helper to io.airbyte.workers.helper. Only a single class was present here.
2022-05-19 23:17:55 +08:00
Lake Mossman
26ed3856e1 Migrate OSS to temporal scheduler (#12757)
* Migrate OSS to temporal scheduler

* add comment about migration being performed in server

* add comments about removing migration logic

* formatting and add tests for migration logic

* rm duplicated test

* remove more duplicated build task

* remove retry

* disable acceptance tests that call temporal directly when on kube

* set NEW_SCHEDULER and CONTAINER_ORCHESTRATOR_ENABLED env vars to true to be consistent

* set default value of container orchestrator enabled to true

* Revert "set default value of container orchestrator enabled to true"

This reverts commit 21b36703a9.

* Revert "set NEW_SCHEDULER and CONTAINER_ORCHESTRATOR_ENABLED env vars to true to be consistent"

This reverts commit 6dd2ec04a2.

* Revert "Revert "set NEW_SCHEDULER and CONTAINER_ORCHESTRATOR_ENABLED env vars to true to be consistent""

This reverts commit 2f40f9da50.

* Revert "Revert "set default value of container orchestrator enabled to true""

This reverts commit 26068d5b31.

* fix sync workflow test

* remove defunct cancellation tests due to internal temporal error

* format - remove unused imports

* revert changes that set container orchestrator enabled to true everywhere

* remove NEW_SCHEDULER feature flag from .env files, and set CONTAINER_ORCHESTRATOR_ENABLED flag to true for kube .env files

Co-authored-by: Benoit Moriceau <benoit@airbyte.io>
2022-05-18 17:05:42 -07:00
Edward Gao
abc038e7be JobTracker reports enum values (#12885) 2022-05-17 07:33:42 -07:00
Octavia Squidington III
ec8c8c6438 Bump Airbyte version from 0.38.3-alpha to 0.38.4-alpha (#12897)
Co-authored-by: alovew <alovew@users.noreply.github.com>
2022-05-16 18:41:51 -07:00
Jonathan Pearlin
fdaf335279 Better database connection handling for connectors (#12743)
* Better database connection handling for connectors

* Log connection error

* Properly close connection

* Remove unused method

* Close data source

* Use utility to close data source

* Use utility to close data source

* PR feedback

* Add Databricks driver

* Use driver class enum

* Use correct config

* Ensure config created before use

* Fix failing integration test

* Create DSLContext before use

* Address integration test failures

* Ensure DSLContext is closed

* Fix compile error

* Use correct datasource

* Use correct connection properties

* Close DSLContext

* Close DSLContext

* Fix integration test failures

* Properly close datasource

* Fix compilation issues

* Use existing database object

* Wrap close in try/finally

* Update test

* Wrap close in try/finally

* Ensure DSLContext is created

* Revert change to test

* Use correct data source

* Remove unused import

* More cleanup

* Add missing annotation

* Only initialize data source once

* Remove unused import

* Force testcontainers version

* Fix testcontainer issue

* Fix failing test

* Properly close all data sources

* Clear data sources after closing

* Fix compile error

* Fix compilation error

* Add missing method
2022-05-13 16:28:38 -04:00
Octavia Squidington III
0bb3e3b6a3 Bump Airbyte version from 0.38.2-alpha to 0.38.3-alpha (#12839)
Co-authored-by: timroes <timroes@users.noreply.github.com>
2022-05-13 14:35:56 +02:00
Lake Mossman
e8084c0189 Repair temporal state when performing manual actions (#12289)
* Repair temporal state when performing manual actions

* refactor temporal client and fix tests

* add unreachable workflow exception

* format

* test repeated deletion

* add acceptance tests for automatic workflow repair

* rename and DRY up manual operation methods in SchedulerHandler

* refactor temporal client to batch signal and start requests together in repair case

* add comment

* remove main method

* fix job id fetching

* only overwrite workflowState if reset flags are true on input

* fix test

* fix cancel endpoint

* Clean job state before creating new jobs in connection manager workflow (#12589)

* first working iteration of cleaning job state on first workflow run

* second iteration, with tests

* undo local testing changes

* move method

* add comment explaining placement of clean job state logic

* change connection_workflow failure origin value to platform

* remove cast from new query

* create static var for non terminal job statuses

* change failure origin value to airbyte_platform

* tweak external message wording

* remove unused variable

* reword external message

* fix merge conflict

* remove log lines

* move cleaning job state to beginning of workflow

* do not clean job state if there is already a job id for this workflow, and add test

* see if sleeping fixes test on CI

* add repeated test annotation to protect from flakiness

* fail jobs before creating new ones to protect from quarantined state

* update external message for cleaning job state error
2022-05-12 17:43:19 -07:00
Peter Hu
c69423b212 Parameterize jdk and nginx base images for better M1 support (#11262)
currently on m1 macs, switching between building for arm vs amd64
architectures is a bit cumbersome because some of the base docker images
have not been parameterized yet, so you will run into build errors unless
you untag those base images every time you switch between architectures.

This PR should allow you switch freely between the two without needing
that manual step.

This PR also adds a single env var BUILD_ARCH that can be used to
switch between building for arm vs amd64.

With this PR we can build and push images for individual platform components
which is much faster than trying to redeploy everything when iterating on
changes that are limited to only a few components.

Ideally we'd have a github action that allowed us to deploy individual platform
components, but until that exists this seems like a reasonable solution for faster
iteration.
2022-05-12 17:36:13 +08:00
Octavia Squidington III
ffd4a01f3e Bump Airbyte version from 0.38.1-alpha to 0.38.2-alpha (#12789)
Co-authored-by: a-honcharenko <a-honcharenko@users.noreply.github.com>
2022-05-11 22:50:26 +03:00
Octavia Squidington III
7c4bebff18 Bump Airbyte version from 0.38.0-alpha to 0.38.1-alpha (#12724)
Co-authored-by: alafanechere <alafanechere@users.noreply.github.com>
2022-05-10 10:39:46 +02:00
Octavia Squidington III
559b6389ba Bump Airbyte version from 0.37.1-alpha to 0.38.0-alpha (#12707)
Co-authored-by: jdpgrailsdev <jdpgrailsdev@users.noreply.github.com>
2022-05-09 16:12:17 -04:00
Jonathan Pearlin
ebb9f3e1ac Prepare Database Access Layer for Dependency Injection (#12546)
* Prepare database access objects for dependency injection

* Replace duplicate code

* Remove unused imports

* Remove redundant validation call

* Remove unused imports

* Use constants

* Disable fast fail during connection pool initialization

* Remove typo

* Add missing test dependency

* Add missing test dependency

* Add missing test dependency

* Fix issue caused by rebase

* Add method for cloud

* Autoclose DSL context during migration

* Better connection close handling

* Fix typo in dependency

* Fix SpotBugs issue

* React to rebase

* Fix typo

* Update JavaDoc

* Fix database close calls

* Pass configs to getServer

* Fix typo

* Fix call to removed method

* Fix typo

* Use catalog to manage versions

* PR feedback

* Centralize shutdown hook

* Fix rebase issues

* Document test cases

* Document test cases

* Formatting

* Properly close database resources

* Rebase cleanup
2022-05-09 15:26:54 -04:00
Octavia Squidington III
b9b75f387e Bump Airbyte version from 0.37.0-alpha to 0.37.1-alpha (#12703)
Co-authored-by: terencecho <terencecho@users.noreply.github.com>
2022-05-09 12:01:54 -04:00
terencecho
4ff17abcd5 Use different CustomerIO templates and edit slack notifs (#12674)
* Use different CustomerIO templates and edit slack notifs

* fix unit test

* fix file naming and comments
2022-05-09 10:28:49 -04:00
Octavia Squidington III
7024731056 Bump Airbyte version from 0.36.11-alpha to 0.37.0-alpha (#12683)
Co-authored-by: benmoriceau <benmoriceau@users.noreply.github.com>
2022-05-06 14:06:14 -07:00
Benoit Moriceau
455decc018 Migrate to a secret store by default (#12516)
This is adding a metadata entry in order to make the use of the DB secret store to be the default one.
It will avoid having secret outside of the secret table.
2022-05-06 12:45:13 -07:00
Octavia Squidington III
38af10d3b4 Bump Airbyte version from 0.36.10-alpha to 0.36.11-alpha (#12639)
Co-authored-by: pmossman <pmossman@users.noreply.github.com>
2022-05-05 19:37:49 -07:00
Octavia Squidington III
1e2c04f192 Bump Airbyte version from 0.36.9-alpha to 0.36.10-alpha (#12626)
Co-authored-by: sherifnada <sherifnada@users.noreply.github.com>
2022-05-05 13:15:01 -07:00
Octavia Squidington III
6c2cc80b16 Bump Airbyte version from 0.36.8-alpha to 0.36.9-alpha (#12585)
Co-authored-by: timroes <timroes@users.noreply.github.com>
2022-05-04 23:01:55 +02:00
Octavia Squidington III
6f927fc628 Bump Airbyte version from 0.36.7-alpha to 0.36.8-alpha (#12553)
Co-authored-by: girarda <girarda@users.noreply.github.com>
2022-05-03 20:54:25 -07:00
Octavia Squidington III
b22ae4f161 Bump Airbyte version from 0.36.6-alpha to 0.36.7-alpha (#12535)
Co-authored-by: davinchia <davinchia@users.noreply.github.com>
2022-05-03 23:08:36 +08:00
Octavia Squidington III
f6791b854f Bump Airbyte version from 0.36.5-alpha to 0.36.6-alpha (#12485)
Co-authored-by: girarda <girarda@users.noreply.github.com>
2022-04-29 17:28:39 -07:00
Octavia Squidington III
e3bcbc86ca Bump Airbyte version from 0.36.4-alpha to 0.36.5-alpha (#12448)
Co-authored-by: brianjlai <brianjlai@users.noreply.github.com>
2022-04-28 14:00:43 -07:00
Octavia Squidington III
9ee1f791ac Bump Airbyte version from 0.36.3-alpha to 0.36.4-alpha (#12415)
Co-authored-by: terencecho <terencecho@users.noreply.github.com>
2022-04-27 13:59:59 -07:00
Octavia Squidington III
a5b4644a2e Bump Airbyte version from 0.36.2-alpha to 0.36.3-alpha (#12306)
Co-authored-by: Phlair <Phlair@users.noreply.github.com>
2022-04-25 15:02:27 +01:00