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

fix(platform): Fix REST API CORS issue + UI build for Firefox #8140

Merged
merged 13 commits into from
Sep 25, 2024

Conversation

Swiftyos
Copy link
Contributor

@Swiftyos Swiftyos commented Sep 23, 2024

Background

We keep getting cors issues when using the platform, also Firefox was not working. This PR aims to fix these issues.

Changes 🏗️

  • CORS was configured incorrectly for the rest service with allow_credentials when origins = *, which is invalid
  • Added browserslist set to default to get Next.js to build for the default recommended browser list

Testing 🔍

Note

Only for the new autogpt platform, currently in autogpt_platform/

Note

Firefox was tested with yarn run build yarn run start to test the production build

  • 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

@Swiftyos Swiftyos requested a review from a team as a code owner September 23, 2024 14:22
@Swiftyos Swiftyos requested review from ntindle and Pwuts and removed request for a team September 23, 2024 14:22
@github-actions github-actions bot added platform/frontend AutoGPT Platform - Front end platform/backend AutoGPT Platform - Back end labels Sep 23, 2024
Copy link

PR Reviewer Guide 🔍

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Key issues to review

CORS Configuration
The CORS configuration has been updated to allow specific origins instead of all origins. However, the allow_methods and allow_headers parameters have been removed, which might restrict API functionality.

Browser Compatibility
The addition of "defaults" to browserslist may affect the browser compatibility of the application. It's important to verify that this change doesn't exclude any previously supported browsers.

Copy link

netlify bot commented Sep 23, 2024

Deploy Preview for auto-gpt-docs canceled.

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

@Pwuts Pwuts changed the title Fix(platform): Fix Rest API Cors Issue and Firefox fix(platform): Fix REST API CORS issue + UI build for Firefox Sep 23, 2024
@Pwuts
Copy link
Member

Pwuts commented Sep 23, 2024

Have these changes been confirmed to fix the mentioned issues?

majdyz
majdyz previously approved these changes Sep 23, 2024
Copy link
Contributor

@majdyz majdyz left a comment

Choose a reason for hiding this comment

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

autogpt_platform/market/market/app.py Show resolved Hide resolved
@Swiftyos Swiftyos requested a review from a team as a code owner September 24, 2024 08:43
@Swiftyos Swiftyos enabled auto-merge (squash) September 24, 2024 14:09
@Swiftyos
Copy link
Contributor Author

@Significant-Gravitas/maintainers Given we are so close to release. Please can you be extra diligent during reviews to ensure no bugs slip through

@Torantulino
Copy link
Member

I've tested this and can confirm it works (on my machine).

The code changed is not something I am familiar with so I'll leave approval to one of the other reviewers who have left comments @aarushik93 @majdyz @Pwuts

Pwuts
Pwuts previously approved these changes Sep 25, 2024
Copy link
Member

@Pwuts Pwuts left a comment

Choose a reason for hiding this comment

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

LGTM!

@Swiftyos Swiftyos merged commit 9f79e70 into master Sep 25, 2024
16 checks passed
@Swiftyos Swiftyos deleted the swiftyos/secrt-883-firefox-is-not-working-at-all branch September 25, 2024 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform/backend AutoGPT Platform - Back end platform/frontend AutoGPT Platform - Front end Review effort [1-5]: 2 size/m
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants