-
Notifications
You must be signed in to change notification settings - Fork 993
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
Fixes #37252 - prevent duplicate foremanReact in plugins #10061
Conversation
4d0c004
to
eb343a4
Compare
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.
Checked katello pages (React, Angular, erb) and seems to work fine.
A rebase should fix the 3 failing katello tests.
Anything in particular that should be tested?
That this solution makes sense :) |
This is ready for review/ merge on my side. |
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.
do we need to store the file in the repo? or is it sufficient when webpack builds it for us when we run webpack:compile
?
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.
We dont have to but I thought it might be helpful to have in the repo, to keep track of things/find issues
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.
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.
Like @evgeni I'd prefer to not have it in the repo. I think it will only be a source of noise or merge conflicts.
What we should do is archive it as part of CI so it can be inspected, just like we do with package-lock.json
/ Gemfile.lock
. I think that would provide sufficient insight.
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.
Added to gitignore, and I'll create a pr for the actions
[test unit] |
So I've built a Katello based on this, and the bundle size did shrink! Before:
After:
But now Katello pages are broken with:
Is there anything I'm missing that would be needed on the Katello side to consume that? |
Nope, should work as is, how exactly did you build? |
I took the packit build from this PR and threw it into the build chain of katello.rpm. |
When built, |
This is a prod only issue, fixed by changing
From id to name so that it will always be named "reactExports" and not some id |
Updating to the packit build with |
So we fixed #10042, but plugins are still copying foremans old code if they are not rebuilt (https://community.theforeman.org/t/problem-foreman-3-10-after-upgrade/37459) |
RPM builds fail with:
is bundle-analyzer something we need in production builds? today we exclude that from packaging |
Sorry, that was a leftover |
I don't think we should. It feels very risky and likely to break things. That's why we have a regular release cycle where release often enough that it shouldn't matter that much if you miss a merge window. |
🤔 why does it try to load |
meh, somehow this got reverted back to |
[test katello] |
[test katello] |
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.
Happy to see this happen.
webpack/assets/javascripts/react_app
is actually exported, generate all_react_app_exports each webpack build with a script (webpack/assets/javascripts/exportAll.js)katello sizes before & after this change:
I tested some pages and they look like they work but will do more checks