Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-8033

Rename yaml content app files causes "Can't register [app] definition"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • 6.2.6
    • None
    • None

    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.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                canh.nguyen Canh Nguyen
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:

                  Checklists

                    Bug DoR
                    Task DoD