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

Merged
merged 6 commits into from
Oct 8, 2024

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

qodo-merge-pro bot commented Oct 4, 2024

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 c96abe2
πŸ” Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/6704faf5d3f4a30008be9a4c

@aarushik93 aarushik93 enabled auto-merge (squash) October 7, 2024 08:16
@aarushik93 aarushik93 requested a review from ntindle October 7, 2024 08:23
@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label Oct 7, 2024
Copy link
Contributor

github-actions bot commented Oct 7, 2024

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

@github-actions github-actions bot removed the conflicts Automatically applied to PRs with merge conflicts label Oct 8, 2024
Copy link
Contributor

github-actions bot commented Oct 8, 2024

Conflicts have been resolved! πŸŽ‰ A maintainer will review the pull request shortly.

majdyz
majdyz previously approved these changes Oct 8, 2024
@aarushik93 aarushik93 disabled auto-merge October 8, 2024 09:27
@aarushik93 aarushik93 merged commit 2aed470 into master Oct 8, 2024
14 checks passed
@aarushik93 aarushik93 deleted the aarushikansal/disable-docs-endpoint branch October 8, 2024 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: βœ… Done
Development

Successfully merging this pull request may close these issues.

3 participants