1
0
mirror of synced 2025-12-30 03:02:21 -05:00
Commit Graph

192 Commits

Author SHA1 Message Date
Michael Siega
d87b38dc0b Add structured dbt cloud information to the operations api (#19395)
* add structured dbt cloud information to the operations api

* remove unused webhook features, test updates

* update tests to use structured dbt cloud operation api

* add missing webhook operator type
2022-11-17 17:49:27 +01:00
Jimmy Ma
693f976efd Fix flaky tests (#19459)
* Expose WorkflowState in JobsDebugInfo

* Make attribute required

* Update the tests

* Protect more tests
2022-11-16 09:18:19 -08:00
Benoit Moriceau
1e551d0466 Update inputs (#19320)
* Update inputs

* PR comments and autogen files
2022-11-11 10:28:40 -08:00
Anne
1d809a7539 Add new workspace api endpoint (#18983)
* Add new workspace api endpoint
2022-11-04 14:20:07 -07:00
Davin Chia
7bb3241781 Progress Bar API Changes. (#18953)
API changes to support the progress bar.

- The eventual idea is for the save_stats route to be called by the workers during replication. Workers will save stats for a job id and attempt number.
- Make modifications to the /jobs/list and the /jobs/get_debug_info routes to also return estimated bytes/records.
We need both estimated metadata, as well as running states to calculate progress bar and throughput.


- add the save_stats route. This is the route that will be called by workers. I've done my best to reuse existing openapi bodies to reduce duplication.
- add the estimatedRecords and estimatedBytes fields to the AttemptStats body. This is part of the AttemptRead and the AttemptStreamStats objects. This eventually filters up to the jobs/list and jobs/get_debug_info objects. This also adds these to all the endpoints that were previously returning stats information. I think the duplicated data is a small issue and don't think it's worth splitting out a new api objects, though I will gladly do so if folks feel strongly.
minor changes to the AttemptApiController to support the new route.
- I've stubbed out the handlers for now since the backend is not yet implemented.
2022-11-04 10:05:07 -07:00
Benoit Moriceau
589f6efbfc Extract OAuth API (#18818)
* Tmp

* Extract the Attempt API from the V1 API

* Add comments

* Move Connection API out of configuration API

* format

* format

* Rename to Controller

* Rename to Controller

* Add values to the factory

* Change the constructor to use hadler instead of objects needed by the handler

* Update with new tags.

* tmp

* Fix PMD errors

* Extract DB migrator

* Add something that I forgot

* extract destination definition api

* restore destination factory initialization

* extract destination definition specification api

* format

* format

* format

* extract health check api

* extract jobs api

* fix test

* format

* Extract logs api

* Add missing declaration

* Fix build

* Tmp

* format and PR comments

* Extract notification API

* re-organize tags

* Extract all Oauth

* Fix PMD
2022-11-02 15:37:15 -07:00
Anne
d26e5bc248 DiscoverSchema endpoints calculates diff and breaking change (#18571)
* update discover schema endpoint to calculate diff
2022-11-02 14:10:07 -07:00
Anne
0c183334bf add nonBreakingChangePreference and notifySchemaChanges (#18636)
* add nonBreakingChangePreference and notifySchemaChanges
2022-10-31 12:58:39 -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
Benoit Moriceau
434a556dd8 Fix the tag in openAPI (#18445)
* Fix the tag

* remove unused
2022-10-25 14:23:47 -07:00
Benoit Moriceau
7ec6779df3 Bmoric/update connection list with breaking (#18125)
* add schemaChange

* merge conflict

* frontend tests

* tests

* l

* fix source catalog id

* test

* formatting

* move schema change to build backend web connection

* check if actor catalog id is different

* fix

* tests and fixes

* remove extra var

* remove logging

* continue to pass back new catalog id

* api updates

* fix mockdata

* tests

* add schemaChange

* merge conflict

* frontend tests

* tests

* l

* fix source catalog id

* test

* formatting

* move schema change to build backend web connection

* check if actor catalog id is different

* fix

* tests and fixes

* remove extra var

* remove logging

* continue to pass back new catalog id

* api updates

* fix mockdata

* tests

* tests

* optional of nullable

* Tmp

* For diff

* Add test

* More test

* Fix test and add some

* Fix merge and test

* Fix PMD

* Fix test

* Rm dead code

* Fix pmd

* Address PR comments

* RM unused column

Co-authored-by: alovew <anne@airbyte.io>
2022-10-24 16:13:38 -07:00
Anne
5082ebfe2a Add SchemaChange to WebBackendConnectionRead object (#17969)
* add schemaChange field to WebBackendConnectionRead and breakingChange to ConnectionRead
2022-10-21 13:08:03 -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
Michael Siega
e079761509 ensure workspace webhook configs can be persisted correctly (#18034)
* ensure workspace webhook configs can be correctly passed between API and persistence layers

* remove unnecessary logging

* add unit tests to workspace webhook config handling

* additional testing and style cleanup around workspace webhook config handling
2022-10-17 01:23:29 +02:00
Michael Siega
359b560de9 Introduce webhook operations to the operations API and persistence (#17984)
* introduce webhook operations to the operations API and persistence

* add unit tests for webhooks in operations endpoint handler

* fixes and additional testing in webhook operations handler

* cleanup refactor around operations handling to reduce duplicate code
2022-10-14 23:08:12 +02:00
Michael Siega
6a48da9226 Introduce webhook configs into workspace api and persistence (#17950)
* wip

* handle webhook configs in workspaces endpoint and split/hydrate secrets

* style improvements to documentation around webhook configs

* Clarify documentation around webhook auth tokens

* More documentation clarification around webhook configs

* Format.

* unit test coverage for webhook config handling

* use common json parsing libraries around webhook configs

* clean up around testing webhook operation configs

Co-authored-by: Davin Chia <davinchia@gmail.com>
2022-10-14 02:59:02 +02:00
Lake Mossman
ec5496840d Add workspace ID to connector check calls to fix segment tracking (#17816)
* add workspace ID to source/dest check and discover endpoints

* pass workspaceId to API from frontend

* make it work for destinations too
2022-10-11 09:55:39 -07:00
Anne
ca2605db95 Add breakingChange to catalogDiff (#17588)
* Add breaking field to FieldTransform on catalogDiff
2022-10-10 18:04:34 -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
Parker Mossman
a8c72121f8 Remove catalog from web_backend/connections/list (#17002)
* Use PATCH Api for toggling connections

* remove catalog from web backend connection list, and move icon to source/destination field in response

* Adjust FE code

* comment out failing tests

* Resolve merge conflict

* add back in tests and make them pass with new list items

* format

* leave repository layer alone for now, just remove catalog from API response

* format

* load the icon when returning

* update sourceHandler and destinationHandler test to account for icons

* add icon to source and destination in webBackendConnectionHandlerTest

* change icon test to actually load an svg rather than using static mocks

* also fix icon test for WebBackendConnectionsHandlerTest

* make PMD happy

Co-authored-by: Tim Roes <tim@airbyte.io>
Co-authored-by: Davin Chia <davinchia@gmail.com>
Co-authored-by: KC <krishna@airbyte.io>
2022-09-28 12:01:10 -07:00
Parker Mossman
e30476e4fd Remove default value from namespaceDefinitionType (#17177)
* remove default value from namespaceDefinitionType

* fix test

* switch some tests to use PATCH-style connection update

* add default logic to connection creation

Co-authored-by: Michael Siega <michael@airbyte.io>
2022-09-26 15:43:17 -07:00
Davin Chia
517466eb66 Remove unused webbackend search code. (#17008)
* Remove unused webbackend search code.

* Remove unused request body.

* Remove unused request body.

* Remove failing test.

* Remove failing test.

* Remove failing test.

Co-authored-by: Parker Mossman <parker@airbyte.io>
2022-09-26 10:46:01 -07:00
Michael Siega
32a984123e convert the workspace update api to patch style (#16739)
* convert the workspace api to patch style

* check for empty email in workspace update
2022-09-26 11:29:51 +02:00
Davin Chia
03ae8bc4a4 Remove the webbackend list all route. (#17006)
Web backend routes are used by the Frontend.

This is not used today, and we don't imagine using it in the near future.
2022-09-21 16:21:09 -05:00
Parker Mossman
1a0ea82c34 Change ConnectionUpdate to PATCH behavior (#16157)
* remove operationIds from WebBackendConnectionUpdate, just use operations

* refactor connection updates to patch-style update, where null fields remain unchanged

* better comment and arg name

* format

* make sure we are still 'dual-writing' to the old schedule column, even when the patch doesn't specify anything for it

* update acceptance test to update with new schedule syntax

* add catalog sorting to preserve stream order during patch, and more tests

* format

* add description, throw runtime exception for impossible branches, move streamReset to private helper

* PR suggestions

* add nested test classes and write a test for the catalog sorting method

* format

* add comment clarifying that the catalog sort is for UX, and isn't critical

* format

* format

* update acceptance tests to send proper catalog patches instead of whole new catalog

* format

* format

* simplify catalog patching - now, if a catalog is present on the request, replace the entire catalog with it.
Otherwise, if catalog on the request is null, leave the catalog unchanged

* format

* format

* Revert "update acceptance tests to send proper catalog patches instead of whole new catalog"

This reverts commit 71922648b4e070f46ff6c468813b7ab8dd9d6651.

* adjust description
2022-09-19 18:36:34 -05:00
Parker Mossman
8852d52c9c Rename jobs/get-light to jobs/get_light and log response (#16685)
* test

* update jobInfoLight route and add log
2022-09-13 20:46:26 -07:00
Parker Mossman
1d29672122 add jobInfoLight API endpoint that excludes attempt information (#16682)
* add jobInfoLight API endpoint that excludes attempt information, which can be enormous as it includes all log lines

* update replication activity to call new light endpoint
2022-09-13 17:04:47 -07:00
Lake Mossman
a15288ad0f Improve job list API with more fetching capabilities (#16415)
* start implementation of new persistence method

* add includingJobId and totalJobCount to job list request

* format

* update local openapi as well

* refactor queries into JOOQ and return empty list if target job cannot be found

* fix descriptions and undo changes from other branch

* switch including job to starting job

* fix job history handler tests

* rewrite jobs subqueries in jooq

* fix multiple config type querying

* remove unnecessary casts

* switch back to 'including' and return multiple of page size necessary to include job

* undo webapp changes

* fix test description

* format
2022-09-12 16:32:04 -07:00
Jimmy Ma
9ad847bd8e Store protocol version from spec (#16416)
* Update protocol version from actor defs API operations

* Implement default airbyte protocol version support

* Add version parsing

* Add acceptance tests

* Fix Acceptance Tests

* format

* Make test package private
2022-09-08 18:21:28 -07:00
Anne
d856731029 Implement more Error Prone PMD rules (#15491)
* AvoidFieldNameMatchingTypeName rule
* AvoidInstanceofChecksInCatchClause
* compareObjectsWithEquals
* DoNotTerminateVM and ConstructorCallsOverridableMethod
* EmptyIfStmt and EmptyStatementNotInLoop
* ImplicitSwitchFallThrough, InvalidLogMessageFormat, and MoreThanOneLogger
2022-09-07 13:20:32 -07:00
Charles
ce201bc412 deprecate import / export endpoints (#16175)
* deprecate import / export endpoints

* remove fe deps on import / export

* additional fe clean up
2022-09-06 09:34:18 -07:00
Parker Mossman
6a06c5b0ff Upgrade OpenAPI Generator to 6.1.0-SNAPSHOT (#16026) 2022-08-26 18:36:01 -07:00
Parker Mossman
614ebb615d Multi-Cloud MVP: Combined branch for testing and merge (#15997)
* add new Configs for multi-cloud

* add api endpoints for setting workflow attempt id and createOrUpdate state

* update activities to call APIs instead of persistence

* workerApp refactor to separately initialize control or data plane dependencies

* modify syncWorkflow to call new activity that decides which task queue for data plane tasks

* misc to get build working

* move StateConverter to worker, so that server and worker can both access without needing to introduce any new dependencies

* update configs - remove extranneous helpers, clarify naming and comments, removed COMBINED value

* forgot to actually remove COMBINED enum value, this removes it

* add WorkerApp todo for breaking API Client into a scoped client

* rename decideTaskQueueActivity var to routeToTaskQueueActivity

* pr comments

* naming fix

* refactor secretHydrator instantiation

* WorkerApp PR feedback: move API client logic to separate class, use updated configs, etc

* add a RouterService class that is injected into RouteToTaskQueueActivityImpl

* AttemptApi cleanup and added unit test coverage

* fix confusion between AttemptId and AttemptNumber in new AttemptApi

* remove unused getDataPlaneSecretsHydrator

* remove unused import

Co-authored-by: Xiaohan Song <xiaohan@airbyte.io>
2022-08-26 14:10:19 -07:00
Lake Mossman
377a1499cf Move 'updateNew' logic into 'update', and remove 'updateNew' (#15863)
* save

* clean up more usages and remove withRefreshedCatalog

* make webapp use correct endpoint

* add back intercept

* fix acceptance test

* fix log

* remove 'new' from test name
2022-08-23 11:36:48 -07:00
Michael Siega
294ee8f226 Expose cron scheduling in the Connections APIs (#15253)
* Expose cron scheduling in the Connections APIs

* Update airbyte-api/src/main/openapi/config.yaml

Co-authored-by: terencecho <terence@airbyte.io>

* Update airbyte-server/src/test/java/io/airbyte/server/helpers/ConnectionHelpers.java

Co-authored-by: terencecho <terence@airbyte.io>

* update octavia-cli tests for new schedule schema, and fix update API impl

* check for null schedule data before updating

* handle new schedule related fields in generate / apply / import

* update octavia-cli changelog

* ensure that legacy manual schedule flag is consistent with schedule_type

* update octavia cli test coverage for new schedule schema

* fix failing octavia cli integration tests

* fix file diff check

* Update octavia-cli/unit_tests/test_apply/test_resources.py

Co-authored-by: Augustin <augustin.lafanechere@gmail.com>

Co-authored-by: terencecho <terence@airbyte.io>
Co-authored-by: alafanechere <augustin.lafanechere@gmail.com>
2022-08-11 19:27:08 +02:00
Jonathan Pearlin
10bcd9fc73 Generate separate server endpoints per domain (#15513) 2022-08-11 10:05:40 -04:00
terencecho
4910f2502b Add source type to SourceDefinitionRead (#14967) 2022-07-25 09:38:11 -07:00
Anne
2285c2e854 update open api in correct place (#14652)
* update open api in correct place
2022-07-13 10:05:05 -07:00
Harshith Mullapudi
a140c3e6ab fix: clone api doesn't take update configurations (#13592)
* fix: clone api doesn't take update configurations

* fix: you will be able to create clone in different workspace

* fix: added description to source/destination body
2022-07-04 21:29:19 +05:30
Charles
96d021ccbf add state type endpoint (#14111) 2022-06-27 22:40:21 -07:00
Charles
4c6d518154 fix stream name in stream transformation update (#14044) 2022-06-24 07:43:30 -07:00
Charles
2378b87157 add streams to reset to job info (#13919) 2022-06-22 10:52:54 -07:00
Charles
bbb340f9f1 add catalog diff connection read (#13918) 2022-06-22 08:57:36 -07:00
Charles
e89846cba9 update api for per stream (#13835) 2022-06-17 10:59:41 -07: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
Augustin
c3170f9240 airbyte-api: add jackson model annotations to remove null values from responses (#13370) 2022-06-03 12:01:30 +02:00
Evan Tahler
9aaa5135fd Display additional failure information when sync is expanded and jump to relevant log line (#12896)
* Display addtional failure information when sync is expanded

* rename

* Update airbyte-webapp/src/components/JobItem/components/FailureDetails.tsx

Co-authored-by: Tim Roes <tim@airbyte.io>

* fix bad merge

* jump to timestamp

* cleat timestamp when logs colapsed

* speed up search

* rename

* Do what @pedroslopez says

* Rebase from master after big API update

* `floor` matchtimes for greater range matching

* Update airbyte-webapp/src/components/JobItem/components/ErrorDetails.tsx

Co-authored-by: Tim Roes <tim@airbyte.io>

* Update airbyte-webapp/src/components/JobItem/components/ErrorDetails.tsx

Co-authored-by: Tim Roes <tim@airbyte.io>

* Update airbyte-webapp/src/components/JobItem/components/Logs.tsx

Co-authored-by: Tim Roes <tim@airbyte.io>

* Update airbyte-webapp/src/components/JobItem/JobItem.tsx

Co-authored-by: Tim Roes <tim@airbyte.io>

* replace regexp with `dayJs`

* Extract dayjs into globals module

* mach time in full-second resolution

* revert `dayJs` and use `Date.parse`

* Just show failure timestamp rather than scroll

Co-authored-by: Tim Roes <tim@airbyte.io>
2022-05-26 15:36:49 -07:00
Jonathan Pearlin
880c759cac Use "generated" in generated code package names (#13183) 2022-05-26 11:11:23 -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
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