-
Notifications
You must be signed in to change notification settings - Fork 4k
Start work on the BaseConnection abstract class #6346
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
Start work on the BaseConnection abstract class #6346
Conversation
1e30f1d to
2f2e8c7
Compare
4f4b606 to
b236255
Compare
2f2e8c7 to
95fe2e2
Compare
b236255 to
4e1b8f2
Compare
lukasmasuch
left a comment
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 👍
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: 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.
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.
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
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: same as above. If this is part of the public API, we could add @gather_metrics("connection:reset")
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.
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
95fe2e2 to
89f7b7e
Compare
4e1b8f2 to
0a30412
Compare
0a30412 to
1d22e71
Compare
Notes:
feature/st.experimental_connectionand notdevelop📚 Context
As part of the
st.experimental_connectionfeature, we'll be providing a base class for connection classauthors 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
BaseConnectionAPI are still being ironedout, and these things will be built in subsequent PRs.
What kind of change does this PR introduce?
🧪 Testing Done