Project

General

Profile

Bug #23361

plugin RPMs do not build when they contain webpack assets

Added by Evgeni Golov 4 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Urgent
Category:
-
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

** Invoke plugin:assets:precompile (first_time)
** Invoke environment (first_time)
** Execute environment
/opt/theforeman/tfm/root/usr/share/gems/gems/logging-1.8.2/lib/logging/logger.rb:295: warning: constant ::Fixnum is deprecated
API controllers newer than Apipie cache! Run apipie:cache rake task to regenerate cache.
 INFO  app : Current user: foreman_admin (administrator)
 INFO  app : Current user: foreman_admin (administrator)
 INFO  app : Current user: foreman_admin (administrator)
rake aborted!
Errno::EACCES: Permission denied @ rb_sysopen - /builddir/build/BUILD/rubygem-katello-3.7.0/usr/share/foreman/public/webpack/manifest.json
/builddir/build/BUILD/rubygem-katello-3.7.0/usr/share/foreman/config/initializers/assets.rb:109:in `initialize'
/builddir/build/BUILD/rubygem-katello-3.7.0/usr/share/foreman/config/initializers/assets.rb:109:in `open'
/builddir/build/BUILD/rubygem-katello-3.7.0/usr/share/foreman/config/initializers/assets.rb:109:in `block (2 levels) in <top (required)>'
…

Associated revisions

Revision 9392da0a (diff)
Added by Ewoud Kohl van Wijngaarden 4 months ago

Fixes #23361 - Handle webpack manifests from plugins

In a production setup Foreman can't write to the manifest.json location.
Here we copy the pattern from the above sprockets initialization and
change the webpack-rails setting to read it. Because webpack-rails
only supports initializing the manifest by reading a file, we monkey
patch it to allow us setting it explicitly.

History

#1 Updated by Evgeni Golov 4 months ago

It tries to write the the foreman webpack/manifest.json and that's not allowed in this scenario.

#2 Updated by Evgeni Golov 4 months ago

  • Subject changed from tfm-rubygem-katello RPM does not build to plugin RPMs do not build when they contain webpack assets
  • Project changed from Packaging to Foreman

#3 Updated by The Foreman Bot 4 months ago

  • Assignee set to Ewoud Kohl van Wijngaarden
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/5478 added

#4 Updated by Ondřej Pražák 4 months ago

  • Legacy Backlogs Release (now unused) set to 330

#5 Updated by Anonymous 4 months ago

  • % Done changed from 0 to 100
  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF