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

Correctly parse the API URL in dashboard #511

Merged
merged 1 commit into from
Dec 18, 2024
Merged

Conversation

mlejva
Copy link
Member

@mlejva mlejva commented Dec 18, 2024

This PR addresses a bug when a user passes a custom API URL like https://api.e2b-cluster.dev and we incorrectly print that the user should set their E2B_DOMAIN to api.e2b-cluster.dev while the correct one would be E2B_DOMAIN=e2b-cluster.dev.

Copy link

changeset-bot bot commented Dec 18, 2024

⚠️ No Changeset found

Latest commit: 49849f3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Member

@mishushakov mishushakov left a comment

Choose a reason for hiding this comment

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

Looks okay to me, but we should make this more implicit/less opinionated in the future

@mlejva
Copy link
Member Author

mlejva commented Dec 18, 2024

Looks okay to me, but we should make this more implicit/less opinionated in the future

Agree. This is a quick fix. New dashboard should handle this better

@mlejva mlejva merged commit d29ad4f into main Dec 18, 2024
2 checks passed
@mlejva mlejva deleted the dashboard-fix-env-var branch December 18, 2024 22:52
Copy link
Contributor

@0div 0div left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -45,7 +53,7 @@ export const DeveloperContent = ({
<pre className="mt-2 w-full bg-neutral-700 px-2 py-1 rounded-md text-brand-300">
E2B_DOMAIN={
isUrl(apiUrl)
? `"${new URL(apiUrl).host}"`
? `"${removeApiSubdomain(new URL(apiUrl))}"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
? `"${removeApiSubdomain(new URL(apiUrl))}"`
? removeApiSubdomain(new URL(apiUrl))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants