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

don't update cursor for log messages and and default schema path coming from connector builder #19271

Merged
merged 4 commits into from
Nov 11, 2022

Conversation

brianjlai
Copy link
Contributor

What

While connecting the wires for the connector builder server I found a few small issues when trying to make requests coming from the connector builder server that aren't present for real low code connectors.

How

The two fixes required are:

  • When we invoke read() from the connector builder, we don't have any modules prefixed by source_ which makes sense because the builder server module is called connector_builder. Simplest path forward is to allow that caveat in the default logic.
  • When performing read_records we should only attempt to update the cursor on record messages and not AirbyteLogMessage or AirbyteTraceMessage which are now valid messages from the generator. They don't have any relevant fields to update state so we should just skip over these.

@brianjlai brianjlai requested a review from a team as a code owner November 10, 2022 02:39
@github-actions github-actions bot added the CDK Connector Development Kit label Nov 10, 2022
@brianjlai
Copy link
Contributor Author

brianjlai commented Nov 10, 2022

/publish-cdk dry-run=true

🕑 https://github.com/airbytehq/airbyte/actions/runs/3434790792
https://github.com/airbytehq/airbyte/actions/runs/3434790792

@brianjlai
Copy link
Contributor Author

brianjlai commented Nov 10, 2022

/publish-cdk dry-run=false

🕑 https://github.com/airbytehq/airbyte/actions/runs/3435094278
https://github.com/airbytehq/airbyte/actions/runs/3435094278


# If we are not in a source_ module, the most likely scenario is we're processing a manifest from the connector builder
# server which does not require a json schema to be defined.
return "./{{options['name']}}.json"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replaced the module check w/ a basic default. @sherifnada do you still need the changes r equested?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think over time we should probably just consolidate schemas into the YAML file. So this is a fine workaround.


# If we are not in a source_ module, the most likely scenario is we're processing a manifest from the connector builder
# server which does not require a json schema to be defined.
return "./{{options['name']}}.json"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think over time we should probably just consolidate schemas into the YAML file. So this is a fine workaround.

@brianjlai brianjlai merged commit 60c008f into master Nov 11, 2022
@brianjlai brianjlai deleted the brian/fix_some_low_code_for_connector_builder branch November 11, 2022 00:23
akashkulk pushed a commit that referenced this pull request Dec 2, 2022
…ng from connector builder (#19271)

* don't update cursor for log messages and and default schema path coming from connector builder

* replace check for connector_builder module with a basic default file path

* update changelog and patch version

* catch the correct exception when pkgutil can't load json file
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.

3 participants