-
Notifications
You must be signed in to change notification settings - Fork 44.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
refactor(platform/rest): Update REST API to use standard FastAPI structure #8519
refactor(platform/rest): Update REST API to use standard FastAPI structure #8519
Conversation
This PR targets the Automatically setting the base branch to |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
✅ Deploy Preview for auto-gpt-docs canceled.
|
…tandard-structure_2
…tandard-structure_2
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.
codewise LGTM,
I have no opinion on v1 routing, is this something that we want to do?
Should we not retain the default one to point to the latest version to maintain backward compatibility?
Background
The rest FastAPI server is currently packaged up and ran from within a separate process. This has resulted in needing to develop the FastAPI server in a unique way, preventing us from leveraging some of its features and slightly increasing the difficulty of adding new routes.
Work has been done to decouple the Rest server from the executors. This is the follow on work to refactor the API server to a canonical FastAPI setup.
Changes 🏗️
Moved to a standard FastAPI server, ran via uvicorn directly, in the docker container.
Ensured openapi schemas matched exactly:
Added python script to ensure openapi specs do not change during refactor
Moved endpoints from
/api/x
to/api/v1/x
Testing 🔍
Note
Only for the new autogpt platform, currently in autogpt_platform/
Configuration Changes 📝
Note
Only for the new autogpt platform, currently in autogpt_platform/
If you're making configuration or infrastructure changes, please remember to check you've updated the related infrastructure code in the autogpt_platform/infra folder.
Examples of such changes might include: