1
0
mirror of synced 2026-01-20 03:07:18 -05:00
Commit Graph

36 Commits

Author SHA1 Message Date
Charles
9415eb55cb add attempt metrics (#21286) 2023-01-17 16:13:06 -08:00
Jimmy Ma
0a71b019b5 Add records committed to job stats (#21364) 2023-01-12 17:51:51 -08:00
Benoit Moriceau
9adb63cc0b Revert "Revert Convert the server to micronaut" (#21133)
* Revert "Revert "Convert the server to micronaut (#19194)" (#21132)"

This reverts commit 31c65f8eea.

* Fix the cors

* Fix cloud
2023-01-09 10:52:19 -08:00
Davin Chia
f3ec113036 Remerge Progress Bar Read API. (#21124)
Let's try #20937 again, this time with better test for error cases.

See original PR for description.

This PR adds testing and logic to handle empty/bad job input.
2023-01-06 14:19:41 -08:00
Benoit Moriceau
31c65f8eea Revert "Convert the server to micronaut (#19194)" (#21132)
This reverts commit 0b153d11f9.
2023-01-06 15:08:22 -06:00
Benoit Moriceau
0b153d11f9 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 466677636b.

* Revert "Revert "Mock healthcheck""

This reverts commit 267094ae14.

* 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 fcb271dcdf.

* 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 a28f93747f.

* 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>
2023-01-06 11:04:03 -08:00
Pedro S. Lopez
2a3817748a feat(Platform): update actor configuration when receiving control messages from connectors during sync (#19811)
* track latest config message

* pass new config as part of outputs

* persist new config

* persist config as the messages come through, dont set output

* clean up old implementation

* accept control messages for destinations

* get api client from micronaut

* mask instance-wide oauth params when updating configs

* defaultreplicationworker tests

* formatting

* tests for source/destination handlers

* rm todo

* refactor test a bit to fix pmd

* fix pmd

* fix test

* add PersistConfigHelperTest

* update message tracker comment

* fix pmd

* format

* move ApiClientBeanFactory to commons-worker, use in container-orchestrator

* pull out config updating to separate methods

* add jitter

* rename PersistConfigHelper -> UpdateConnectorConfigHelper, docs

* fix exception type

* fmt

* move message type check into runnable

* formatting

* pass api client env vars to container orchestrator

* pass micronaut envs to container orchestrator

* print stacktrace for debugging

* different api host for container orchestrator

* fix default env var

* format

* fix errors after merge

* set source and destination actor id as part of the sync input

* fix: get destination definition

* fix null ptr

* remove "actor" from naming

* fix missing change from rename

* revert ContainerOrchestratorConfigBeanFactory changes

* inject sourceapi/destinationapi directly rather than airbyteapiclient

* UpdateConnectorConfigHelper -> ConnectorConfigUpdater

* rm log

* fix test

* dont fail on config update error

* pass id, not full config to runnables/accept control message

* add new config required for api client

* add test file

* fix test compatibility

* mount data plane credentials secret to container orchestrator (#20724)

* mount data plane credentials secret to container orchestrator

* rm copy-pasta

* properly handle empty strings

* set env vars like before

* use the right config vars
2023-01-06 13:17:25 -04:00
Topher Lubaway
ef335e283f Revert "Progress Bar Read APIs (#20937)" (#21115)
Breaks when there is no config present
https://github.com/airbytehq/airbyte/issues/21112
This reverts commit 3a2b0405c4.
2023-01-06 10:09:31 -06:00
Davin Chia
3a2b0405c4 Progress Bar Read APIs (#20937)
Follow up PR to #20787 . Make stats available to the read apis so these are available to the webapp.

After this, all that is left is writing these stats as the job progresses.

Add the required logic in JobHistoryHandler.java.

Took the chance to also rename our internal Attempt models field from id to attemptNumber to better reflect that the field stores not the row's database id, but the job's attempt number. Most of the files changes here are due to that rename.
2023-01-05 16:32:19 -08:00
Michael Siega
6130a54795 pass workspace id to sync workflow and use it to selectively enable field selection (#20589)
* pass workspace id to sync workflow and use it to selectively enable field selection

* fix tests around workspace id in job creation

* make sure field selection environment variables get passed through properly

* clean up handling around field selection flags

* debug logging for field selection

* properly handle empty field selection feature flag

* fix pmd

* actually fix pmd
2023-01-03 23:30:35 +00: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
Xiaohan Song
fd8b83d226 Add custom connector flag for reset job (#20205)
* kubeprocessfactory flag

* plumbing through custom connector bit

* config, style, pmd

* fix more missing configs pass along

* fix sync config

* test fix

* add a flag to specify if we want to use a separate pool or not

* add missing micronaut configs

* make orchestrator job to run in custom pool too

* micronaut fix

* pass config to orchestrator

* fix test

* destination test fix

* PR comments fix

* style fix

* comment fix

* no checks on kubeprocess

* rename

* add flags for reset work

* test fix
2022-12-07 14:25:05 -08:00
Xiaohan Song
72c0b9bbaa Use a separate node pool to run custom connector jobs (#19770)
* kubeprocessfactory flag

* plumbing through custom connector bit

* config, style, pmd

* fix more missing configs pass along

* fix sync config

* test fix

* add a flag to specify if we want to use a separate pool or not

* add missing micronaut configs

* make orchestrator job to run in custom pool too

* micronaut fix

* pass config to orchestrator

* fix test

* destination test fix

* PR comments fix

* style fix

* comment fix

* no checks on kubeprocess

* rename
2022-12-06 16:43:03 -08:00
Anne
2b045a9ee1 refresh before syncs when feature flag is on (#19888)
* refresh before syncs when feature flag is on
2022-12-05 18:46:07 -08:00
Jonathan Pearlin
201df24f4d Enable PMD rule to prevent == string comparisons (#20080) 2022-12-05 12:54:36 -05: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
Davin Chia
e5c3f4bd0d Remove unused job persistence methods. (#18952)
Closes #12823.

Also remove unused dump methods.
2022-11-04 11:29:43 -07:00
Jonathan Pearlin
c8a7cb333b Handle null JobSyncConfig (#18969)
* Handle null JobSyncConfig

* Add unit test

* Fix PMD warning

* Do not update jobs in terminal state

* Fix failing tests

* Fix compile error
2022-11-04 12:51:29 -04:00
Davin Chia
aaeec26de3 Job Persistence Refactor in preparation for progress bar. (#18891)
Some refactoring in preparation for the progress bar persistence changes.

The main change here was to simplify some of the JobPersistence methods by moving the logic to calculate attemptId into the JobPersistence implementation. This logic currently sits outside the class and is duplicated in multiple places. We could expose a helper method to calculate this logic, however that felt unnecessary at this point.

The alternative is further duplicating this logic as the progress bar logic is implemented, so I want to get that out of the way.

The other reason it's cleaner to use jobId and attemptNumber is these concepts/terms are more familiar throughout the rest of the codebase and it feels more intuitive to continue speaking this language (in my opinion).

Some random bits I wanted to clean up on the way as well. I will leave comments in the files as appropriate.
2022-11-03 14:40:16 -07:00
Davin Chia
d0521e7f33 Simplify the job persistence method. (#18698)
Method interface:
- has generic type that isn't needed. Confusing because no generic is happening here.
- has two existing parameters that are data fields of one of the already existing parameters. Confusing since the two additional parameters aren't actually supposed to be passed in separately from the existing parameter.

Remove both.
2022-10-31 08:40:23 -07:00
Jimmy Ma
63c024bd3d Fix ConfiguredCatalog for Resets (#18625)
We should only force (FULL_REFRESH,OVERWRITE) for the streams to reset.
For the other streams, we only want to replace OVERWRITE with APPEND to
avoid having destination clear the stream. The other cases should be
left as is.
2022-10-28 14:17:35 -07:00
Jimmy Ma
e32a641cbe Use Protocol Versions in Syncs (#18324)
* Pass protocol version into IntegrationLauncherConfig

* Use VersionedStreamStreamFactory in AirbyteSource/Destination

* Add AirbyteMessageBufferedWriter

* Use VersionedBufferedWriter
2022-10-27 12:57:33 -07:00
Xiaohan Song
21431f6297 use api to do jobpersistence query (#18308)
* use api to do jobpersistence query

* renaming some variables

* fix test
2022-10-25 14:27:42 -07:00
Xiaohan Song
6b1c5ee384 save queue name into Attempts table (#17921)
* save queue name

* make input nullable because we changed signature

* PR Comments fix
2022-10-19 17:10:37 -07:00
Akash Kulkarni
66e0055822 Sentry Integration : Stop reporting all non system-error error types. (#18133)
* Sentry Integration : Stop reporting all non system-error error types.
2022-10-18 16:54:40 -07:00
Michael Siega
71967885e4 Implement webhook operation in the sync workflow (#18022)
Implements the webhook operation as part of the sync workflow.

- Introduces the new activity implementation
- Updates the various interfaces that pass input to get the relevant configs to the sync workflow
- Hooks the new activity into the sync workflow
- Passes the webhook configs along into the sync workflow job
2022-10-17 18:36:53 -07:00
Evan Tahler
f338e47c2f Add additional sync timing information (#17643)
* WIP - Add additional sync timing information

* Fixup tests

* fix PMD problem

* send data to segment

* Test JobTracker

* respond to PR suggestions

* fixup test

* formatting

* fix initializer for stats

* Make thread-safe with synchronized

* Don't clobber syncStats on init

* add comments and fix init

* Do what Pedro says

* Extract timeTracker pojo
2022-10-13 16:16:06 -07: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
Parker Mossman
39a14b7306 Efficient queries for connection list (#17360)
* query once for all needed models, instead of querying within connections loop

* cleanup and fix failing tests

* pmd fix

* fix query and add test

* return empty if input list is empty

* undo aggressive autoformatting

* don't query for connection operations in a loop, instead query once and group-by connectionID in memory

* try handling operationIds in a single query instead of two

* remove optional

* fix operationIds query

* very annoying, test was failing because operationIds can be listed in a different order. verify operationIds separately from rest of object

* combined queries/functions instead of separate queries for actor and definition

* remove leftover lines that aren't doing anything

* format

* add javadoc

* format

* use leftjoin so that connections that lack operations aren't left out

* clean up comments and format
2022-10-10 09:55:31 -07:00
Lake Mossman
c1e0c77e31 Handle null workspace IDs in tracking/reporting methods gracefully (#17641)
* Handle null workspace IDs in tracking/reporting methods gracefully

* put strings into constants to fix pmd
2022-10-05 18:26:33 -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
Pedro S. Lopez
8c6313374e SentryJobErrorReportingClient: set event platform from parsed stacktrace (#16906)
* set sentry event platform from parsed stacktrace

* fix pmd

* use an enum

* use enum in test

* fix imports

* fix imports

* format

* fix imports
2022-09-26 16:49:22 -04:00
Cole Snodgrass
e662cf0d3a rm airbyte-scheduler; migrate existing client to airbyte-server (#17051)
* wip; move scheduler client to server package

* remove additional references to airbyte-scheduler

* removed more references to airbyte-scheduler
2022-09-22 10:25:52 -07:00
Anne
f28d5f304f Only run normalization when needed (#16794)
Only run normalization when records have been committed
2022-09-21 16:50:27 -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