-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
AIP-81 Implement POST/Insert Variables in FastAPI #43897
Comments
@bugraoz93 The issue I will take, Thanks ! |
While working on this issue, I came up with two approaches and would appreciate some feedback to decide which one to pursue 🙏 Context for
|
I would say second approach is more straightforward to implement with an Which is not the case at the moment. We would need to async await the calls to the secret backend and also to the DB. So I would say that this is too much work and a deeper change. That leaves us with choice 1 only I believe. Or backup choice: no bulk endpoint, asyncio on the client side (CLI) to generate concurrent requests on the API to create all the different Variables at the same time using only 1 thread on the client. But I think that was already considered and discarded. |
Great findings! Thanks! My main concern was the Variable :)
I agree this would be too much effort. I would rather not touch those code pieces at all.
My idea was to have a single/common approach for all the What do you think? |
I agree that consistency would be great. If we feel like this is too much work for now and that our bandwidth needs to be focused on other priorities we can mark it for 3.1 👍. How will you do the bulk insert for variables while we don't have this implemented ? async loop on the client / CLI as suggested above or you have something else in mind ? |
If we implement this on the FastAPI side, I would add a wrapper If implemented on the CLI side, I agree with @pierrejeambrun approach. |
The
I don' think so. As mentioned above you will have to use multiple threads otherwise that would just basically be the same a sequential requests (because the main loop is blocked) => might run into problem with one session shared. And there is a note about Worth trying both, I have no preference at this point. (Maybe inside FastAPI is cleaner because from the CLI point of view, everything is handled the same -> through 1 call to the API, but not sure if this will be super easy to do because of the things highlighted above) |
Yeah, this is even better than delete/create. I think handling this case separately doesn't seem too much if we compare it with the implementation and test needed for these changes. Thanks for marking this for 3.1! :)
I was thinking the same. Async loop on the client / CLI is the right approach until 3.1. The CLI can handle requests to a single endpoint. Since Variables that are posted will always be recreated, allowing users to publish the same file again with Variables won’t cause issues, aside from increasing the number of API calls. This approach would provide a consistent experience for users across other file imports. |
Hi @bugraoz93, should I continue working on this issue? Seem like it should be implemented on CLI side at this stage 👀 |
Hello @jason810496, great question! Of course, you can still work on this, but my suggestion would be to prioritize other tasks for now to focus on more urgent implementations in this AIP or other AIPs. :) This is no longer critical for 3.0 (our target for AIP-81). While I hope we’ll eventually have this API endpoint, we now have plenty of time to discuss and implement it before 3.1. Please check the link below. It outlines the timeline for 3.0. Even after the 3.0 release, we’ll still have time to make this happen. |
Description
Develop an endpoint in FastAPI that enables POST one or multiple
Variables
from a list. This feature should allow users to import their connections from a set of connections in a single request.Use case/motivation
AIP-81
Related issues
#42560
Are you willing to submit a PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: