[MAGNOLIA-6711] Node is permanently added at /config/modules/[module name] by light module descriptor Created: 05/Jul/16  Updated: 09/Feb/17  Resolved: 05/Aug/16

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 5.4.7
Fix Version/s: 5.5

Type: Bug Priority: Neutral
Reporter: Christopher Zimmermann Assignee: Maxime Michel
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 1h
Original Estimate: Not Specified

Attachments: PNG File light-module-install-wtf.png    
Issue Links:
Cloners
is cloned by MAGNOLIA-6741 Node is permanently added at /config/... Closed
causality
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Sprint: Basel 55
Story Points: 8

 Description   

When a light module supplies a module descriptor, a node is added in the config workspace at /modules/[module name]. This node remains even if the the directory of the light module is removed.
This should not be the case because:

  • Where possible, a light module should be gone if the directory is removed.
  • If the module is removed and added again, the install does not occur again as one would expect. (I'm not sure if this has any impact in how the dependencies are evaluated.)

To be decided
How to handle this.
Some options:

  • The node should not be added to the config workspace. (This would rule out any kind of version handling, which is probably ok for now.)
  • At startup, or on file observation: If the module is removed, the node from the config workspace should also be automatically removed.


 Comments   
Comment by Mikaël Geljić [ 05/Jul/16 ]

A​ctually any notion of install for a light module sounds a bit over the top, the step under the install screen is most likely unrealistic too (see screenshot).

B​y the way, devs still have to be acquainted to version ranges. The fact that it's a light module descriptor won't do any magic to the module system, i.e. use version: 5.4.7/*, if you don't want the miserable failure on next upgrade (5.4.7 release notes show a bad example atm).

Module qa_filesystem (version 1.0.0) is dependent on core (version 5.4.7), but Magnolia Core Module (version 5.5.0-SNAPSHOT) is currently installed.

C​onversely, dropping a light module descriptor at runtime won't check deps nor install anything, so any such mischievous mistake while the system is running won't show up until next restart (which might be weeks away).

Comment by Aleksandr Pchelintcev [ 05/Jul/16 ]

mgeljic agreed that it might be a tad misleading and can be considered a bug. On the other hand (also considering your concerns about removing the light module folder) - maybe it actually makes sense to keep such a node and consider module installed if it has been picked up by the module registry at start-up? And then the removing of the folder would mean removing the files, not the module itself, which seems fairly logical to me. However, with such approach we'd have to double check what happens when the LM is added during runtime (non-installed LM?)

Comment by Christopher Zimmermann [ 06/Jul/16 ]

An install, or generally anything provided by a light module, or any effects it has, should be applied when the module is added during runtime. I just created https://jira.magnolia-cms.com/browse/MAGNOLIA-6712 to reflect this.

Comment by Federico Grilli [ 05/Aug/16 ]

Reopened due to comment at https://git.magnolia-cms.com/projects/PLATFORM/repos/main/pull-requests/246/commits/fbc5796411467e1a2671bbadac999f5858a0d60b#magnolia-core/src/main/java/info/magnolia/module/model/reader/LightModuleDefinitionReader.java

Comment by Roman Kovařík [ 30/Aug/16 ]

Light modules are not displayed on the install screen anymore. Shouldn't this be mentioned here?

Comment by Maxime Michel [ 30/Aug/16 ]

Seemed of so little importance to me that I didn't mention it. This has never been a feature, and it kind of accidentally ended up in this state. Sorry if this caused some confusion on why they were no longer appearing.

Generated at Mon Feb 12 04:17:07 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.