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

Python CDK Updated to use and emit updated configurations #17910

Closed
evantahler opened this issue Oct 12, 2022 · 0 comments · Fixed by #19428
Closed

Python CDK Updated to use and emit updated configurations #17910

evantahler opened this issue Oct 12, 2022 · 0 comments · Fixed by #19428
Assignees

Comments

@evantahler
Copy link
Contributor

evantahler commented Oct 12, 2022

Part of the Single Use Refresh Tokens Epic

Add tooling to the Python CDK so that a connector can update it's in-memory configuration object, and when it does, it will emit a AirbyteControlMessage.ConnectorConfig message to share that new configuration with the platform so it can be stored.

  1. All oAuth connectors which use the CDK will emit a clear and actional error message to users when the oAuth flow fails due to token/access errors. AirbyteTraceMessage.Error.external_message will be used to inform the user that they need to restart the oAuth workflow from the source’s config page.
  2. For the specific use case of persisting config updates for access/refresh token we can take the following approach: AbstractOauth2Authenticator takes an emit_config_update boolean attribute, the get_access_token and refresh_access_token methods emits AirbyteControlMessage.ConnectorConfig if emit_config_update == true
  3. For a more global approach for sending config updates: config are currently plain python dictionary, we could:
    a. Load this config dictionary into a Config class with mutable attributes.
    b. Calls on setter of the Config object could emit AirbyteControlMessage.ConnectorConfig

As part of this work, a connector should be updated to show that single-use refresh tokens work. We think that Jira is a good connector to test with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants