1
0
mirror of synced 2026-01-13 00:04:47 -05:00
Commit Graph

83 Commits

Author SHA1 Message Date
Evan Tahler
f9bef16289 Add AllowedHosts to Actor Definitions and Config Database (#21363)
* Add AllowedHosts to actor_definitions and database

* use objects for better null-ness handling

* Tables.ACTOR_DEFINITIO
2023-01-13 21:30:52 +00:00
Jonathan Pearlin
7676af5f5f Migrate airbyte-bootloader to Micronaut (#21073)
* Migrate airbyte-bootloader to Micronaut

* PR feedback

* More PR feedback

* Rename variable for clarity

* Add properties to support cloud

* Formatting

* Use default values for env vars

* Re-organization to support cloud overrides

* Disable conditional logging

* More singleton cleanup

* test: try CI without fluentbit

* Revert "test: try CI without fluentbit"

This reverts commit 8fa0f74106.

* test: enable SSH on EC2 runner

* Revert "test: enable SSH on EC2 runner"

This reverts commit e4867aae09.

* Avoid early database connection on startup

* Fix compile issues from refactor

* Formatting

Co-authored-by: perangel <perangel@gmail.com>
2023-01-12 09:47:25 -05:00
Davin Chia
d98ddbbae7 Implement Progress Bar Persistence Read/Write (#20787)
Implement the persistence layer changes following #19191.

This PR handles writing and reading stats to the new stream stat_table and columns in the existing sync_stats table.

At the same time we introduce upserts of stats records - i.e. merge updates into a single record - in preparation for real time stats updates vs the current approach where a new stat record is always written.

There will be two remaining PRs after this:
- First PR will be to fully wire up and test the API.
- Second PR will be to actually save stats while jobs are running.
2022-12-28 13:47:42 -08:00
andriikorotkov
eecfafd10e Remove NormalizationRunnerFactory (#20245)
* updated IntegrationLauncherConfig.yaml and added to this class suportDBT and normalizationImage fields. Added to the GenerateInputActivityImpl and TemporalClient classes code parts for read destination_definition.yaml and get suportDBT and normalizationImage fields. Added logging and comparing normalization images from NormalizationRunnerFactory and destination_definition.yaml

* updated minor remarks

* updated minor remarks

* fixed minor remarks

* added normalization data to the tests

* fixed minor remarks

* removed NormalizationRunnerFactory

* fixed remarks

* fixed remarks

* fixed remarks

* updated acceptance tests

* updated acceptance tests

* updated check_images_exist.sh script

* updated method for get normalization image name for destination acceptance test

* fixed code style

* fixed code style and removed tests data

* updated JobErrorReporterTest.java

* updated JobErrorReporterTest.java

* fixed remarks

* added integration type field to the dectination_definition file and actor_definition table

* fixed tests

* fixed tests

* fixed minor changes after pulling master changes

* fixed minor changes after pulling master changes

* renamed integrationType to normalizationIntegrationType/ fixed minor remarks

* renamed extra dependencies

* updated docs

* updated docs

* fixed minor remarks

* added NormalizationDestinationDefinitionConfig.yaml for StandardDestinationDefinition.yaml and updated configuration

* updated normalization tag

* updated DestinationAcceptanceTest.java

* updated DestinationAcceptanceTest.java

* updated imports and descriptions
2022-12-15 12:15:34 +02:00
Michael Siega
d7e11b6e3c database migration to add column for field selection info (#20202) 2022-12-08 00:12:50 +01:00
Joey Marshment-Howell
43feaccdcf 🪟🔧 Use workspace-scoped endpoints for connector CRUD (#19221)
* fix button loading state when creating connector

* use workspace scoped endpoints

* get and update methods

* backfill script

* commit new migration file

Co-authored-by: Xiaohan Song <xiaohan@airbyte.io>
2022-11-16 11:08:22 -08:00
Jimmy Ma
c47890d0a5 Exclude connectors with unsupported protocol version from seed updates (#19328)
* Filter out connectors with unsupported protocol in ApplyDefinitionsHelper

* Format

* Remove code dupl
2022-11-15 08:36:27 -08:00
Jimmy Ma
8683bc873c Check protocol version compatibility during a platform update (#19200)
* Refactoring to improve code re-use

* Add ProtocolVersionChecker

* Add an option to configure if we are automatically upgrading connectors

* Add airbyte version check to pass the fresh install case

* Inject DefinitionsProvider in the BootloaderApp

* Remove AutoUpgradeConnector config

* Improve logging

* Use named argument rather than positional

* Make DefinitionsProvider optional

* Format
2022-11-14 10:16:17 -08:00
Davin Chia
8a0d12fc80 Add migrations to support progress bar. (#19191)
Follow up to #18953.

Implement all the DB migrations required for a progress bar.

The main change here is to support saving:

the estimated records/bytes at the sync level
the estimated records/bytes and emitted records/bytes at the stream level
After this, I'll put up a PR for the persistence layer changes, which will writing to and reading from these columns.

Finally, I'll wire this into the API changes, which are currently stubs.

- add the estimated_records and estimated_bytes columns to the SyncStats table.
- create a stream_stats table
  - estimated and emitted records/bytes column
  - contains attempt_id and stream_name columns. Unique constraints on these two columns.
  - foreign key to the attempt_id table.
  - this table hopefully sets us up for the parallel sync work.
2022-11-10 22:35:15 -08:00
perangel
2cb8c984bd Add missing indices for status columns (#19234)
* Add missing indices for `status` columns

* Remove TODO and delete .class files

* Dump schema

* Run gradle format

* Bump database schema version in Bootloader test
2022-11-10 09:21:57 -05:00
andriikorotkov
350d5443a1 Add normalization to destination definition and actor definition table (#18300)
* updated StandardDestinationDefinition.yaml, added normalization and tags to the destination_definition.yaml and added information about normalization and DBT to the ACTOR_DEFINITION table

* updated docs

* updated BootloaderAppTest.java for new migration

* updated schema dump

* Update normalization version and fix bigquery

* Use varchar 255

* Update migration version to the latest

* Update normalized table schema file and add comment

* Revert "Use varchar 255"

This reverts commit e182466e66.

* Use varchar 255

* Add unit test for migration

* Format code

Co-authored-by: Liren Tu <tuliren@gmail.com>
2022-11-04 14:19:50 -07:00
Liren Tu
104c91c519 Fix migration dev center schema dump by run db-specific initialization script (#18984)
* Run db-specific initialization script

* Refactor code

* Use constants

* Add unit test for dev center
2022-11-04 13:28:54 -07:00
Jimmy Ma
74792c1336 Add unsupported_protocol_version column to Connection (#18876) 2022-11-02 16:43:16 -07:00
Charles
87a0a2a27c hide ConfigPersistence inside ConfigRepository to discourage use (#18803) 2022-11-01 16:51:09 -07:00
Charles
20ab047ae0 Remove the bulk actions from ConfigPersistence (#18800) 2022-11-01 16:50:03 -07:00
Charles
c9988c4db8 remove config persistence from seeding logic (#18749) 2022-11-01 16:48:01 -07:00
Charles
ebb912666e Remove ConfigPersistence usage from SecretsMigrator (#18747) 2022-11-01 15:59:29 -07:00
Pedro S. Lopez
908f3949d2 remove usages of YamlSeedConfigPersistence (#17895) 2022-10-13 10:28:40 -04:00
Michael Siega
490f0ca241 Introduce secrets management into workspace persistence (#17851)
* no-op refactor: rename getStandardWorkspace to prepare to introduce secrets

* no-op refactor: rename writeStandardWorkspace to prepare to introduce secrets

* introduce secrets management into workspace persistence
2022-10-12 16:07:57 +02:00
Xiaohan Song
fbead4d7d1 Add a new column in attempts table (#17806)
* migration attempts

* migrator script

* version fix
2022-10-11 11:27:53 -07:00
Parker Mossman
fb9efb378d Add Workspace and Connection Geography Support to API (#17650)
* progress on adding geography throughout api

* fix workspace handler test

* more progress

* implement workspace defaulting and add/update more tests

* fix bootloader tests

* set defaultGeography in missing places

* add Geography column when reading Connection record from DB

* fix pmd

* add more comments/description

* format

* description
2022-10-10 13:34:19 -07:00
Michael Siega
7009bbeb82 db migrations to support new webhook operations (#17671) 2022-10-08 00:04:01 +02:00
Anne
b22a4399c8 Add connection migrations for schema changes (#17651) 2022-10-07 13:28:11 -07:00
terencecho
a7a1c7f916 Create geography_type enum and add geography column in connection and workspace table (#16818)
* init commit of geography_type and column

* add schema dump

* confirm prod database was meant to be changed

* add AUTO to geography

* set default and not nullable, also edit workspace table

* update version number

* update schema dump

Co-authored-by: pmossman <parker@airbyte.io>
2022-10-05 14:39:25 -07:00
Pedro S. Lopez
69f53eb56a airbyte-cron: update connector definitions from remote (#16438)
* add db connection injection to airbyte-cron

* load definitions

* fix patch version check for non-semver tags

* apply helper tests

* logging updates

* fix remote definitions provider: add tombstones

* docker compose env updates

* add test for tombstone presence

* rename helper class

* config updates

* dont use optionals as fields

* use apply helper instead of directly calling load data in bootloader

* avoid pmd warn

* add docstring

* sort docker compose env vars

* updates for javax -> jakarta

* clean up docker compose, update kube deployment env
2022-10-05 17:21:37 -04:00
Charles
1e2f701fe7 remove import / export handler (#16403) 2022-09-29 16:24:49 -07:00
Jimmy Ma
4974855b41 Track protocol version support range (#17366)
* Add Airbyte Protocol Range configs

* Refactor metadata read/write

* Add ProtocolVersion Min/Max get/set to JobsPersistence

* Store the supported protocol version range in airbyte_metadata

* Use defaults in EnvConfigs instead of .env
2022-09-29 09:43:16 -07:00
Cole Snodgrass
c6519430da move job persistence code out of airbyte-scheduler (#16831)
* wip for moving scheduler-persistence to airbyte-persistence

* move main/resources

* move settings include to match existing includes

* fix incorrect import paths

* fix import order
2022-09-20 13:37:35 -07:00
Anne
e462f695a2 Normalization Summaries table and read/write methods (#16655)
* Add migration to create normalization summaries table
- read/write methods for normalization summary
2022-09-14 14:47:05 -07:00
Anne
3fc673090d Populate and read from SyncStats table (#16476)
- Populate sync stats table when job is complete
- Method to read from sync stats table
2022-09-08 22:33:29 -07:00
Anne
4ef54ad62f Sync stats migration (#16285)
* Sync stats migration
2022-09-07 12:07:56 -07:00
Pedro S. Lopez
d83abd6672 Remove foreign key constraint for actor_definition_id in actor_oauth_param (#16118)
* add migration

* fmt

* test migration

* update expected migration version

* update schema

* allow specifying a target migration version for the baseline

* run previous migrations in test

* fix pmd

* update migration version
2022-09-01 13:38:30 -04:00
Anne
827e7a55ac Add protocol version migration (#16145)
* Add protocol version migration
2022-08-31 16:01:24 -07:00
Anne
e9afa9bef3 Error Prone PMD rules (#15010)
* Implement ErrorProne PMD rules:
AssignmentInOperand
AvoidAccessibilityAlteration
AvoidBranchingStatementAsLastInLoop
AvoidCatchingNPE
AvoidCatchingThrowable
AvoidDuplicateLiterals rule
2022-08-09 15:30:48 -07:00
Anne
76f9fbaa54 Apply more Best Practices PMD rules (#14772)
* implement PMD rules: 
* AbstractClassWithoutAbstractMethod
* ArrayIsStoredDirectly
* AvoidPrintStackTrace, AvoidReassigningLoopVariables, AvoidReassigningParameters, AvoidUsingHardCodedIP and CheckResultSet
* DoubleBraceInitialization
* MissingOverride
* ForLoopCanBeForeach
*JUnitTest rules
2022-07-20 14:28:47 -07:00
Anne
e698710118 Apply Best Practices PMD rules (#14753)
* Apply Unused* Best Practices PMD rules
2022-07-15 15:01:04 -07:00
Jimmy Ma
a600f6ae47 Migrate StateDB to support per stream states (#13731)
* Update StateDB to support per Stream states.
* Add `StateType` type
* Add `steam_name`, `namespace` and `type` to `state` table.
* Set the default StateType to LEGACY
2022-06-14 14:27:38 -07: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
Jonathan Pearlin
568057ab62 Prepare YamlSeedConfigPersistence for dependency injection (#13384) 2022-06-03 08:47:49 -04:00
Anne
2714ee0af8 Create stream resets table (#13237)
* Add stream resets migration
2022-06-01 19:23:15 -07: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
Alexandre Girard
3894134d11 Bump year in license short to 2022 (#13191)
* Bump to 2022

* format
2022-05-25 17:56:49 -07:00
Topher Lubaway
f106642cd2 Adds schedule_data json column (#13039)
* Adds schedule_data json column

updates the version test thingy
schema dumped

* adds schema dump

* formatting
2022-05-20 07:57:08 -05:00
Topher Lubaway
3aca043d01 Adds a new string cloumn to configs for cron (#12416)
* Adds a new string cloumn to configs for cron

closes #11418
i'm new to this task in Java please be brutal

* Adds airbyte header

* WIP

* Rebase a week of commits

* WIP for davin

* deps update

* Reorganize code for better readability. Also add a schema.

* Update tests.

* Correct bad test.

* Adds note for testing version change

* formatting change

Co-authored-by: Davin Chia <davinchia@gmail.com>
2022-05-18 09:03:32 -05: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
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
Benoit Moriceau
b480440e26 Clean up (#12682) 2022-05-06 13:18:53 -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
Benoit Moriceau
07359ffd77 Migrate secret from a non secret store to a secret store (#12088)
Introduce a migration to a secret manager

If a secret manager is specify, it will go though all the config, save the secret in the configured secret store. If the secret is already in a store, it will not migrate the secret to the secret store.
2022-05-04 16:40:33 -07:00
Subodh Kant Chaturvedi
367b863ed2 implement migration to create workspace_service_account table (#11943)
* implement migration to create workspace_service_account table

* make all columns non nullable

* introduce persistence code for service account table (#11944)

* implement persistence code for workspace_service_account table

* update yaml

* implement secret handling for workspace_service_account table (#11946)

* implement secret handling for workspace_service_account table

* add new line to the mock json

* get rid of file

* address review comments

* update method name and add comment
2022-04-26 19:49:50 +05:30