-
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
Make documentation_url optional in a declarative connector spec #21347
Make documentation_url optional in a declarative connector spec #21347
Conversation
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.
lgtm. next steps would be to update the changelog and update the CDK version before releasing the change
|
||
def generate_spec(self) -> ConnectorSpecification: | ||
""" | ||
Returns the connector specification according the spec block defined in the low code connector manifest. | ||
""" | ||
|
||
obj = {"connectionSpecification": self.connection_specification} | ||
|
||
if self.documentation_url is not None and self.documentation_url != '': |
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: this could be simplified to
if self.documentation_url:
* Make documentation_url optional in a declarative connector spec * simplify if statement * bump patch version of cdk * Revert "bump patch version of cdk" This reverts commit 1854bf3. * 🤖 Bump patch version of Airbyte CDK * Revert "🤖 Bump patch version of Airbyte CDK" This reverts commit 85d5a98. * 🤖 Bump patch version of Airbyte CDK Co-authored-by: lmossman <lmossman@users.noreply.github.com>
What
Make the
documentation_url
field of a declarative connector's spec optional. This is because users will not always have a documentation url to set on low-code connectors, and the documentation url is already optional in the airbyte protocol, so this brings the declarative CDK in alignment with that.See slack thread for context: https://airbytehq-team.slack.com/archives/C03TP6W8081/p1673474183580999?thread_ts=1673463486.033949&cid=C03TP6W8081
How
Make
documentation_url
non-required in the declarative component schema, as well as in the declarative spec.py file.This has been tested on a low-code connector that doesn't set the documentation_url, as well as one that sets it to the empty string, and both cases work properly with
python main.py spec
returning the Spec that does not contain the documentation URL.It was also tested that a low-code connector which does set the documentation_url still has that url being returned as part of the spec for the above command.