37
Views
2
Comments
[Discovery] Weird has version check in ModuleLayerBootstrap action in DiscoveryProbe
discovery
Web icon
Forge component by Francisco Menezes
Application Type
Traditional Web

Background

We have been using the Discovery component for several years and it has (obviously) been updated several times from the forge. At some point, the discovery application stopped showing data, and trying to create a snapshot resulted in errors in ServiceCenter.

Primary cause

The exceptions were thrown in the UpdateModuleDefinitionsForExtensions2 SQL statement in the Modules_Reload action. This statement violated a foreign key constraint to the ModuleLayer entity. Upon inspecting, the ModuleLayer entity was empty. I expect this to be related to updating the application over time.

Bug

The bug why the ModuleLayer entity was empty is in the ModuleLayerBootstrap action in the DiscoveryProbe module. This action is responsible for bootstrapping the ModuleLayer entity when publishing the Discovery application.

In this action, there is a check on if the configuration has a version (this could be seen as a strange check on if the application is updated or newly installed) which bypasses the normal bootstrapping of the ModuleLayer entity, but instead only calls another action to remove the Orchestration layer (which is not used anymore in OS11).

Solution

The version check and connected RemoveOrchestration action can be removed, as the RemoveOrchestration is executed in the other path as well. This will ensure the normal bootstrapping is performed.

Other people with this problem

I believe this might be the solution to other peoples problems as well:

https://www.outsystems.com/forums/discussion/71580/error-in-createmoduledefinitionsforextensions2-in-modules-reload/

https://www.outsystems.com/forums/discussion/63692/error-in-query-createmoduledefinitionsforextensionsoracle/

https://www.outsystems.com/forums/discussion/70646/not-creating-snapshot-for-ms-sql-server/

https://www.outsystems.com/forums/discussion/69825/version-4-1-1-cant-take-snapshot/

https://www.outsystems.com/forums/discussion/69222/version-5-1-1-creating-snapshopt-not-possible/

Workaround

There are two possible workarounds:

- Apply the solution yourself (not recommended)

- Update the Configuration record so that the Version attribute is empty and run the BootstrapModuleLayer timer. This will make sure that the normal bootstrap path is followed.

Your analysis is what I discovered myself today as well.

This has been going on for a year now, and it is still not fixed. This is and has been a vital component for many years and the dependency schemas alone merit the existence of this tool separately from AI Mentor Studio. Can this be fixed?

Hi, the next version will have this bug solved.

Thank you for the solution.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.