[NPMCLI-230] mgnl customize-local-config takes the global config as template ignoring local config Created: 21/Oct/19  Updated: 21/Oct/19

Status: Open
Project: Magnolia CLI
Component/s: None
Affects Version/s: 3.1.0
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Christoph Meier Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

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:

 Description   

According to docu:

When executing commands from within the local configuration folders or subfolders, the local configuration is used.

...

The local configuration is created as a copy of the current configuration (used during execution of the customize-local-config command), which you can edit to define project specific prototypes or dependencies.

When running mgnl customize-local-config - this is not the case (anymore), instead, the globally installed configuration is used as a "template" to create the new local config.


Example:

The folder mgnl-bundles contains a local config

~/mgnl-bundles/
├── 6.2-CE-with-demo
├── cli-downloads
├── mgnl-cli-prototypes
└── mgnl-cli.json

now within ~/mgnl-bundles/6.2-CE-with-demo, run:

mgnl customize-local-config

The file
/mgnl-bundles/6.2-CE-with-demo/mgnl-cli.json
should be a copy of
/mgnl-bundles/mgnl-cli.json.
...
But that's not the case ... instead the new created files seems to be a copy of the globally installed config.

 


 

 Additional note

I herby can confirm, that jumpstart does use the local config.
However, I have not checked all commands regarding which config - local or global - is used.
This should be checked, and I hope it can be easy checked with some hopefully existing tests.



 Comments   
Comment by Christopher Zimmermann [ 21/Oct/19 ]

I was never aware that running `customize-local-config` should make a copy of a local `mgnl-cli-prototypes` and `mgnl-cli.json`, as it is apparently documented.

I don't think it should. I think the command should always copy from the global configuration. I think we should change the documentation.=

(But I think we should check the code to see if it was at some point implemented as described in documentation, and  if so - remove that code.)

Comment by Christopher Zimmermann [ 21/Oct/19 ]

fgrilli, cmeier do you remember it ever working as documented above?

Comment by Christoph Meier [ 21/Oct/19 ]

czimmermann - me thinks it was working like this.

I definitely thought that it works like that when I was documenting about the config.

And yeah ... as a user I would expect that it works like this.

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