1
0
mirror of synced 2026-01-25 01:01:56 -05:00
Commit Graph

70 Commits

Author SHA1 Message Date
Evan Tahler
e39ee94b8c Pass allowedHosts to container runners (#21676)
* Pass allowed hosts to Process Factories and log

* fix loading method

* github allowed hosts

* StringSubstitutor

* lint

* ConfigReplacerTest class + tests

* tests are private
2023-01-24 16:55:51 -08:00
Anne
6026465c52 Remove jobPersistence dependency (#21625)
* Remove JobPersistence from ConfigFetchActivityImpl
2023-01-20 16:32:23 -08:00
Joe Bell
ff3726eb59 Add Docker Debugging Fixture (#21357)
* docker debugging options

* refactor image shortening method

* remove testing annotation

* comment updates

* debugging docker docs
2023-01-20 23:09:20 +00:00
Davin Chia
da34c783e8 Remove inefficient namespace clone. (#21552)
Testing shows this is causing ~ 5MB/s of throughput on the platform. This is not needed since we can simply modify the already present Json node instead of a cloned object.

This should help both CPU and GC pressure.
2023-01-18 13:45:13 -08:00
Pedro S. Lopez
b24d575903 feat: return whether configuration was updated as part of api response (#21466)
* wip: return whether configuration was updated

* updated outputs working

* fix pmd

* update description, format

* add didUpdateConfiguration to metadata, rm unneeded generics

* add didUpdateConfiguration to api response

* update name to fix pmd

* not required

* rename to match api response

* remove unused field

* match naming
2023-01-18 18:00:37 +00:00
Benoit Moriceau
954ca75517 Avoid parsing a message if this message is too big (#21090)
* Tmp

* Format

* TMP

* TMP

* Inject max memory

* Clean up

* Improve error message

* PR comments

* Unrelated changes

* Fix pmd
2023-01-12 16:20:10 -08:00
Augustin
2dc5b2f818 airbyte-common-workers: Collect trace message on failed connection_status (#20721) 2023-01-12 21:49:21 +00:00
Cole Snodgrass
440a5e4de7 store env-var response (#21327)
* store env-var response

* fix formatting

* fix pmd issue

* change log message to debug

* fix file change error
2023-01-12 11:16:40 -08:00
Cole Snodgrass
afaf2d1bb2 convert EnvVariableFeatureFlag to an injected dependency (#21171)
* inject feature-flag client into integration-launcher

* inject feature-flag client into message-tracker

* inject feature-flag client into DefaultAirbyteSource

* missed reference in message-tracker
2023-01-10 08:59:02 -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
Benoit Moriceau
31c65f8eea Revert "Convert the server to micronaut (#19194)" (#21132)
This reverts commit 0b153d11f9.
2023-01-06 15:08:22 -06:00
Pedro S. Lopez
01e256f579 process config control messages during check and discover (#20894)
* 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

* process control messages for discover jobs

* process control messages for CHECK

* persist config updates on check_connection_for_update

* get last config message rather than first

* fix pmd

* fix failing tests

* add tests

* source id not required for check connection (create case)

* suppress pmd warning for BusyWait literal

* source id not required for checkc onnection (create case) (p2)

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

* add new config required for api client

* add test file

* remove debugging logs

* rename method (getLast -> getMostRecent)

* rm version check (re-added this in by mistake on merge)

* fix test compatibility

* simplify
2023-01-06 15:24:24 -04: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
Davin Chia
eeedd64ac9 Introduce Default Replication Worker Performance Test Harness (#20956)
Introduce a performance test harness for the default replication worker to make it easy for devs to test effect of changes on platform throughput.

The current set up is designed to be run manually. In the future, we can look into integrating this report into our build pipelines. For now, this is good enough as I wanted to start somewhere.

The general idea is to use JMH to run the test n number of times (currently 4 times). The dev can then look at logs to see throughput and how it varies.

As of this PR, we see general platform throughput of ~ 20 - 25 MB/s.
2023-01-05 14:22:47 -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
Jonathan Pearlin
a5fcbaa457 Ignore sigterm when closing source/destination (#20519)
* Ignore sigterm when closing source/destination

* Add tests
2023-01-03 14:32:00 -05:00
Davin Chia
d95c06d357 Remove unused imports. (#20938) 2022-12-30 14:39:51 -08:00
Davin Chia
18593d91b5 Remove sneaky throws. (#20931)
The Java 19 toolchain doesn't like sneaky throws. Not entirely sure why. However, I think it's better practice to not use sneaky throws as it makes it clearer what is throw and where.

Example error message when trying to compile the current codebase with Java 19:

error: Error during the transformation of 'io.airbyte.validation.json.JsonSchemaValidatorTest'; post-compiler 'lombok.bytecode.SneakyThrowsRemover' caused an exception: java.lang.IllegalArgumentException: Unsupported class file major version 63
        at org.objectweb.asm.ClassReader.<init>(ClassReader.java:199)
        at org.objectweb.asm.ClassReader.<init>(ClassReader.java:180)
        at org.objectweb.asm.ClassReader.<init>(ClassReader.java:166)
        at lombok.bytecode.AsmUtil.fixJSRInlining(AsmUtil.java:37)
        at lombok.bytecode.SneakyThrowsRemover.applyTransformations(SneakyThrowsRemover.java:46)
        at lombok.core.PostCompiler.applyTransformations(PostCompiler.java:44)
        at lombok.core.PostCompiler$1.close(PostCompiler.java:87)
        at jdk.compiler/com.sun.tools.javac.jvm.ClassWriter.writeClass(ClassWriter.java:1508)
        at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.genCode(JavaCompiler.java:738)
2022-12-30 09:04:26 -08:00
Davin Chia
54c0ef12b1 Add orchestrator label. (#20904)
Add the orchestrator label to orchestrators so we can better differentiate orchestrator pods.

This is useful since orchestrator pods are the only pods in the job namespace with a need to talk to the main Airbyte application pods. These labels allow us to apply more granular network filtering.

Also took the chance to do some clean up of labels.
2022-12-28 13:41:47 -08:00
Pedro S. Lopez
7dc3004d95 fix LOG_CONNECTOR_MESSAGES when source has no state (#20606) 2022-12-16 16:35:27 -04: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
Jonathan Pearlin
711bf53eff Break inheritance dependency on java.lang.Process (#20235) 2022-12-14 12:34:30 -05: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
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
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
Evan Tahler
46978359a6 socat gets more resources (#19953)
* `socat` gets more resources

* Move pod limits to ENV

* lint
2022-12-06 15:29:32 -08:00
Geoff Genz
b7816f4f58 🐛 Destination ClickHouse: Update Normalization Docker File (#19573)
* Update ClickHouse normalization docker file

* bump destination and norm version

* auto-bump connector version

* update doc

Co-authored-by: Marcos Marx <marcosmarxm@users.noreply.github.com>
Co-authored-by: marcosmarxm <marcosmarxm@gmail.com>
Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-12-06 14:49:18 -03: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
354a0b45b9 Remove use of unimplemented pid() method (#20028) 2022-12-02 14:03:33 -05:00
Jonathan Pearlin
e7789cb6ea Always surface normalization failure reason (#20025) 2022-12-02 12:02:25 -05:00
Cole Snodgrass
1cdfdbef42 convert container-orchestrator to micronaut (#19396)
* wip; add micronaut

* add additional json deserializer methods

* wip; converting to micronaut

* misc cleanup

* wip; broken

* wip; still broken

* wip

* formatting

* minor code cleanup; no actual changes

* wip; still broken

* removed commented out code; no longer broken

* wip; clean-up micronaut code

* cleanup; format

* fix pmd issues

* remove unused file

* init ApplicationTest

* edited link (#19444)

* move 'Example values' into intl (#19446)

* Revert "Update action.yml (#19416)" (#19450)

This reverts commit 78fb528a9a.

* Notifications Workflow (#18735)

* notification workflow

* 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

* Make sure that long running activity are not retried (#19452)

* Parse list of dicts in json_schema_helper.find_nodes() (#19386)

* Get test on nested list/dict passing - use index to query next object for list

* Fix flakecheck

* Test that get_node provides correct value

* Improve test and test cases

* Rewrite method for better comprehension

* Add test for base-level key. Rewrite method for comprehension and handling this case

* adding tests

* fix test

* formatting

* remove unused dependencies

* add missing test resource

* format

* add missing test resource (real)

* format

* add back protocol-models dep

* format

* pr feedback; log stacktrace

Co-authored-by: Sophia Wiley <106352739+sophia-wiley@users.noreply.github.com>
Co-authored-by: Lake Mossman <lake@airbyte.io>
Co-authored-by: Topher Lubaway <asimplechris@gmail.com>
Co-authored-by: Anne <102554163+alovew@users.noreply.github.com>
Co-authored-by: Benoit Moriceau <benoit@airbyte.io>
Co-authored-by: Ella Rohm-Ensing <erohmensing@gmail.com>
2022-11-30 12:07:16 -08: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
Jonathan Pearlin
e06bdf65fa Improve normalization close error message (#19829)
* Improve normalization close error message

* Formatting

* Better error message

* Update log level

* Fix issue with rebase
2022-11-29 15:41:34 -05: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
Anne
14a29a0542 Auto Detect Schema Change environment variable (#19312)
* auto detect schema environment variable
2022-11-28 09:57:41 -08:00
Jonathan Pearlin
2423c7d912 Add failure origins to APM trace (#19665) 2022-11-28 09:26:54 -05:00
Jonathan Pearlin
69b7902ace Trace more exceptions (#19608) 2022-11-18 14:16:19 -05:00
Davin Chia
2782b7aaf1 Add AirbyteStreamNamespaceNamePair to MessageTracker Interface (#19361)
Follow up to #19360.

This PR adjusts the MessageTracker interface to use the new Pair object.
2022-11-17 13:26:52 -08:00
Benoit Moriceau
26c866b9e4 Fix MDC scope (#19501)
* Fix MDC scope

* format
2022-11-16 16:12:03 -08:00
Davin Chia
0d4a2bb281 Introduce the AirbyteStreamNamespaceNamePair to the DefaultReplicationWorker. (#19360)
#19191 made me realise the DefaultReplicationWorker's metric tracking today has a bug where we aren't accounting for namespace when tracking metrics today. i.e. Streams with the same name and duplicate namespace will merge metrics.

While reading the code to figure out a fix, I realised we don't have a good conceptual representation of stream namespace <> name pairs within the platform today. We use a concatenated string. Though this works, it will become harder and harder to read/track as we do more operations that involve namespace i.e. progress bars and column selection.

This PR introduces the AirbyteStreamNameNamespacePair object into the platform code to make it more convenient to work with Streams in the future. (Especially if we proceed with the project to make streams a first-class citizen!)

The AirbyteStreamNameNamespacePair object was written to deal with the same issue of namespace <> name pair manipulation within the Java destination code. It implements the Comparable interface, which makes it convenient to use for Collections operations.

For an example of how this is consumed, see #19361.
2022-11-16 11:50:45 -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
Cole Snodgrass
cc93c46fb2 add initContainer to container-orchestrator pod definition (#19088)
* init attempt at initcontainer

* wait for init container to be up instead of main container

* copy files to init container

* Revert "Bmoric/extract webbackend api (#18988)"

This reverts commit b05a5b2a6a.

* Revert "Revert "Bmoric/extract webbackend api (#18988)""

This reverts commit ebef6e44e8.

* block on initContainer status; cleanup init script

* add log messages

* add quotes to log messages

* pr feedback, add comment to bash script
2022-11-10 10:24:36 -08:00
Davin Chia
594cf29bbb Simple default replication worker refactor (#19002)
Logic in this class is going to have to change as part of two big upcoming projects:
- column selection
- progress bars

To prepare for this, I've gone ahead and refactored the run method for readability. This is a monster function. The current function is too long and contains several operational abstractions, increasing unnecessary complexity. This is the core of what we do, so it's important to ensure this code is extremely understandable.

Ultimately we want to probably want to break the run method up into two or more separate classes - one that deals with replication and one that deals with outputs - for better testing, readability and isolation. This sets the stage for that.

I have intentionally NOT removed or touched any logic, nor have I put thought into consolidating the function signatures to preserve as much of the pre-existing logic and keep the changeset small and reviewable.

This changeset only renames and moves code around.
2022-11-07 16:43:20 -08:00
Evan Tahler
e6b06a88ac AirbyteEstimateTraceMessage (#18875)
* `AirbyteEstimateTraceMessage`

* Add PR number

* fix method name

* Lint

* Lint

* fix merge

* Update docs/understanding-airbyte/airbyte-protocol.md

Co-authored-by: Davin Chia <davinchia@gmail.com>

* `EstimateType` sub type in python

* lint

Co-authored-by: Davin Chia <davinchia@gmail.com>
2022-11-07 12:45:39 -08:00
Greg Solovyev
7b9a097081 Add normalization changelog and bump normalization version in platform (#18813) 2022-11-01 15:36:31 -07:00
Benoit Moriceau
85e6792e36 More comprehensive temporal error message (#18608)
* To be remove

* Remove the signal for waiting after a failed activity and ensure we are waiting the expected time

* Revert "To be remove"

This reverts commit 3a5f7b4f72.

* Remove unused and move failure reason to the helper

* Avoid repetitive new Set()
2022-10-28 15:18:23 -07:00
Jimmy Ma
c5d5ef30f7 Add versioning logging (#18618) 2022-10-28 13:35:50 -07:00
Evan Tahler
02459e8354 Protocol Change: AirbyteControlMessage.ConnectorConfig (#17907)
* Protocol Change: AirbyteConfigMessage

* update PR link in docs

* Lint

* Update python files

* Update docs/understanding-airbyte/airbyte-protocol.md

Co-authored-by: Sherif A. Nada <snadalive@gmail.com>

* Update docs/understanding-airbyte/airbyte-protocol.md

Co-authored-by: Sherif A. Nada <snadalive@gmail.com>

* `AirbyteConfigMessage` -> `AirbyteConnectorConfigMessage`

* AirbyteOrchestratorMessage

* Update docs

* `AirbyteControlConnectorConfigMessage`

Co-authored-by: Sherif A. Nada <snadalive@gmail.com>
2022-10-28 11:11:31 -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