-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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 Missing Bulk Insert API Endpoints will be used from CLI Commands #42560
Comments
Hey @pierrejeambrun, I need your help on AIP-81 if you have time. It is related to new set endpoints in FastAPI. &TLDR I created these issues as file but I am not sure if we should accept files as an input in the API since they are harder to validate if the file is safe in APIs and brought more security concerns. I am thinking we can create Many thanks! |
Hi @bugraoz93, if I may suggest, I would +1 for the second option (parsing the files at the CLI level). By the way, I'm available to take on other missing APIs for AIP-81 if needed. |
Hi @jason810496, great to hear your +1 on this! I believe this will make both the CLI and API endpoints more secure and happy 😄
Amazing! Once the approach is aligned, I’ll break these down further. Any help would be much appreciated! |
I've removed the export functionality, as we can retrieve all necessary data via the Additionally, I've created the remaining issues for anyone who wants to pick them up. I haven’t labelled them as |
Sounds reasonable. I can take on both issues. Could you please assign them to me? Thanks ! |
Nice one! Fixed. Assigning both. Thanks for your effort! :) |
Can you comment them @jason810496? This is the only way I can see you in the issue. |
Most of these resources The CLI can either re-use with a loop and async calls to create multiple of them quickly as needed. (which can be enough at this point). Or we can develop a |
In that sense, those endpoints are indeed not necessary. I agree that even hundreds of calls per second shouldn’t be an issue for FastAPI. However, for better exception handling and an improved user experience, I’d prefer to handle all inserts in a single request. Otherwise, if the request fails for multiple entries, users would need to split the file, identify each issue, and then retry each entry individually or through the UI/CLI as a single resource. Let’s proceed with implementing the bulk insert endpoints, as it seems you’re not strictly opposed. |
Yes of course if we need a bulk insert for that use case we can definitely implement it. How do we plan on handling failures ? (Even for bulk insert). Do we fail the entire transaction, or do we create those that could be created and return back the whole bunch of errors for the failing ones ? |
Awesome, thanks! These endpoints will primarily be used when users are importing models from a file via the CLI. My thinking is to fail the entire transaction and return a list of errors for any entries that caused issues. This way, users can quickly locate and fix specific items in the file or request, and then resend it. Creating only a portion of the entries would still be inconvenient for both API and CLI users. Not only is editing but also removing partial entries difficult if they’re spread across different sections of the list. From the CLI perspective, we can return the response message to the user as we do with the API if it fails, so both are aligned. What do you think? |
Description
AIP-81
To enhance the API functionality, this umbrella ticket organizes the development of missing endpoints in FastAPI for key features like connections, variables, and more. Implementing these endpoints will enable users to manage resources more effectively through the API, improving usability and reducing the need for multiple workarounds.
The workload aims to help secure CLI by using these endpoints.
Missing Endpoints
Code of Conduct
The text was updated successfully, but these errors were encountered: