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

perf(frontend): perf build speed #4013

Merged
merged 1 commit into from
Oct 7, 2023
Merged

Conversation

xudaotutou
Copy link
Contributor

@xudaotutou xudaotutou commented Sep 28, 2023

πŸ€– Generated by Copilot at d478df2

Summary

πŸš€πŸ› οΈπŸ“¦

This pull request optimizes the docker build process and updates various frontend dependencies for the sealos web interface. It fixes the indentation and caching issues in the .github/workflows/frontend.yml file, refactors the frontend/Dockerfile file, simplifies the frontend/Makefile file, and upgrades the typescript and other packages in the frontend/package.json and frontend/packages/client-sdk/package.json files. It also updates the dependencies for several provider projects, such as adminer, applaunchpad, bytebase, costcenter, cronjob, dbprovider, and imagehub, to improve their stability and functionality. Additionally, it fixes a React error in the frontend/providers/cronjob/src/pages/job/edit/components/Cron.tsx file by adding a fallback return value.

This pull request is quite a feat
It updates dependencies so neat
For frontend providers
And docker insiders
With pnpm and react-query sweet

Walkthrough

  • Fix the indentation of the module array in the frontend.yml workflow file (link, link)
  • Add steps to cache the pnpm-store directory and inject it into the docker build context in the frontend.yml workflow file (link, link)
  • Enable the buildkit cache feature and use the GitHub Actions cache as the source and destination of the cache layers in the frontend.yml workflow file (link)
  • Update the versions of various dependencies in the package.json files of the frontend workspace, desktop project, client-sdk project, and provider projects, to include bug fixes, performance improvements, and new features (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)
  • Modify the frontend/Dockerfile file to use a new base stage that sets the PNPM_HOME and PATH environment variables, and reuse the base and deps stages in the subsequent stages (link, link, link, link)
  • Remove the code that conditionally changes the alpine repositories based on the mirror argument in the frontend/Dockerfile file and the frontend/Makefile file, as it is no longer needed (link, link, link)
  • Comment out the code that copies the packages directory from the deps stage and installs pnpm globally in the frontend/Dockerfile file, as it is not needed anymore (link, link, link)
  • Add the --mount=type=cache,id=pnpm,target=/pnpm/store option to the RUN commands in the frontend/Dockerfile file, to mount the pnpm-store cache directory from the build context into the docker container (link, link)
  • Add a fragment element as the fallback return value when the formHook prop is falsy in the Cron.tsx file, to avoid returning undefined and causing a React error (link)

@pull-request-size
Copy link

Whoa! Easy there, Partner!

This PR is too big. Please break it up into smaller PRs.

@sealos-ci-robot
Copy link
Member

sealos-ci-robot commented Sep 28, 2023

πŸ€– Generated by lychee action

Summary

Status Count
πŸ” Total 973
βœ… Successful 400
⏳ Timeouts 0
πŸ”€ Redirected 0
πŸ‘» Excluded 572
❓ Unknown 0
🚫 Errors 0

Full action output

Full Github Actions output

@codecov
Copy link

codecov bot commented Sep 28, 2023

Codecov Report

All modified lines are covered by tests βœ…

πŸ“’ Thoughts on this report? Let us know!.

@c121914yu c121914yu merged commit 1fc97cb into labring:main Oct 7, 2023
bxy4543 pushed a commit to bxy4543/sealos that referenced this pull request Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants