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: Add workspace with vite project for v2 dashboard #2540

Draft
wants to merge 20 commits into
base: alpha
Choose a base branch
from

Conversation

patelmilanun
Copy link
Member

New Pull Request Checklist

Issue Description

Old dashboard is outdated.

Closes: #2460

Approach

Implement modern dashboard with modern libraries.

TODOs before merging

  • Add tests
  • Add changes to documentation (guides, repository pages, in-code descriptions)

Copy link

parse-github-assistant bot commented Mar 31, 2024

Thanks for opening this pull request!

  • 🎉 We are excited about your hands-on contribution!

@mtrezza mtrezza changed the title [PoC DO_NOT_MERGE] feat: add workspace with vite project for v2 dashboard feat: add workspace with vite project for v2 dashboard Mar 31, 2024
Copy link

I will reformat the title to use the proper commit message syntax.

@parse-github-assistant parse-github-assistant bot changed the title feat: add workspace with vite project for v2 dashboard feat: Add workspace with vite project for v2 dashboard Mar 31, 2024
Copy link

uffizzi-cloud bot commented Mar 31, 2024

Uffizzi Ephemeral Environment deployment-49183

⌚ Updated Mar 31, 2024, 16:59 UTC

☁️ https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2540

📄 View Application Logs etc.

What is Uffizzi? Learn more

@patelmilanun
Copy link
Member Author

@mtrezza will uffizzi deployment update with new commit?

@mtrezza
Copy link
Member

mtrezza commented Mar 31, 2024

It will update if you close and re-open the PR. Takes a few minutes though.

Copy link

uffizzi-cloud bot commented Mar 31, 2024

Uffizzi Ephemeral Environment deployment-49187

⌚ Updated Mar 31, 2024, 22:47 UTC

☁️ https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2540

📄 View Application Logs etc.

What is Uffizzi? Learn more

Copy link

uffizzi-cloud bot commented Apr 1, 2024

Uffizzi Ephemeral Environment deployment-49219

⌚ Updated Apr 01, 2024, 13:13 UTC

☁️ https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2540

📄 View Application Logs etc.

What is Uffizzi? Learn more

@patelmilanun
Copy link
Member Author

@mtrezza can you explain why we have trailing slash at the end of proxy_pass for /location inside nginx-uffizzi\nginx.conf

image

Can we remove it as it is constricting wrong URL. For my case it's actually giving me problem when I'm hitting /dashboard/v2 as this will be treated as /dashboard//v2.

@patelmilanun patelmilanun reopened this Apr 1, 2024
Copy link

uffizzi-cloud bot commented Apr 1, 2024

Uffizzi Ephemeral Environment deployment-49252

⌚ Updated Apr 01, 2024, 19:38 UTC

☁️ https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2540

📄 View Application Logs etc.

What is Uffizzi? Learn more

@mtrezza
Copy link
Member

mtrezza commented Apr 1, 2024

Removing the slash at the end will prevent nginx from normalizing the URL. But in this case we have the same path /dashboard. I believe an alternative way to write this would be:

location /dashboard {
    proxy_pass http://localhost:4040;
}

Since we maintain the base path anyway. Would that work for your setup as well?

@patelmilanun
Copy link
Member Author

@mtrezza what I noticed is that even after removing the slash at the end the deployment is still not working. I even have checked with the same compose file in my local and it was working fine.

I don't think that it will prevent nginx from normalizing the URL. As I can see in nginx docs, its more related to the location path and not the proxy_pass path.

@patelmilanun patelmilanun reopened this Apr 2, 2024
Copy link

uffizzi-cloud bot commented Apr 2, 2024

Uffizzi Ephemeral Environment deployment-49267

⌚ Updated Apr 02, 2024, 07:24 UTC

☁️ https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2540

📄 View Application Logs etc.

What is Uffizzi? Learn more

@mtrezza
Copy link
Member

mtrezza commented Apr 2, 2024

I don't think you can just remove the slash. Did you try my previous comment?

Alternatively you could wrote a conditional proxy pass for the v2:

if ($request_uri ...) { 
    proxy_pass ...;
    break;
}

// Fallback
proxy_pass ...;

@patelmilanun
Copy link
Member Author

@mtrezza I have removed it from the nginx config and redeployed but I'm facing the same issue and I think it might be because the changes to that file is not reflecting else how can I able reproduce the same issue in my local and was able to solve it just by removing the trailing slash.

I'm using the same docker compose file for docker.

@mtrezza
Copy link
Member

mtrezza commented Apr 2, 2024

I assume the nginx changes need to be merged before they apply here.

@patelmilanun
Copy link
Member Author

@mtrezza can u do it for me. Removing trailing slash works as well as ur suggested way of removing whole /dashboard/ in the end like

location /dashboard {
    proxy_pass http://localhost:4040;
}

Whichever you prefer can you get it merged so we can finally see the preview on uffizzi deployment.

@mtrezza
Copy link
Member

mtrezza commented Apr 2, 2024

Done #2542

Signed-off-by: patelmilanun <20059797+patelmilanun@users.noreply.github.com>
@patelmilanun patelmilanun reopened this Apr 2, 2024
Copy link

uffizzi-cloud bot commented Apr 2, 2024

Uffizzi Ephemeral Environment deployment-49311

⌚ Updated Apr 02, 2024, 14:20 UTC

☁️ https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2540

📄 View Application Logs etc.

What is Uffizzi? Learn more

@patelmilanun
Copy link
Member Author

@mtrezza its working now u can check here https://pr-2540-deployment-49311-parse-dashboard.app.uffizzi.com/dashboard/v2.

Thanks for the quick help.

Now just need to fix test cases as we are using a custom font styling for displaying "Where we are serving the dashboard at".

Another one is what is the issue with npm lock file version? Why its failing?

I'm planning to move the whole app to 1 next js server removing the need of custom express. This still needs to be analyzed and then I can move forward. 1 more thing, right now this is using only workspace feature for managing this in better way I might integrate monorepo.

Either I will move whole thing to next js with monorepo or just monorepos which will reduce the deployment time.

I also want to check to see if we can utilize vercel for our deployment previews if I'm converting to next js.

Let me know your thoughts

@mtrezza
Copy link
Member

mtrezza commented Apr 2, 2024

Great!

Another one is what is the issue with npm lock file version? Why its failing?

Fixed in #2543; I suggest you start with the lockfile from the alpha branch and install all dependencies again; rather than trying to merge changes.

I'm planning to move the whole app to 1 next js server removing the need of custom express. This still needs to be analyzed and then I can move forward.

I also want to check to see if we can utilize vercel for our deployment previews if I'm converting to next js.

Some community feedback may be helpful. Such high level / strategic questions are best to be posted on the issue rather than the PR.

right now this is using only workspace feature for managing this in better way I might integrate monorepo.

Keep in mind that we have an automated release process (semantic release) with 2 pre-release branches (alpha, beta). Any changes should be tested with the release process, and this may add quite some complexity or even outright prevent certain setups. For any monorepo setup we'd use npm workspaces, which is the tech across Parse Platform org.

@mtrezza mtrezza closed this Apr 3, 2024
@mtrezza mtrezza reopened this Apr 3, 2024
Copy link

uffizzi-cloud bot commented Apr 3, 2024

Uffizzi Ephemeral Environment deployment-49361

⌚ Updated Apr 03, 2024, 00:56 UTC

☁️ https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2540

📄 View Application Logs etc.

What is Uffizzi? Learn more

@mtrezza
Copy link
Member

mtrezza commented May 3, 2024

@patelmilanun How's it going with this PR? Do you need any help?

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.

Rewrite dashboard with modern framework
3 participants