1
0
mirror of synced 2026-02-03 10:02:09 -05:00
Commit Graph

668 Commits

Author SHA1 Message Date
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
Benoit Moriceau
606812b5d1 Rm temporal version (#21045)
* Rm temporal version

* Remove temporal version

* Update the replayed workflow

* Format

* Fix pmd
2023-01-05 16:38:39 -08: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
Anne
84cd1547e8 Remove workspace helper from fetchConfigActivity (#21048)
* Remove workspace helper and replace with workspaceApi
2023-01-05 23:30:26 +00:00
Anne
bb84fac8d1 Add new actorCatalogWithUpdatedAt endpoint 2023-01-05 22:12:31 +00:00
Jimmy Ma
f846678d18 Refactor code to avoid missing check (#21046) 2023-01-05 01:05:31 +00:00
Anne
94513f07c3 remove config repository from config fetch activity impl scheduling (#20908)
* Remove config repository from config fetch activity impl for scheduling data
2023-01-04 16:07:48 -08:00
Anne
c6715bd98a Remove config repo dependency for getStatus (#21033) 2023-01-04 13:24:26 -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
Anne
dddaad5df2 Remove configRepo dependencies (#20690)
* Use ConnectionApi to fetch source ID (#20670)
2023-01-03 21:53:37 +00:00
Xiaohan Song
4eca4a4302 OSS changes to support acceptance test on data plane (#20853)
* addlog

* fix applicaion.yml

* remove logging

* var name for boolean

* test setup

* test

* more fix for testing

* self review

* remove unrelated changes

* remove unwanted cdk changes

* more clean ups
2023-01-03 13:34:27 -08:00
Jonathan Pearlin
c3987a9645 Skip validation when previous state is empty due to reset (#20585)
* Skip validation when previous state is empty due to reset

* Handle null state object

* Fix formatting

* Fix logic

* Fix method name
2023-01-03 12:17:59 -05:00
Davin Chia
2deac0f244 Prep for Java 19 Upgrade (#20911)
Upgrade all the necessary tooling dependencies to get us to Java 19.
2022-12-29 12:32:42 -08:00
Michael Siega
16e890aee1 add noise to cron scheduling (#20665)
* add noise to cron scheduling

* fix tests

* add a workspace id to test cron scheduling jitter

* add unit test and fix scheduling noise for crons
2022-12-20 19:45:03 -06:00
Jonathan Pearlin
c0838f81da Disable auto detect schema activity bits (#20615)
* Disable auto detect schema activity bits

* Disable impacted tests

* Disable auto detect schema checks

* Add comment as to why code has been disabled

* Fix PMD warnings

* Fix PMD warning

Co-authored-by: Peter Hu <peter@airbyte.io>
2022-12-19 15:36:22 -06: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
ea3db512e1 Fix incorrect naming in application.yml (#20494)
* addlog

* fix applicaion.yml

* remove logging

* var name for boolean
2022-12-14 15:37:10 -08:00
Conor
e7c3fbf62d restore containerOrchestrator image value (#20313)
* Revert "fix: remove unused CONTAINER_ORCHESTRATOR_ENABLED var (#20261)"

This reverts commit ce29361b55.

* docs: add additional commentary on flag usage
2022-12-12 18:06:47 -06:00
Michael Siega
0fac8c82e6 implement column filtering in the replication workflow (#20369)
* implement column filtering in the replication workflow

* fixes to column selection in replication workflow

* add a basic acceptance test for column selection

* make CI acceptance tests run with new field selection flag enabled

* fix format

* readability improvements around columns selection tests and other small fixes
2022-12-13 01:02:09 +01:00
Charles
0af6bd06ba emit failure type in attempt_failure_by_origin (#20349) 2022-12-12 15:06:31 -08:00
Benoit Moriceau
790dc42bcb remove the requirement on the activity (#20311)
* remove the requirement on the activity

* Remove unused import
2022-12-09 12:27:17 -08:00
Anne
0a8fc9e187 Disable all broken connections when source is refreshed (#20208) 2022-12-09 10:36:39 -08:00
Xiaohan Song
d48d497c95 Add secrets for pulling custom connector images (#20272)
* enable ui

* allow upload custom image

* remove fe change

* change pull secrets to accept a list instead

* comment fix

* remove unused var

* naming
2022-12-08 18:20:11 -08:00
Conor
ce29361b55 fix: remove unused CONTAINER_ORCHESTRATOR_ENABLED var (#20261)
* fix: remove unused CONTAINER_ORCHESTRATOR_ENABLED var
2022-12-08 16:27:28 -06: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
Davin Chia
990931e7c1 Further simplify metrics tracker. (#19988)
Follow up from ##19814, where we introduced the StreamStats object to consolidate/simplify some of the stats memory objects.

In this PR, we extend the StreamStats object to also include the emitted records and bytes.

- Make StreamStats into a proper object. We cannot use a record as record fields are immutable. We need mutable fields to count.
- Consolidate the emitted records into StreamStats.
- Take the chance to move all the stats/metrics related classes into a book_keeping package to keep things clean.
2022-12-02 16:54:06 -08:00
Jonathan Pearlin
fb387fa4ba Add metric and attributes (#19943) 2022-12-01 11:19:52 -05:00
andriikorotkov
f11507b23a Read the information from both the definition file and the spec and add logs if have difference (#19799)
* 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

* fixed remarks
2022-11-30 12:16:56 +02:00
Davin Chia
a1b9db50da Progress Bar Estimate (#19814)
Implement estimate message processing allowing the platform to hold on to estimate message counts in memory.

The estimate message is protocol message connectors can choose to emit to provide support for progress bar calculations. There are two kinds of estimates, per-Sync or per-Stream. Sources cannot emit both types in a single sync.

Per-stream estimates are what we usually expect. Per-sync estimates are for sources that cannot provide more granular estimates for whatever reasons e.g. CDC sources.

In a follow up PR, the platform will periodically save these messages through the save stats api.
2022-11-28 21:15:58 -08:00
Benoit Moriceau
63ae0ea641 Hydrate the OAuth configuration when performing a reset. (#19778)
* Set the destination config

* Supply OAuth via micronaut

Co-authored-by: Jimmy Ma <gosusnp@users.noreply.github.com>
2022-11-28 11:05:26 -08:00
Anne
14a29a0542 Auto Detect Schema Change environment variable (#19312)
* auto detect schema environment variable
2022-11-28 09:57:41 -08:00
Davin Chia
a695b41349 Add Retry Logic to Airbyte API calls. (#19693)
Today we often see HTTP/1.1 header parser received no bytes' during syncs, especially in the Data Plane.

This PR attempts to fix this by adding naive retries.

Add a basic retry wrapper with the unique ability to retry for a much longer period on the last retry. This is particularly useful for us as most of our jobs are long running workflows, and the benefit of not having to restart the entire job outweighs the added wait time.

Alternative solutions I explored:

- Switching the underlying HTTP client to a more fully featured HTTP client. E.g. Apache or OkHttp. Issues with this:
    - These clients do not support the ability to configure the retry policy we want.
    - These clients do not support the ability to inject application aware logging.
    - Most importantly, because this changes the interface, the resulting change set is big and affects many unrelated classes. I do think we eventually want to switch the underlying libraries out. However I don't think we should do this as part of OC work.
- Exploring pairing retry libraries such as https://resilience4j.readme.io/docs with the native http clients. The main issue here is the lack of ability to configure the last retry period.

Since the hand-rolled wrapper is simple + gets the job done, my thoughts are to run with this for the time being and revisit this if additional requirements around the clients come up.
2022-11-28 08:44:10 -08:00
Jonathan Pearlin
2423c7d912 Add failure origins to APM trace (#19665) 2022-11-28 09:26:54 -05:00
Parker Mossman
2edb5f3c1d fix typo: notify instead of sync (#19737) 2022-11-22 18:25:40 -08:00
Benoit Moriceau
2c451b33a5 Revert "Trace Failure Origins (#19550)" (#19620)
This reverts commit fbdbb899b4.
2022-11-18 13:46:52 -08:00
Jonathan Pearlin
69b7902ace Trace more exceptions (#19608) 2022-11-18 14:16:19 -05:00
Benoit Moriceau
a8fc4c9ae8 Revert "Make sure that long running activity are not retried (#19452)" (#19568)
This reverts commit e8368696ff.
2022-11-17 10:49:00 -08:00
Jonathan Pearlin
fbdbb899b4 Trace Failure Origins (#19550)
* Clarify local datadog instructions

* Add failure origins to trace
2022-11-17 11:48:20 -05:00
Benoit Moriceau
26c866b9e4 Fix MDC scope (#19501)
* Fix MDC scope

* format
2022-11-16 16:12:03 -08:00
Benoit Moriceau
a586537adb Specify namespace when creating pod (#19399)
* Specify namespace when creating pof

* PR comments

* rm new line

* Fix micronaut injection
2022-11-15 15:52:42 -08:00
Benoit Moriceau
e8368696ff Make sure that long running activity are not retried (#19452) 2022-11-15 14:35:18 -08:00
Benoit Moriceau
63ccc32788 Bmoric/remove unused code (#19188)
* Tmp

* Move when the deletion is performed

* Re-enable disable test

* PR comments

* Use cancel

* rename

* Fix test and version check position

* remove unused temporal deletion code

* Remove false todo

* Rm repeated test

* Rm unused import
2022-11-15 14:21:05 -08:00
Anne
fdb96d0a63 Notifications Workflow (#18735)
* notification workflow
2022-11-15 13:58:30 -08:00
Jonathan Pearlin
6b92151dc9 Filter out Temporal errors from SyncWorkflowImpl (#19293) 2022-11-10 13:40:57 -05:00
Xiaohan Song
bde7fe9616 Metric fixes on multi cloud (#19268)
* fix numpending secs

* fix worker
2022-11-10 09:05:35 -08:00
Jonathan Pearlin
0e036dbb24 Add attempt number to trace tags (#19241)
* Add attempt number to trace tags

* Use correct tag key for error suppression
2022-11-09 16:27:53 -05:00
Benoit Moriceau
b3db914265 Change where a connection is deleted (#19096)
* Tmp

* Move when the deletion is performed

* Re-enable disable test

* PR comments

* Use cancel

* rename

* Fix test and version check position

* Log exception
2022-11-09 13:05:27 -08:00