-
Notifications
You must be signed in to change notification settings - Fork 991
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 #37775 - include hashes in production builds of assets #10125
Conversation
@@ -153,6 +153,12 @@ const coreConfig = function() { | |||
'webpack/assets/javascripts/bundle.js' | |||
); | |||
config.context = path.resolve(__dirname, '..'); | |||
if (config.mode == 'production') { |
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.
for some reason, this is always true, and I don't understand it.
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.
Looking at
foreman/config/webpack.config.js
Lines 56 to 59 in a837946
var production = | |
process.env.RAILS_ENV === 'production' || | |
process.env.NODE_ENV === 'production'; | |
const mode = production ? 'production' : 'development'; |
NODE_ENV
to production
.
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.
foreman/lib/tasks/webpack_compile.rake
Line 10 in fd21a88
ENV["NODE_ENV"] ||= 'production' |
that could be it, indeed
Okay, maybe I'm not as smart as I thought…
|
I feel like I need |
478727b
to
a837946
Compare
} | ||
config.output = { | ||
path: outputPath, | ||
publicPath: '/webpack/' + pluginName + '/', | ||
filename: chunkFilename, |
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.
I am almost sure this will break plugins, but I've not tested it yet
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.
Thank you for your contribution! This PR has been inactive for 3 months, closing for now. Feel free to reopen when you return to it. This is an automated process. |
This is still relevant |
test/integration/host_js_test.rb
Outdated
@@ -96,7 +96,7 @@ class HostJSTest < IntegrationTestWithJavascript | |||
|
|||
test "edit page" do | |||
visit host_details_page_path(@host) | |||
click_button 'Edit' | |||
find('.host-details-header-section').find_button('Edit').click # the Edit button for the host details, not the host comment |
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.
I think this is a regression introduced in 37093a5, but it's weird if we've been ignoring this test failure since May.
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.
something, something, doesn't always load quickly enough or whatever.
this test HAS been super flaky, which could be the regression here.
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.
now to find out why the global params one is failing
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.
👍 once the PR is limited to just the issue. I think we should also pick this to 3.11.
3.11 or 3.12? |
I think it was introduced as a regression in 89c6104 so: $ git tag --contains 89c610451c9ea22eb426826e405518e04d68972f | grep -v rc
3.10.0
3.11.0
3.11.1 That means also 3.10. |
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.
Tested it yesterday and I think it did break plugins, I will take a deeper look at it today to make sure
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.
nvm, tested in dev and prod with foreman ansible and REX and all looks to work as expected!
Should the commit message include a |
Uh, thanks GitHub for not refreshing the comments, I guess… It could, but now it does not :) |
draft, as this only does it for core, not plugins