Skip to content

Commit f812e04

Browse files
clnollElla Rohm-Ensing
and
Ella Rohm-Ensing
committed
feat: new & updated API endpoints and schema for connector rollouts (#13864)
Co-authored-by: Ella Rohm-Ensing <[email protected]>
1 parent 5d8b230 commit f812e04

File tree

21 files changed

+1323
-208
lines changed

21 files changed

+1323
-208
lines changed

airbyte-api/server-api/src/main/openapi/config.yaml

+164-43
Original file line numberDiff line numberDiff line change
@@ -4995,7 +4995,8 @@ paths:
49954995
application/json:
49964996
schema:
49974997
$ref: "#/components/schemas/ConnectorRolloutReadResponse"
4998-
4998+
"404":
4999+
$ref: "#/components/responses/NotFoundResponse"
49995000
"422":
50005001
$ref: "#/components/responses/InvalidInputResponse"
50015002

@@ -5004,25 +5005,75 @@ paths:
50045005
tags:
50055006
- connector_rollout
50065007

5007-
/v1/connector_rollout/update:
5008+
/v1/connector_rollout/start:
50085009
post:
50095010
requestBody:
50105011
content:
50115012
application/json:
50125013
schema:
5013-
$ref: "#/components/schemas/ConnectorRolloutUpdateRequestBody"
5014+
$ref: "#/components/schemas/ConnectorRolloutStartRequestBody"
5015+
responses:
5016+
"200":
5017+
description: Started connector rollout object
5018+
content:
5019+
application/json:
5020+
schema:
5021+
$ref: "#/components/schemas/ConnectorRolloutStartResponse"
5022+
"404":
5023+
$ref: "#/components/responses/NotFoundResponse"
5024+
"422":
5025+
$ref: "#/components/responses/InvalidInputResponse"
5026+
5027+
summary: Start a connector rollout by ID. This will update the state of the rollout from INITIALIZED to WORKFLOW_STARTED, and add the Temporal run ID of the workflow to the rollout entry.
5028+
operationId: startConnectorRollout
5029+
tags:
5030+
- connector_rollout
5031+
5032+
/v1/connector_rollout/rollout:
5033+
post:
5034+
requestBody:
5035+
content:
5036+
application/json:
5037+
schema:
5038+
$ref: "#/components/schemas/ConnectorRolloutRequestBody"
50145039
responses:
50155040
"200":
50165041
description: Updated connector rollout object
50175042
content:
50185043
application/json:
50195044
schema:
5020-
$ref: "#/components/schemas/ConnectorRolloutUpdateResponse"
5045+
$ref: "#/components/schemas/ConnectorRolloutResponse"
5046+
"404":
5047+
$ref: "#/components/responses/NotFoundResponse"
50215048
"422":
50225049
$ref: "#/components/responses/InvalidInputResponse"
50235050

5024-
summary: Update a connector rollout by ID
5025-
operationId: updateConnectorRollout
5051+
summary: Roll out a release candidate. This will pin the actors to the release candidate version ID.
5052+
operationId: doConnectorRollout
5053+
tags:
5054+
- connector_rollout
5055+
5056+
/v1/connector_rollout/finalize:
5057+
post:
5058+
requestBody:
5059+
content:
5060+
application/json:
5061+
schema:
5062+
$ref: "#/components/schemas/ConnectorRolloutFinalizeRequestBody"
5063+
responses:
5064+
"200":
5065+
description: Finalized connector rollout object
5066+
content:
5067+
application/json:
5068+
schema:
5069+
$ref: "#/components/schemas/ConnectorRolloutFinalizeResponse"
5070+
"404":
5071+
$ref: "#/components/responses/NotFoundResponse"
5072+
"422":
5073+
$ref: "#/components/responses/InvalidInputResponse"
5074+
5075+
summary: Finalize a connector rollout by ID. This will unpin all actors that have been pinned to the release candidate version.
5076+
operationId: finalizeConnectorRollout
50265077
tags:
50275078
- connector_rollout
50285079

@@ -6978,10 +7029,18 @@ components:
69787029
# Connector Rollouts
69797030
ConnectorRolloutRead:
69807031
type: object
7032+
required:
7033+
- id
7034+
- actor_definition_id
7035+
- release_candidate_version_id
7036+
- initial_version_id
7037+
- state
69817038
properties:
69827039
id:
69837040
type: string
69847041
format: uuid
7042+
workflow_run_id:
7043+
type: string
69857044
actor_definition_id:
69867045
type: string
69877046
format: uuid
@@ -6997,19 +7056,23 @@ components:
69977056
type: integer
69987057
minimum: 0
69997058
maximum: 100
7059+
format: int32
70007060
current_target_rollout_pct:
70017061
type: integer
70027062
minimum: 0
70037063
maximum: 100
7064+
format: int32
70047065
final_target_rollout_pct:
70057066
type: integer
70067067
minimum: 0
70077068
maximum: 100
7069+
format: int32
70087070
has_breaking_changes:
70097071
type: boolean
70107072
max_step_wait_time_mins:
70117073
type: integer
70127074
minimum: 0
7075+
format: int32
70137076
updated_by:
70147077
type: string
70157078
format: uuid
@@ -7036,6 +7099,7 @@ components:
70367099
type: string
70377100
enum:
70387101
- initialized
7102+
- workflow_started
70397103
- in_progress
70407104
- paused
70417105
- finalizing
@@ -7044,6 +7108,13 @@ components:
70447108
- failed_rolled_back
70457109
- canceled_rolled_back
70467110

7111+
ConnectorRolloutStateTerminal:
7112+
type: string
7113+
enum:
7114+
- succeeded
7115+
- failed_rolled_back
7116+
- canceled_rolled_back
7117+
70477118
ConnectorRolloutStrategy:
70487119
type: string
70497120
enum:
@@ -7054,14 +7125,17 @@ components:
70547125
ConnectorRolloutListRequestBody:
70557126
type: object
70567127
required:
7057-
- sourceDefinitionId
7058-
- dockerImageTag
7128+
- docker_repository
7129+
- docker_image_tag
7130+
- source_definition_id
70597131
properties:
7060-
sourceDefinitionId:
7132+
docker_repository:
70617133
type: string
7062-
format: UUID
7063-
dockerImageTag:
7134+
docker_image_tag:
7135+
type: string
7136+
source_definition_id:
70647137
type: string
7138+
format: uuid
70657139

70667140
ConnectorRolloutListResponse:
70677141
type: object
@@ -7074,59 +7148,41 @@ components:
70747148
ConnectorRolloutCreateRequestBody:
70757149
type: object
70767150
required:
7077-
- id
7151+
- docker_repository
7152+
- docker_image_tag
70787153
- actor_definition_id
7079-
- release_candidate_version_id
7080-
- state
7081-
- initial_rollout_pct
7082-
- final_target_rollout_pct
7083-
- has_breaking_changes
7084-
- max_step_wait_time_mins
7085-
- expires_at
70867154
properties:
7087-
id:
7155+
docker_repository:
70887156
type: string
7089-
format: uuid
7090-
actor_definition_id:
7157+
docker_image_tag:
70917158
type: string
7092-
format: uuid
7093-
release_candidate_version_id:
7159+
actor_definition_id:
70947160
type: string
70957161
format: uuid
7096-
state:
7097-
$ref: "#/components/schemas/ConnectorRolloutState"
70987162
initial_rollout_pct:
70997163
type: integer
7100-
minimum: 1
7101-
maximum: 100
7102-
current_target_rollout_pct:
7103-
type: integer
7164+
format: int32
71047165
minimum: 1
71057166
maximum: 100
71067167
final_target_rollout_pct:
71077168
type: integer
7169+
format: int32
71087170
minimum: 1
71097171
maximum: 100
71107172
has_breaking_changes:
71117173
type: boolean
71127174
max_step_wait_time_mins:
71137175
type: integer
7176+
format: int32
71147177
minimum: 0
7115-
updated_by:
7116-
type: string
7117-
format: uuid
7118-
error_msg:
7119-
type: string
7120-
failed_reason:
7121-
type: string
7122-
rollout_strategy:
7123-
$ref: "#/components/schemas/ConnectorRolloutStrategy"
71247178
expires_at:
71257179
type: string
71267180
format: date-time
71277181

71287182
ConnectorRolloutCreateResponse:
71297183
type: object
7184+
required:
7185+
- data
71307186
properties:
71317187
data:
71327188
$ref: "#/components/schemas/ConnectorRolloutRead"
@@ -7142,24 +7198,89 @@ components:
71427198

71437199
ConnectorRolloutReadResponse:
71447200
type: object
7201+
required:
7202+
- data
71457203
properties:
71467204
data:
71477205
$ref: "#/components/schemas/ConnectorRolloutRead"
71487206

7149-
ConnectorRolloutUpdateRequestBody:
7207+
ConnectorRolloutStartRequestBody:
7208+
type: object
7209+
required:
7210+
- docker_repository
7211+
- docker_image_tag
7212+
- actor_definition_id
7213+
- workflow_run_id
7214+
- rollout_strategy
7215+
properties:
7216+
docker_repository:
7217+
type: string
7218+
docker_image_tag:
7219+
type: string
7220+
actor_definition_id:
7221+
type: string
7222+
format: uuid
7223+
workflow_run_id:
7224+
type: string
7225+
rollout_strategy:
7226+
$ref: "#/components/schemas/ConnectorRolloutStrategy"
7227+
7228+
ConnectorRolloutStartResponse:
71507229
type: object
71517230
required:
7152-
- id
71537231
- data
7232+
properties:
7233+
data:
7234+
$ref: "#/components/schemas/ConnectorRolloutRead"
7235+
7236+
ConnectorRolloutRequestBody:
7237+
type: object
7238+
required:
7239+
- id
7240+
- actor_ids
7241+
- rollout_strategy
71547242
properties:
71557243
id:
71567244
type: string
71577245
format: uuid
7246+
actor_ids:
7247+
type: array
7248+
items:
7249+
$ref: "#/components/schemas/ActorId"
7250+
rollout_strategy:
7251+
$ref: "#/components/schemas/ConnectorRolloutStrategy"
7252+
7253+
ConnectorRolloutResponse:
7254+
type: object
7255+
required:
7256+
- data
7257+
properties:
71587258
data:
7159-
$ref: "#/components/schemas/ConnectorRolloutCreateRequestBody"
7259+
$ref: "#/components/schemas/ConnectorRolloutRead"
7260+
7261+
ConnectorRolloutFinalizeRequestBody:
7262+
type: object
7263+
required:
7264+
- id
7265+
- state
7266+
- rollout_strategy
7267+
properties:
7268+
id:
7269+
type: string
7270+
format: uuid
7271+
state:
7272+
$ref: "#/components/schemas/ConnectorRolloutStateTerminal"
7273+
error_msg:
7274+
type: string
7275+
failed_reason:
7276+
type: string
7277+
rollout_strategy:
7278+
$ref: "#/components/schemas/ConnectorRolloutStrategy"
71607279

7161-
ConnectorRolloutUpdateResponse:
7280+
ConnectorRolloutFinalizeResponse:
71627281
type: object
7282+
required:
7283+
- data
71637284
properties:
71647285
data:
71657286
$ref: "#/components/schemas/ConnectorRolloutRead"

airbyte-bootloader/src/test-integration/java/io/airbyte/bootloader/BootloaderTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class BootloaderTest {
101101

102102
// ⚠️ This line should change with every new migration to show that you meant to make a new
103103
// migration to the prod database
104-
private static final String CURRENT_CONFIGS_MIGRATION_VERSION = "0.57.5.001";
104+
private static final String CURRENT_CONFIGS_MIGRATION_VERSION = "0.58.00.001";
105105
private static final String CURRENT_JOBS_MIGRATION_VERSION = "0.57.2.005";
106106

107107
@BeforeEach

airbyte-commons-server/build.gradle.kts

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ dependencies {
7474
testAnnotationProcessor(libs.bundles.micronaut.test.annotation.processor)
7575

7676
testImplementation(project(":oss:airbyte-test-utils"))
77+
testImplementation("org.jetbrains.kotlin:kotlin-reflect")
7778
testImplementation(libs.postgresql)
7879
testImplementation(libs.platform.testcontainers.postgresql)
7980
testImplementation(libs.mockwebserver)

0 commit comments

Comments
 (0)