Skip to content

Commit bc7b4cb

Browse files
authored
Add support refreshes to the metadata. (#37472)
1 parent 3417fe8 commit bc7b4cb

15 files changed

+131
-339
lines changed

airbyte-ci/connectors/metadata_service/lib/metadata_service/models/generated/ActorDefinitionResourceRequirements.py

+3-14
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,8 @@ class Config:
2020

2121

2222
class JobType(BaseModel):
23-
__root__: Literal[
24-
"get_spec",
25-
"check_connection",
26-
"discover_schema",
27-
"sync",
28-
"reset_connection",
29-
"connection_updater",
30-
"replicate",
31-
] = Field(
32-
...,
33-
description="enum that describes the different types of jobs that the platform runs.",
34-
title="JobType",
23+
__root__: Literal["get_spec", "check_connection", "discover_schema", "sync", "reset_connection", "connection_updater", "replicate"] = (
24+
Field(..., description="enum that describes the different types of jobs that the platform runs.", title="JobType")
3525
)
3626

3727

@@ -48,7 +38,6 @@ class Config:
4838
extra = Extra.forbid
4939

5040
default: Optional[ResourceRequirements] = Field(
51-
None,
52-
description="if set, these are the requirements that should be set for ALL jobs run for this actor definition.",
41+
None, description="if set, these are the requirements that should be set for ALL jobs run for this actor definition."
5342
)
5443
jobSpecific: Optional[List[JobTypeResourceLimit]] = None

airbyte-ci/connectors/metadata_service/lib/metadata_service/models/generated/ConnectorMetadataDefinitionV0.py

+18-65
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,13 @@ class Config:
2020

2121
class ReleaseStage(BaseModel):
2222
__root__: Literal["alpha", "beta", "generally_available", "custom"] = Field(
23-
...,
24-
description="enum that describes a connector's release stage",
25-
title="ReleaseStage",
23+
..., description="enum that describes a connector's release stage", title="ReleaseStage"
2624
)
2725

2826

2927
class SupportLevel(BaseModel):
3028
__root__: Literal["community", "certified", "archived"] = Field(
31-
...,
32-
description="enum that describes a connector's release stage",
33-
title="SupportLevel",
29+
..., description="enum that describes a connector's release stage", title="SupportLevel"
3430
)
3531

3632

@@ -52,13 +48,9 @@ class Config:
5248
...,
5349
description="a field indicating the name of the repository to be used for normalization. If the value of the flag is NULL - normalization is not used.",
5450
)
55-
normalizationTag: str = Field(
56-
...,
57-
description="a field indicating the tag of the docker repository to be used for normalization.",
58-
)
51+
normalizationTag: str = Field(..., description="a field indicating the tag of the docker repository to be used for normalization.")
5952
normalizationIntegrationType: str = Field(
60-
...,
61-
description="a field indicating the type of integration dialect to use for normalization.",
53+
..., description="a field indicating the type of integration dialect to use for normalization."
6254
)
6355

6456

@@ -83,18 +75,8 @@ class Config:
8375

8476

8577
class JobType(BaseModel):
86-
__root__: Literal[
87-
"get_spec",
88-
"check_connection",
89-
"discover_schema",
90-
"sync",
91-
"reset_connection",
92-
"connection_updater",
93-
"replicate",
94-
] = Field(
95-
...,
96-
description="enum that describes the different types of jobs that the platform runs.",
97-
title="JobType",
78+
__root__: Literal["get_spec", "check_connection", "discover_schema", "sync", "reset_connection", "connection_updater", "replicate"] = (
79+
Field(..., description="enum that describes the different types of jobs that the platform runs.", title="JobType")
9880
)
9981

10082

@@ -103,11 +85,7 @@ class Config:
10385
extra = Extra.forbid
10486

10587
scopeType: Any = Field("stream", const=True)
106-
impactedScopes: List[str] = Field(
107-
...,
108-
description="List of streams that are impacted by the breaking change.",
109-
min_items=1,
110-
)
88+
impactedScopes: List[str] = Field(..., description="List of streams that are impacted by the breaking change.", min_items=1)
11189

11290

11391
class AirbyteInternal(BaseModel):
@@ -135,10 +113,7 @@ class Config:
135113

136114

137115
class BreakingChangeScope(BaseModel):
138-
__root__: StreamBreakingChangeScope = Field(
139-
...,
140-
description="A scope that can be used to limit the impact of a breaking change.",
141-
)
116+
__root__: StreamBreakingChangeScope = Field(..., description="A scope that can be used to limit the impact of a breaking change.")
142117

143118

144119
class RemoteRegistries(BaseModel):
@@ -153,8 +128,7 @@ class Config:
153128
extra = Extra.forbid
154129

155130
default: Optional[ResourceRequirements] = Field(
156-
None,
157-
description="if set, these are the requirements that should be set for ALL jobs run for this actor definition.",
131+
None, description="if set, these are the requirements that should be set for ALL jobs run for this actor definition."
158132
)
159133
jobSpecific: Optional[List[JobTypeResourceLimit]] = None
160134

@@ -163,13 +137,8 @@ class VersionBreakingChange(BaseModel):
163137
class Config:
164138
extra = Extra.forbid
165139

166-
upgradeDeadline: date = Field(
167-
...,
168-
description="The deadline by which to upgrade before the breaking change takes effect.",
169-
)
170-
message: str = Field(
171-
..., description="Descriptive message detailing the breaking change."
172-
)
140+
upgradeDeadline: date = Field(..., description="The deadline by which to upgrade before the breaking change takes effect.")
141+
message: str = Field(..., description="Descriptive message detailing the breaking change.")
173142
migrationDocumentationUrl: Optional[AnyUrl] = Field(
174143
None,
175144
description="URL to documentation on how to migrate to the current version. Defaults to ${documentationUrl}-migrations#${version}",
@@ -205,8 +174,7 @@ class Config:
205174
extra = Extra.forbid
206175

207176
__root__: Dict[constr(regex=r"^\d+\.\d+\.\d+$"), VersionBreakingChange] = Field(
208-
...,
209-
description="Each entry denotes a breaking change in a specific version of a connector that requires user action to upgrade.",
177+
..., description="Each entry denotes a breaking change in a specific version of a connector that requires user action to upgrade."
210178
)
211179

212180

@@ -246,31 +214,15 @@ class Config:
246214
documentationUrl: AnyUrl
247215
githubIssueLabel: str
248216
maxSecondsBetweenMessages: Optional[int] = Field(
249-
None,
250-
description="Maximum delay between 2 airbyte protocol messages, in second. The source will timeout if this delay is reached",
251-
)
252-
releaseDate: Optional[date] = Field(
253-
None,
254-
description="The date when this connector was first released, in yyyy-mm-dd format.",
255-
)
256-
protocolVersion: Optional[str] = Field(
257-
None, description="the Airbyte Protocol version supported by the connector"
217+
None, description="Maximum delay between 2 airbyte protocol messages, in second. The source will timeout if this delay is reached"
258218
)
259-
connectorSubtype: Literal[
260-
"api",
261-
"database",
262-
"datalake",
263-
"file",
264-
"custom",
265-
"message_queue",
266-
"unknown",
267-
"vectorstore",
268-
]
219+
releaseDate: Optional[date] = Field(None, description="The date when this connector was first released, in yyyy-mm-dd format.")
220+
protocolVersion: Optional[str] = Field(None, description="the Airbyte Protocol version supported by the connector")
221+
connectorSubtype: Literal["api", "database", "datalake", "file", "custom", "message_queue", "unknown", "vectorstore"]
269222
releaseStage: ReleaseStage
270223
supportLevel: Optional[SupportLevel] = None
271224
tags: Optional[List[str]] = Field(
272-
[],
273-
description="An array of tags that describe the connector. E.g: language:python, keyword:rds, etc.",
225+
[], description="An array of tags that describe the connector. E.g: language:python, keyword:rds, etc."
274226
)
275227
registries: Optional[Registry] = None
276228
allowedHosts: Optional[AllowedHosts] = None
@@ -280,6 +232,7 @@ class Config:
280232
resourceRequirements: Optional[ActorDefinitionResourceRequirements] = None
281233
ab_internal: Optional[AirbyteInternal] = None
282234
remoteRegistries: Optional[RemoteRegistries] = None
235+
supportsRefreshes: Optional[bool] = None
283236

284237

285238
class ConnectorMetadataDefinitionV0(BaseModel):

airbyte-ci/connectors/metadata_service/lib/metadata_service/models/generated/ConnectorRegistryDestinationDefinition.py

+18-62
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,13 @@
1313

1414
class ReleaseStage(BaseModel):
1515
__root__: Literal["alpha", "beta", "generally_available", "custom"] = Field(
16-
...,
17-
description="enum that describes a connector's release stage",
18-
title="ReleaseStage",
16+
..., description="enum that describes a connector's release stage", title="ReleaseStage"
1917
)
2018

2119

2220
class SupportLevel(BaseModel):
2321
__root__: Literal["community", "certified", "archived"] = Field(
24-
...,
25-
description="enum that describes a connector's release stage",
26-
title="SupportLevel",
22+
..., description="enum that describes a connector's release stage", title="SupportLevel"
2723
)
2824

2925

@@ -38,18 +34,8 @@ class Config:
3834

3935

4036
class JobType(BaseModel):
41-
__root__: Literal[
42-
"get_spec",
43-
"check_connection",
44-
"discover_schema",
45-
"sync",
46-
"reset_connection",
47-
"connection_updater",
48-
"replicate",
49-
] = Field(
50-
...,
51-
description="enum that describes the different types of jobs that the platform runs.",
52-
title="JobType",
37+
__root__: Literal["get_spec", "check_connection", "discover_schema", "sync", "reset_connection", "connection_updater", "replicate"] = (
38+
Field(..., description="enum that describes the different types of jobs that the platform runs.", title="JobType")
5339
)
5440

5541

@@ -61,13 +47,9 @@ class Config:
6147
...,
6248
description="a field indicating the name of the repository to be used for normalization. If the value of the flag is NULL - normalization is not used.",
6349
)
64-
normalizationTag: str = Field(
65-
...,
66-
description="a field indicating the tag of the docker repository to be used for normalization.",
67-
)
50+
normalizationTag: str = Field(..., description="a field indicating the tag of the docker repository to be used for normalization.")
6851
normalizationIntegrationType: str = Field(
69-
...,
70-
description="a field indicating the type of integration dialect to use for normalization.",
52+
..., description="a field indicating the type of integration dialect to use for normalization."
7153
)
7254

7355

@@ -86,11 +68,7 @@ class Config:
8668
extra = Extra.forbid
8769

8870
scopeType: Any = Field("stream", const=True)
89-
impactedScopes: List[str] = Field(
90-
...,
91-
description="List of streams that are impacted by the breaking change.",
92-
min_items=1,
93-
)
71+
impactedScopes: List[str] = Field(..., description="List of streams that are impacted by the breaking change.", min_items=1)
9472

9573

9674
class AirbyteInternal(BaseModel):
@@ -110,19 +88,15 @@ class Config:
11088

11189

11290
class BreakingChangeScope(BaseModel):
113-
__root__: StreamBreakingChangeScope = Field(
114-
...,
115-
description="A scope that can be used to limit the impact of a breaking change.",
116-
)
91+
__root__: StreamBreakingChangeScope = Field(..., description="A scope that can be used to limit the impact of a breaking change.")
11792

11893

11994
class ActorDefinitionResourceRequirements(BaseModel):
12095
class Config:
12196
extra = Extra.forbid
12297

12398
default: Optional[ResourceRequirements] = Field(
124-
None,
125-
description="if set, these are the requirements that should be set for ALL jobs run for this actor definition.",
99+
None, description="if set, these are the requirements that should be set for ALL jobs run for this actor definition."
126100
)
127101
jobSpecific: Optional[List[JobTypeResourceLimit]] = None
128102

@@ -131,13 +105,8 @@ class VersionBreakingChange(BaseModel):
131105
class Config:
132106
extra = Extra.forbid
133107

134-
upgradeDeadline: date = Field(
135-
...,
136-
description="The deadline by which to upgrade before the breaking change takes effect.",
137-
)
138-
message: str = Field(
139-
..., description="Descriptive message detailing the breaking change."
140-
)
108+
upgradeDeadline: date = Field(..., description="The deadline by which to upgrade before the breaking change takes effect.")
109+
message: str = Field(..., description="Descriptive message detailing the breaking change.")
141110
migrationDocumentationUrl: Optional[AnyUrl] = Field(
142111
None,
143112
description="URL to documentation on how to migrate to the current version. Defaults to ${documentationUrl}-migrations#${version}",
@@ -154,8 +123,7 @@ class Config:
154123
extra = Extra.forbid
155124

156125
__root__: Dict[constr(regex=r"^\d+\.\d+\.\d+$"), VersionBreakingChange] = Field(
157-
...,
158-
description="Each entry denotes a breaking change in a specific version of a connector that requires user action to upgrade.",
126+
..., description="Each entry denotes a breaking change in a specific version of a connector that requires user action to upgrade."
159127
)
160128

161129

@@ -183,30 +151,18 @@ class Config:
183151
iconUrl: Optional[str] = None
184152
spec: Dict[str, Any]
185153
tombstone: Optional[bool] = Field(
186-
False,
187-
description="if false, the configuration is active. if true, then this configuration is permanently off.",
188-
)
189-
public: Optional[bool] = Field(
190-
False,
191-
description="true if this connector definition is available to all workspaces",
192-
)
193-
custom: Optional[bool] = Field(
194-
False, description="whether this is a custom connector definition"
154+
False, description="if false, the configuration is active. if true, then this configuration is permanently off."
195155
)
156+
public: Optional[bool] = Field(False, description="true if this connector definition is available to all workspaces")
157+
custom: Optional[bool] = Field(False, description="whether this is a custom connector definition")
196158
releaseStage: Optional[ReleaseStage] = None
197159
supportLevel: Optional[SupportLevel] = None
198-
releaseDate: Optional[date] = Field(
199-
None,
200-
description="The date when this connector was first released, in yyyy-mm-dd format.",
201-
)
160+
releaseDate: Optional[date] = Field(None, description="The date when this connector was first released, in yyyy-mm-dd format.")
202161
tags: Optional[List[str]] = Field(
203-
None,
204-
description="An array of tags that describe the connector. E.g: language:python, keyword:rds, etc.",
162+
None, description="An array of tags that describe the connector. E.g: language:python, keyword:rds, etc."
205163
)
206164
resourceRequirements: Optional[ActorDefinitionResourceRequirements] = None
207-
protocolVersion: Optional[str] = Field(
208-
None, description="the Airbyte Protocol version supported by the connector"
209-
)
165+
protocolVersion: Optional[str] = Field(None, description="the Airbyte Protocol version supported by the connector")
210166
normalizationConfig: Optional[NormalizationDestinationDefinitionConfig] = None
211167
supportsDbt: Optional[bool] = Field(
212168
None,

0 commit comments

Comments
 (0)