-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Connector Ops: Fix third party support in get_all_connectors_in_repo #31487
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -30,17 +30,17 @@ def test__get_type_and_name_from_technical_name(self, technical_name, expected_t | |||
"connector, exists", | |||
[ | |||
(utils.Connector("source-faker"), True), | |||
(utils.Connector("source-notpublished"), False), | |||
(utils.Connector("source-doesnotexist"), False), |
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.
@alafanechere I think given where the code base is at, we should change this to an error
I.e. if you try to instantiate Connector
but we cant find a metadata.yaml file. we throw an Error.
What are your thoughts?
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.
I'm in for this but I think this could break a couple of test.
I think that in some test scenario we provision a fake connector, without a metadata (or other file).
Feel free to make this change but please run the pipelines
test suite to make sure nothing breaks. (I believe it will run automatically thanks to your recent change on the workflow).
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.
Will do! I think ill hold it for a subsequent PR
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.
Light suggestion. Thanks for the improvements!
And please bump connector_ops
version + update poetry.lock
of pipelines
**
if not self.has_airbyte_docs: | ||
return None | ||
|
||
return Path(f"{self.relative_documentation_path_str}.md") |
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.
Should we raise an error when has_airbyte_docs
is True
but path does not exists?
I would appreciate that the existence check logic move to this util instead of giving this responsability to the caller. Wdyt?
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.
I like that idea!
if not self.has_airbyte_docs: | ||
return None | ||
|
||
return Path(f"{self.relative_documentation_path_str}.inapp.md") |
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.
Should we raise an error when has_airbyte_docs is True but path does not exists?
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.
Im unsure. A hard error would prevent the QA checks from running on a list of connectors as it would fail if just one was missing a documentation file. Is that a large concern?
Co-authored-by: Augustin <augustin@airbyte.io>
…irbytehq#31487) Co-authored-by: Augustin <augustin@airbyte.io>
Reopening of #31166
Problem
Third party pathing breaks
get_all_connectors_in_repo
and theConnector
classrelated to a comment from #30456
Solution
Connector
to take a relative path as its init argument