-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
🎉 CAT: Add allowedHosts
and suggestedSteams
checks for metadata.yaml
for connectors ql >= 400
#34358
🎉 CAT: Add allowedHosts
and suggestedSteams
checks for metadata.yaml
for connectors ql >= 400
#34358
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
allowedHosts
and suggestedSteams
checks for metadata.yaml
for connectors >= ql: 400
allowedHosts
and suggestedSteams
checks for metadata.yaml
for connectors ql >= 400
...te-integrations/bases/connector-acceptance-test/connector_acceptance_test/tests/test_core.py
Show resolved
Hide resolved
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.
a couple of nits and suggestions, will approve afterwards
@@ -197,6 +209,10 @@ class ConnectorAttributesConfig(BaseConfig): | |||
streams_without_primary_key: Optional[List[NoPrimaryKeyConfiguration]] = Field( | |||
description="Streams that do not support a primary key such as reports streams" | |||
) | |||
allowed_hosts: Optional[AllowedHostsConfiguration] = Field( | |||
description="The list of external whitelisted resources the connector is allowed to communicate with." |
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.
This and the suggested_streams
descriptions aren't quite accurate. These are describing how the field is used in the metadata.yaml
, but we should actually use a description that this setting is used when a source does not have external resources for example:
"Used to bypass checking the allowedHosts field in a source's metadata.yaml when all external hosts should be reachable"
And the same for suggested_streams, we should say that this is intended to be the override field not the suggested streams themselves
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.
Changed.
metadata = connector_metadata.get("data", {}) | ||
|
||
has_allowed_hosts_property = "allowedHosts" in metadata.keys() | ||
assert has_allowed_hosts_property, f"The `AllowedHosts` property is missing in `metadata.data` for `metadata.yaml`." |
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.
nit: but in metadata.yaml
is defined as camel case not capitalized: allowedHosts
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.
Corrected.
...te-integrations/bases/connector-acceptance-test/connector_acceptance_test/tests/test_core.py
Show resolved
Hide resolved
…owedhosts-suggestedstreams-tests
…owedhosts-suggestedstreams-tests
@brianjlai The review comments were considered, please checkout. |
…owedhosts-suggestedstreams-tests
@maxi297 Could you please finalize the review from the part of Airbyte? Thank you. |
…owedhosts-suggestedstreams-tests
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.
…yaml` for connectors `ql >= 400` (airbytehq#34358)
…yaml` for connectors `ql >= 400` (airbytehq#34358)
…yaml` for connectors `ql >= 400` (airbytehq#34358)
What
Resolving: #33566
How
connector_attribute
test suite:test_certified_connector_has_allowed_hosts
test_certified_connector_has_suggested_streams
unit_tests
Tests
The tests were running against
source-faker
, with modifiedacceptance-test-config.yml
:To check the use-cases, please refer to the
unit_tests
.🚨 User Impact 🚨
No impact is expected, to enable additional
metadata.yaml
checks, theconnector_attributes
config, should be supplied in theacceptance-test-config.yml
as shown above, for each target connector.