Skip to content
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

tweak(platform): Disable docs endpoint when not local #8265

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

aarushik93
Copy link
Contributor

Background

So people can't try and execute endpoints on our platform

Changes πŸ—οΈ

Set docs_url to none if not local

Testing πŸ”

Note

Only for the new autogpt platform, currently in autogpt_platform/

  • Create from scratch and execute an agent with at least 3 blocks
  • Import an agent from file upload, and confirm it executes correctly
  • Upload agent to marketplace
  • Import an agent from marketplace and confirm it executes correctly
  • Edit an agent from monitor, and confirm it executes correctly

@aarushik93 aarushik93 requested a review from a team as a code owner October 4, 2024 14:02
@aarushik93 aarushik93 requested review from Torantulino and kcze and removed request for a team October 4, 2024 14:02
@github-actions github-actions bot added platform/backend AutoGPT Platform - Back end size/m labels Oct 4, 2024
Copy link

PR Reviewer Guide πŸ”

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 πŸ”΅πŸ”΅βšͺβšͺβšͺ
πŸ§ͺΒ No relevant tests
πŸ”’Β No security concerns identified
⚑ Recommended focus areas for review

Potential Bug
The docs_url variable is defined but not used in the FastAPI initialization. This could lead to the docs endpoint always being available.

Environment Variable Usage
The code uses os.environ.get("APP_ENV") directly instead of utilizing the settings module, which might lead to inconsistency across the application.

Configuration Update
The APP_ENV variable is added to the .env.example file, but there's no explanation of its possible values or impact on the application.

Copy link

netlify bot commented Oct 4, 2024

βœ… Deploy Preview for auto-gpt-docs canceled.

Name Link
πŸ”¨ Latest commit acb53be
πŸ” Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/66fff55d516033000877eefc

@@ -121,6 +121,11 @@ class Config(UpdateTrackingModel["Config"], BaseSettings):
"This value is then used to generate redirect URLs for OAuth flows.",
)

app_env: str = Field(
Copy link
Member

Choose a reason for hiding this comment

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

Enum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: πŸ†• Needs initial review
Development

Successfully merging this pull request may close these issues.

2 participants