Skip to content

Commit 1f1744f

Browse files
authored
metadata-service: add connectorTestSuitesOptions (#38116)
1 parent c03d1d6 commit 1f1744f

File tree

10 files changed

+171
-1
lines changed

10 files changed

+171
-1
lines changed

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

+26
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ class Config:
1818
baseImage: Optional[str] = None
1919

2020

21+
class SecretStore(BaseModel):
22+
class Config:
23+
extra = Extra.forbid
24+
25+
alias: Optional[str] = Field(None, description="The alias of the secret store which can map to its actual secret address")
26+
type: Optional[Literal["GSM"]] = Field(None, description="The type of the secret store")
27+
28+
2129
class ReleaseStage(BaseModel):
2230
__root__: Literal["alpha", "beta", "generally_available", "custom"] = Field(
2331
..., description="enum that describes a connector's release stage", title="ReleaseStage"
@@ -122,6 +130,15 @@ class SourceFileInfo(BaseModel):
122130
registry_entry_generated_at: Optional[str] = None
123131

124132

133+
class Secret(BaseModel):
134+
class Config:
135+
extra = Extra.forbid
136+
137+
name: str = Field(..., description="The secret name in the secret store")
138+
fileName: Optional[str] = Field(None, description="The name of the file to which the secret value would be persisted")
139+
secretStore: SecretStore
140+
141+
125142
class JobTypeResourceLimit(BaseModel):
126143
class Config:
127144
extra = Extra.forbid
@@ -146,6 +163,14 @@ class GeneratedFields(BaseModel):
146163
source_file_info: Optional[SourceFileInfo] = None
147164

148165

166+
class ConnectorTestSuiteOptions(BaseModel):
167+
class Config:
168+
extra = Extra.forbid
169+
170+
suite: Literal["unitTests", "integrationTests", "acceptanceTests"] = Field(..., description="Name of the configured test suite")
171+
testSecrets: Optional[List[Secret]] = Field(None, description="List of secrets required to run the test suite")
172+
173+
149174
class ActorDefinitionResourceRequirements(BaseModel):
150175
class Config:
151176
extra = Extra.forbid
@@ -228,6 +253,7 @@ class Config:
228253
icon: Optional[str] = None
229254
definitionId: UUID
230255
connectorBuildOptions: Optional[ConnectorBuildOptions] = None
256+
connectorTestSuitesOptions: Optional[List[ConnectorTestSuiteOptions]] = None
231257
connectorType: Literal["destination", "source"]
232258
dockerRepository: str
233259
dockerImageTag: str
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# generated by datamodel-codegen:
2+
# filename: ConnectorTestSuiteOptions.yaml
3+
4+
from __future__ import annotations
5+
6+
from typing import List, Optional
7+
8+
from pydantic import BaseModel, Extra, Field
9+
from typing_extensions import Literal
10+
11+
12+
class SecretStore(BaseModel):
13+
class Config:
14+
extra = Extra.forbid
15+
16+
alias: Optional[str] = Field(None, description="The alias of the secret store which can map to its actual secret address")
17+
type: Optional[Literal["GSM"]] = Field(None, description="The type of the secret store")
18+
19+
20+
class Secret(BaseModel):
21+
class Config:
22+
extra = Extra.forbid
23+
24+
name: str = Field(..., description="The secret name in the secret store")
25+
fileName: Optional[str] = Field(None, description="The name of the file to which the secret value would be persisted")
26+
secretStore: SecretStore
27+
28+
29+
class ConnectorTestSuiteOptions(BaseModel):
30+
class Config:
31+
extra = Extra.forbid
32+
33+
suite: Literal["unitTests", "integrationTests", "acceptanceTests"] = Field(..., description="Name of the configured test suite")
34+
testSecrets: Optional[List[Secret]] = Field(None, description="List of secrets required to run the test suite")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# generated by datamodel-codegen:
2+
# filename: Secret.yaml
3+
4+
from __future__ import annotations
5+
6+
from typing import Optional
7+
8+
from pydantic import BaseModel, Extra, Field
9+
from typing_extensions import Literal
10+
11+
12+
class SecretStore(BaseModel):
13+
class Config:
14+
extra = Extra.forbid
15+
16+
alias: Optional[str] = Field(None, description="The alias of the secret store which can map to its actual secret address")
17+
type: Optional[Literal["GSM"]] = Field(None, description="The type of the secret store")
18+
19+
20+
class Secret(BaseModel):
21+
class Config:
22+
extra = Extra.forbid
23+
24+
name: str = Field(..., description="The secret name in the secret store")
25+
fileName: Optional[str] = Field(None, description="The name of the file to which the secret value would be persisted")
26+
secretStore: SecretStore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# generated by datamodel-codegen:
2+
# filename: SecretStore.yaml
3+
4+
from __future__ import annotations
5+
6+
from typing import Optional
7+
8+
from pydantic import BaseModel, Extra, Field
9+
from typing_extensions import Literal
10+
11+
12+
class SecretStore(BaseModel):
13+
class Config:
14+
extra = Extra.forbid
15+
16+
alias: Optional[str] = Field(None, description="The alias of the secret store which can map to its actual secret address")
17+
type: Optional[Literal["GSM"]] = Field(None, description="The type of the secret store")

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

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from .ConnectorRegistrySourceDefinition import *
1010
from .ConnectorRegistryV0 import *
1111
from .ConnectorReleases import *
12+
from .ConnectorTestSuiteOptions import *
1213
from .GeneratedFields import *
1314
from .GitInfo import *
1415
from .JobType import *
@@ -17,6 +18,8 @@
1718
from .ReleaseStage import *
1819
from .RemoteRegistries import *
1920
from .ResourceRequirements import *
21+
from .Secret import *
22+
from .SecretStore import *
2023
from .SourceFileInfo import *
2124
from .SuggestedStreams import *
2225
from .SupportLevel import *

airbyte-ci/connectors/metadata_service/lib/metadata_service/models/src/ConnectorMetadataDefinitionV0.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ properties:
3636
format: uuid
3737
connectorBuildOptions:
3838
"$ref": ConnectorBuildOptions.yaml
39+
connectorTestSuitesOptions:
40+
type: array
41+
items:
42+
"$ref": ConnectorTestSuiteOptions.yaml
3943
connectorType:
4044
type: string
4145
enum:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
"$schema": http://json-schema.org/draft-07/schema#
3+
"$id": https://github.com/airbytehq/airbyte/airbyte-ci/connectors/metadata_service/lib/metadata_service/models/src/ConnectorTestOptions.yaml
4+
title: ConnectorTestSuiteOptions
5+
description: Options for a specific connector test suite.
6+
type: object
7+
required:
8+
- suite
9+
additionalProperties: false
10+
properties:
11+
suite:
12+
description: "Name of the configured test suite"
13+
type: string
14+
enum:
15+
- "unitTests"
16+
- "integrationTests"
17+
- "acceptanceTests"
18+
testSecrets:
19+
description: "List of secrets required to run the test suite"
20+
type: array
21+
items:
22+
"$ref": "Secret.yaml"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
"$schema": http://json-schema.org/draft-07/schema#
3+
"$id": https://github.com/airbytehq/airbyte/airbyte-ci/connectors/metadata_service/lib/metadata_service/models/src/TestSecret.yaml
4+
title: Secret
5+
description: An object describing a secret's metadata
6+
type: object
7+
required:
8+
- name
9+
- secretStore
10+
additionalProperties: false
11+
properties:
12+
name:
13+
type: string
14+
description: "The secret name in the secret store"
15+
fileName:
16+
type: string
17+
description: "The name of the file to which the secret value would be persisted"
18+
secretStore:
19+
"$ref": SecretStore.yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
"$schema": http://json-schema.org/draft-07/schema#
3+
"$id": https://github.com/airbytehq/airbyte/airbyte-ci/connectors/metadata_service/lib/metadata_service/models/src/TestSecret.yaml
4+
title: SecretStore
5+
description: An object describing a secret store metadata
6+
type: object
7+
required:
8+
- name
9+
- secretStore
10+
additionalProperties: false
11+
properties:
12+
alias:
13+
type: string
14+
description: "The alias of the secret store which can map to its actual secret address"
15+
type:
16+
type: string
17+
description: "The type of the secret store"
18+
enum:
19+
- "GSM"

airbyte-ci/connectors/metadata_service/lib/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "metadata-service"
3-
version = "0.6.0"
3+
version = "0.7.0"
44
description = ""
55
authors = ["Ben Church <[email protected]>"]
66
readme = "README.md"

0 commit comments

Comments
 (0)