[MGNLRES-371] Validate hotfixes for tab character usages Created: 05/Jul/21  Updated: 20/Jul/22  Resolved: 06/Jul/21

Status: Closed
Project: Magnolia Resources Module
Component/s: app
Affects Version/s: 3.0.4
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Richard Gange Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
supersession
is superseded by MGNLRES-372 Validate hotfixes upon save Closed
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)
Epic Link: Nucleus Quality Maintenance
Team: Nucleus

 Description   

Tab characters are disallowed in YAML files for formatting. However when hotfixing a resource the system does not block users from adding them. This can lead to a corrupted system in some cases.

Reproduce

  1. Hotfix the file /admincentral/config.yaml with the following YAML
    findBar:
      suggestionCountPerSupplier: 3
      defaultCountPerSupplier: 10
      suppliers:
    	- name: pages
    	- name: assets
    	- name: faq
    	- name: contact-channels-app
    	- name: search-widgets-app
    appLauncherLayout:
      defaultGroup: edit
      hiddenApps:
        notifications: notifications
    #    contacts-v8
      groups:
        - name: edit
       
  2. Try and search with the FindBar --> 0 results
  3. Try and open app by directly manipulating the url. Appending /.magnolia/admincentral#app:resources (or any other app) does nothing

Actual
The system is broke and app are unreachable.

Expected
The user should have been warned about the tab characters upon save and blocked from saving a corrupted configuration.

Workaround
Remove all hotfixes

  1. Shut down.
  2. Delete the resources workspace.
  3. Delete the 4 tables for resources (if applicable).
  4. Start back up.

Notes
We should apply the same type of validation we do for Groovy code. For example I am unable to save a Groovy class which is not well formed or broken in some way.


Generated at Mon Feb 12 06:50:02 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.