[MAGNOLIA-8033] Rename yaml content app files causes "Can't register [app] definition" Created: 17/Mar/21  Updated: 17/Mar/21

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

Type: Bug Priority: Minor
Reporter: Canh Nguyen Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Git Code Review
opened during git code review in MAGNOLIA-7483 Definitions in registry that is using... 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)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled

 Description   

Steps to reproduce

  1.  Rename a yaml content app file
  2.  The console log shows Can't register [app] definition...
2021-03-10 12:32:03,696 ERROR info.magnolia.config.registry.RegistryMap         : Can't register [app] definition [books-app222] with reference id: [books-app222] from module [bookcase] at [books-app] since a definition with the same id books-app222 is already registered as [app] definition [books-app222] with reference id: [books-app222] from module [bookcase] at [book-app].

Expected results

The app is re-registered successfully.

Actual results

The console shows a log similar above text and the app is unregistered.

Workaround

Make some changes on the file or rename the file again.

Development notes

The file watcher service sends a MODIFIED/CREATED event first then sends a REMOVED event when renaming a file. The app registry tries to register the app but the app is existed with the old path, then the app registry gets REMOVED event so it unregisters the app.


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