Skip to content

Conversation

@vdonato
Copy link
Collaborator

@vdonato vdonato commented Mar 20, 2023

Notes:

📚 Context

As part of the st.experimental_connection feature, we'll be providing a base class for connection class
authors to be able to use to help them write their own custom connection classes (we'll also be using
this same base class in the first party connections that we provide).

This PR starts work on this class by adding an implementation + tests for the parts of the base class
that we know we definitely want. Some of the details of the BaseConnection API are still being ironed
out, and these things will be built in subsequent PRs.

  • What kind of change does this PR introduce?

    • Feature

🧪 Testing Done

  • Added/Updated unit tests

@vdonato vdonato added the security-assessment-completed Security assessment has been completed for PR label Mar 20, 2023
@vdonato vdonato force-pushed the vdonato/connection-productionization-1 branch from 1e30f1d to 2f2e8c7 Compare March 20, 2023 23:35
@vdonato vdonato force-pushed the vdonato/connection-productionization-2 branch from 4f4b606 to b236255 Compare March 20, 2023 23:36
@vdonato vdonato force-pushed the vdonato/connection-productionization-1 branch from 2f2e8c7 to 95fe2e2 Compare March 21, 2023 21:59
@vdonato vdonato force-pushed the vdonato/connection-productionization-2 branch from b236255 to 4e1b8f2 Compare March 21, 2023 21:59
Copy link
Collaborator

@lukasmasuch lukasmasuch left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: I assume this is supposed to be part of the public API or? We probably could also add a @gather_metrics("connection:get_secrets") here as well.

Copy link
Collaborator Author

@vdonato vdonato Mar 23, 2023

Choose a reason for hiding this comment

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

It's part of the public API but is intended to be used by connection authors rather than end-users (it's useful for implementing a connect function within a concrete connector), so I'm not sure if we'll want metrics on this. Won't add it for now but can do so if folks on the data team think it'd be useful to do so

CC @blackary in case you have an opinion on how useful it'd be to collect data on this

Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: same as above. If this is part of the public API, we could add @gather_metrics("connection:reset")

Copy link
Collaborator Author

@vdonato vdonato Mar 23, 2023

Choose a reason for hiding this comment

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

This one is another one that I don't think it'd be too useful to collect metrics on.

It's part of the public API and is meant to be used by people writing apps, but its intended usage is to be able to help implement error handling / retries, so I think we'd just end up indirectly measuring connection error rates in various Streamlit app deployments if we're collecting metrics for this. Will also check with the data team on this, though

@vdonato vdonato force-pushed the vdonato/connection-productionization-1 branch from 95fe2e2 to 89f7b7e Compare March 22, 2023 23:47
@vdonato vdonato force-pushed the vdonato/connection-productionization-2 branch from 4e1b8f2 to 0a30412 Compare March 22, 2023 23:50
Base automatically changed from vdonato/connection-productionization-1 to feature/st.experimental_connection March 23, 2023 00:14
@vdonato vdonato force-pushed the vdonato/connection-productionization-2 branch from 0a30412 to 1d22e71 Compare March 23, 2023 00:16
@vdonato vdonato merged commit 530bb99 into feature/st.experimental_connection Mar 23, 2023
@vdonato vdonato deleted the vdonato/connection-productionization-2 branch March 23, 2023 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security-assessment-completed Security assessment has been completed for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants