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

feat(platform): Make REST & WS server host configurable #8143

Merged
merged 7 commits into from
Sep 24, 2024

Conversation

majdyz
Copy link
Contributor

@majdyz majdyz commented Sep 24, 2024

Background

https://github.com/Significant-Gravitas/AutoGPT/pull/8057)](https://github.com/Significant-Gravitas/AutoGPT/pull/8057
Raised the need of manually configuring the host for WS & REST server.

Changes 🏗️

Make REST & WS server configurable.

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

@majdyz majdyz requested a review from a team as a code owner September 24, 2024 02:33
@majdyz majdyz requested review from Torantulino and aarushik93 and removed request for a team September 24, 2024 02:33
@github-actions github-actions bot added the platform/backend AutoGPT Platform - Back end label Sep 24, 2024
Copy link

codiumai-pr-agent-pro bot commented Sep 24, 2024

PR Reviewer Guide 🔍

(Review updated until commit 1959e87)

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 Security concerns

Potential security risk:
The default host values for both the websocket server and agent API are set to "0.0.0.0", which binds the server to all available network interfaces. This could potentially expose the services to unauthorized access if not properly secured. Consider using more restrictive default values (e.g., "127.0.0.1") and clearly documenting the security implications of changing these settings.

⚡ Key issues to review

Configuration Consistency
The Config().agent_api_host is used without checking if it's set. Consider adding a fallback or default value for consistency with other configuration parameters.

Error Handling
The run method doesn't include any error handling for potential issues that may occur during server startup. Consider adding try-except blocks to gracefully handle exceptions.

Copy link

netlify bot commented Sep 24, 2024

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit 815f99c
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/66f34735e063ce0008323e35

@majdyz majdyz marked this pull request as ready for review September 24, 2024 15:24
Copy link

Persistent review updated to latest commit 1959e87

@majdyz majdyz force-pushed the zamilmajdy/make-api-host-configurable branch from 5af7a12 to 1959e87 Compare September 24, 2024 15:29
@majdyz majdyz enabled auto-merge (squash) September 24, 2024 23:12
@majdyz majdyz merged commit b78c431 into master Sep 24, 2024
13 checks passed
@majdyz majdyz deleted the zamilmajdy/make-api-host-configurable branch September 24, 2024 23:15
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.

2 participants