-
Notifications
You must be signed in to change notification settings - Fork 4.5k
metadata-service: add connectorTestSuitesOptions
#38116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
alafanechere
merged 1 commit into
master
from
augustin/05-10-metadata-service_add_connectorTestOptions
May 13, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...ctors/metadata_service/lib/metadata_service/models/generated/ConnectorTestSuiteOptions.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# generated by datamodel-codegen: | ||
# filename: ConnectorTestSuiteOptions.yaml | ||
|
||
from __future__ import annotations | ||
|
||
from typing import List, Optional | ||
|
||
from pydantic import BaseModel, Extra, Field | ||
from typing_extensions import Literal | ||
|
||
|
||
class SecretStore(BaseModel): | ||
class Config: | ||
extra = Extra.forbid | ||
|
||
alias: Optional[str] = Field(None, description="The alias of the secret store which can map to its actual secret address") | ||
type: Optional[Literal["GSM"]] = Field(None, description="The type of the secret store") | ||
|
||
|
||
class Secret(BaseModel): | ||
class Config: | ||
extra = Extra.forbid | ||
|
||
name: str = Field(..., description="The secret name in the secret store") | ||
fileName: Optional[str] = Field(None, description="The name of the file to which the secret value would be persisted") | ||
secretStore: SecretStore | ||
|
||
|
||
class ConnectorTestSuiteOptions(BaseModel): | ||
class Config: | ||
extra = Extra.forbid | ||
|
||
suite: Literal["unitTests", "integrationTests", "acceptanceTests"] = Field(..., description="Name of the configured test suite") | ||
testSecrets: Optional[List[Secret]] = Field(None, description="List of secrets required to run the test suite") |
26 changes: 26 additions & 0 deletions
26
airbyte-ci/connectors/metadata_service/lib/metadata_service/models/generated/Secret.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# generated by datamodel-codegen: | ||
# filename: Secret.yaml | ||
|
||
from __future__ import annotations | ||
|
||
from typing import Optional | ||
|
||
from pydantic import BaseModel, Extra, Field | ||
from typing_extensions import Literal | ||
|
||
|
||
class SecretStore(BaseModel): | ||
class Config: | ||
extra = Extra.forbid | ||
|
||
alias: Optional[str] = Field(None, description="The alias of the secret store which can map to its actual secret address") | ||
type: Optional[Literal["GSM"]] = Field(None, description="The type of the secret store") | ||
|
||
|
||
class Secret(BaseModel): | ||
class Config: | ||
extra = Extra.forbid | ||
|
||
name: str = Field(..., description="The secret name in the secret store") | ||
fileName: Optional[str] = Field(None, description="The name of the file to which the secret value would be persisted") | ||
secretStore: SecretStore |
17 changes: 17 additions & 0 deletions
17
airbyte-ci/connectors/metadata_service/lib/metadata_service/models/generated/SecretStore.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# generated by datamodel-codegen: | ||
# filename: SecretStore.yaml | ||
|
||
from __future__ import annotations | ||
|
||
from typing import Optional | ||
|
||
from pydantic import BaseModel, Extra, Field | ||
from typing_extensions import Literal | ||
|
||
|
||
class SecretStore(BaseModel): | ||
class Config: | ||
extra = Extra.forbid | ||
|
||
alias: Optional[str] = Field(None, description="The alias of the secret store which can map to its actual secret address") | ||
type: Optional[Literal["GSM"]] = Field(None, description="The type of the secret store") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...onnectors/metadata_service/lib/metadata_service/models/src/ConnectorTestSuiteOptions.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
"$schema": http://json-schema.org/draft-07/schema# | ||
"$id": https://github.com/airbytehq/airbyte/airbyte-ci/connectors/metadata_service/lib/metadata_service/models/src/ConnectorTestOptions.yaml | ||
title: ConnectorTestSuiteOptions | ||
description: Options for a specific connector test suite. | ||
type: object | ||
required: | ||
- suite | ||
additionalProperties: false | ||
properties: | ||
suite: | ||
description: "Name of the configured test suite" | ||
type: string | ||
enum: | ||
- "unitTests" | ||
- "integrationTests" | ||
- "acceptanceTests" | ||
testSecrets: | ||
description: "List of secrets required to run the test suite" | ||
type: array | ||
items: | ||
"$ref": "Secret.yaml" |
19 changes: 19 additions & 0 deletions
19
airbyte-ci/connectors/metadata_service/lib/metadata_service/models/src/Secret.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
"$schema": http://json-schema.org/draft-07/schema# | ||
"$id": https://github.com/airbytehq/airbyte/airbyte-ci/connectors/metadata_service/lib/metadata_service/models/src/TestSecret.yaml | ||
title: Secret | ||
description: An object describing a secret's metadata | ||
type: object | ||
required: | ||
- name | ||
- secretStore | ||
additionalProperties: false | ||
properties: | ||
name: | ||
type: string | ||
description: "The secret name in the secret store" | ||
fileName: | ||
type: string | ||
description: "The name of the file to which the secret value would be persisted" | ||
secretStore: | ||
"$ref": SecretStore.yaml |
19 changes: 19 additions & 0 deletions
19
airbyte-ci/connectors/metadata_service/lib/metadata_service/models/src/SecretStore.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
"$schema": http://json-schema.org/draft-07/schema# | ||
"$id": https://github.com/airbytehq/airbyte/airbyte-ci/connectors/metadata_service/lib/metadata_service/models/src/TestSecret.yaml | ||
title: SecretStore | ||
description: An object describing a secret store metadata | ||
type: object | ||
required: | ||
- name | ||
- secretStore | ||
additionalProperties: false | ||
properties: | ||
alias: | ||
type: string | ||
description: "The alias of the secret store which can map to its actual secret address" | ||
type: | ||
type: string | ||
description: "The type of the secret store" | ||
enum: | ||
- "GSM" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "metadata-service" | ||
version = "0.6.0" | ||
version = "0.7.0" | ||
description = "" | ||
authors = ["Ben Church <[email protected]>"] | ||
readme = "README.md" | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ Given that
What do you think of a format that
connectorTestSuitesOptions.suite. integrationTests.enabled = false
to disable a test suiteexample:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bnchrch I think I like the
enabled
field. But I think I prefer keeping per test suites secrets as it explicitly declares test suite secrets requirements.If we'd go with your suggestion
airbyte-ci
would have to eagerly mount the secrets declared in settings to each test suites even if they're not required. I'd prefer to keep things as explicit as possible and have a way to assess which test suite needs which secret... Does it sound reasonable?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds very reasonable! Approved!