plugins with assets are not installed properly

Bug #1814959 reported by Jay Kuri
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Discourse Charm
Confirmed
High
Thomas Cuthbert

Bug Description

Summary: When the plugins config option is used, the charm fetches the plugin onto the server(s) but if the plugin has assets, they will not become available.

What I did:

juju config discourse plugins="https://github.com/canonical-webteam/discourse-markdown-note.git"

What I expected:

The discourse-markdown-note plugin would become usable once the config action finished running.

What happened instead:

The plugin was installed on the discourse unit, but the resources (js and css) were not available to users.

Workaround:

After the config hooks finished, I ran the following commands on the discourse unit (in the /srv/discourse/current/ directory)

RAILS_ENV=production bundle install
RAILS_ENV=production bundle exec rake db:migrate
RAILS_ENV=production bundle exec rake assets:precompile

And then restarted the discourse unicorn server via systemctl.

Revision history for this message
David Lawson (deej) wrote :

Everything Jay ran by hand is part of the prepare_codebase reaction in the charm, we may just want to add a reaction to call that when plugins change.

Changed in discourse-charm:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Jay Kuri (jk0ne) wrote :

David is correct. The issue is that the plugin are loaded after these steps are run. To fix this bug, the code needs to be adjusted to download the plugins first, then do rhe bundle steps.

Changed in discourse-charm:
assignee: nobody → Thomas Cuthbert (tcuthbert)
Changed in discourse-charm:
status: Confirmed → Fix Released
status: Fix Released → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.