Skip to content
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

Merged
merged 8 commits into from
Jan 12, 2023

Conversation

lmossman
Copy link
Contributor

@lmossman lmossman commented Jan 12, 2023

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.

@lmossman lmossman marked this pull request as ready for review January 12, 2023 20:01
@lmossman lmossman requested a review from a team as a code owner January 12, 2023 20:01
@octavia-squidington-iv octavia-squidington-iv added the CDK Connector Development Kit label Jan 12, 2023
Copy link
Contributor

@girarda girarda left a 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 != '':
Copy link
Contributor

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:

@lmossman lmossman merged commit 63ff3d7 into master Jan 12, 2023
@lmossman lmossman deleted the lmossman/make_documentation_url_non_required branch January 12, 2023 22:23
jbfbell pushed a commit that referenced this pull request Jan 13, 2023
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CDK Connector Development Kit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants