-
Notifications
You must be signed in to change notification settings - Fork 67
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
[YUNIKORN-2606] Modular sidebar with remote components #198
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #198 +/- ##
=======================================
Coverage 38.77% 38.77%
=======================================
Files 2 2
Lines 49 49
=======================================
Hits 19 19
Misses 27 27
Partials 3 3 ☔ View full report in Codecov by Sentry. |
@dcoric Thanks for the cool feature. However, I followed the steps but looks like the
If possible, could you provide screenshot so I can validate the result. Thanks. |
I'm not familiar with |
I suggest perhaps we can have a video demo?(or screenshots) That way, we can grasp the idea quickly. |
I will recheck it in the new environment in case I have missed something. Video is probably the best option to show all steps |
I had to verify on different systems and environments if this is functioning, and I can confirm that there was no issue with loading remote modules. |
@dcoric Thanks for providing the demo, that's helpful. After updated the node version I can see the "Log Link" column now. I guess It's what YHS have now, the YHS log display function is under development, am I correct? Or I should see anything else? |
@chenyulin0719 That feature will be added in the future to YHS. I used that as a demo to easily differentiate a remote component from the local one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dcoric Overall LGTM, the functionality work as expected. Below new files are missing license.
- webpack.config.js
- webpack.prod.config.js
The license-check command Makefile is not checking js files, could you add it too?
Lines 197 to 200 in 3922c51
ifeq (darwin,$(OS)) $(shell mkdir -p "$(OUTPUT)" && find -E . -not \( -path './.git*' -prune \) -not \( -path ./coverage -prune \) -not \( -path ./node_modules -prune \) -not \( -path ./build -prune \) -not \( -path ./tools -prune \) -not -path ./pnpm-lock.yaml -regex ".*\.(go|sh|md|conf|yaml|yml|html|mod)" -exec grep -L "Licensed to the Apache Software Foundation" {} \; > "$(OUTPUT)/license-check.txt") else $(shell mkdir -p "$(OUTPUT)" && find . -not \( -path './.git*' -prune \) -not \( -path ./coverage -prune \) -not \( -path ./node_modules -prune \) -not \( -path ./build -prune \) -not \( -path ./tools -prune \) -not -path ./pnpm-lock.yaml -regex ".*\.\(go\|sh\|md\|conf\|yaml\|yml\|html\|mod\)" -exec grep -L "Licensed to the Apache Software Foundation" {} \; > "$(OUTPUT)/license-check.txt")
Hi @wilfred-s, Could you take a look at the Module Federation feature? I don't have concern for it. The remote component is only connected if users config yunikorn/yunikorn-web/src/assets/config/envconfig.json |
Implemented Module Federation for the Applications Drawer component Implemented and fixed all tests. Added copyright info
5460d2c
to
ca02ba4
Compare
I have added missing licenses and updated Makefile to check *.js files as well (with exception to /dist folder) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I can foresee some other changes required for 1.6.0 (ex: hide v2 queue). |
Implemented Module Federation for the Applications Drawer component Implemented and fixed all tests.
Added copyright info
What is this PR for?
This PR introduces Module Federation for loading components remotely.
This was intended to easily connect Yunikorn History Server with YuniKorn. Components that should consume data from the Yunikorn History Server will be served from the YHS itself and loaded in the YuniKorn with configuring env parameters on build time.
This PR includes adjustments to the Applications page (apps-view component). The allocations drawer is extracted to a separate component (allocations-drawer component). The apps-view component is loaded dynamically on init in the initializeSidebarComponent method. Depending on the env configuration, that component is loaded locally, or remotely from the YHS server.
With component separation and page updates, the design is slightly tweaked to match more closely to match the design linked in the YUNIKORN-2603
What type of PR is it?
Todos
What is the Jira issue?
YUNIKORN-2606
How should this be tested?
Steps for testing this feature:
web
folder and runnpm install
andnpm start
. This will start the application with module federation inremote
mode that will generate aremoteEntry.js
file.envconfig.json
file set these values:remoteEntry.js
will be visible in the network). The rest of the application will not be affected in any way.Screenshots (if appropriate)
Questions: