Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mdm-explorer is not happy with multiple versions of the root model #314

Closed
NigelPalmer opened this issue Mar 29, 2023 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@NigelPalmer
Copy link
Contributor

NigelPalmer commented Mar 29, 2023

Description

Versioning is an important aspect of Mauro Data Models and moving forwards we want to identify the version of the root model that a Data Specification (formerly known as data requests) was copied from. My investigations into root model version management have revealed that mdm-explorer is unable to cope with multiple versions of the same root model, and a number of errors and unwanted behaviours occur.

Steps to reproduce

  1. Log in to mdm-ui and hard delete all data models from your "OUH Data Warehoues" folder.
  2. Import the latest data model: nautilus_835_data_marts_20230221T115030.json (make sure it has the model name: 'modules')
  3. Open mdm-explorer and select Browse
  4. Select 'BedStays', then 'BEDSTAYS' and click 'View Details'
  5. Click 'Select entire page' and then 'With selected...' and 'Create new request'. Name your request 'Multi root 1', and create.
  6. Everything should be working correctly. Check the request is viewable and has the elements you expect.
  7. Go back to mdm-ui and finalise 'OUH Data Warehouse' 'modules'. (Select modules and click on the green tick in the top right)
  8. Select the default 'Major' and click 'Finalise'
  9. Go back to mdm-explorer and select Browse
  10. Select 'BedStays', then 'BEDSTAYS' and click 'View Details'. Incorrect behaviour: You will see the message 'Unfortunately we could not find any matches based on this criteria.'
  11. Go back to mdm-ui
  12. Select 'modules' under 'OUH Data Warehouse'
  13. Click the 'Create a new version' (The two docs icon in the top right)
  14. Select 'New Version' from the list of actions.
  15. Click 'Create'
  16. Wait for the creation process to complete
  17. Open mdm-explorer and select Browse
  18. Select 'BedStays', then 'BEDSTAYS' and click 'View Details'. Incorrect behaviour: Each data element is duplicated in the list
  19. Click 'Select entire page' and then 'With selected...' and 'Create new request'. Name your request 'Multi root 2', and create. Error occurs: "Data Element 25318770-0848-45bd-bede-65b8e9d6dce6 does not belong to specified model"

Expected behavior

The mdm-explorer root model should choose the latest finalised version. All data elements related to the latest finalised model should be displayed without duplication. Data Specifications should be able to be created without error.

Environment

Desktop

Please complete the following information:

  • OS: Windows 10
  • Browser: Edge
  • Version: 111.0.1661.54 (Official build) (64-bit)

Additional Information

Start by looking in mdm-plugin-explorer at controllers/uk/ac/ox/softeng/maurodatamapper/plugins/explorer/ExplorerController.groovy . The method rootDataModel is what is called by the mdm-explorer to load the root model. This in turn calls down into some mdm-core functionality. So the next step would be to look at mdm-core. We may need to change what rootDataModel calls to retrieve the root model.

Also bare in mind that there is another task to allow for the root model to be chosen. So any fixes done here must not be done in a way that will make that task more difficult to complete.

The task MauroDataMapper-Plugins/mdm-plugin-explorer#15 may be worth a look as well.

@NigelPalmer NigelPalmer added the bug Something isn't working label Mar 29, 2023
@github-project-automation github-project-automation bot moved this to Backlog in MDM State Mar 29, 2023
@NigelPalmer NigelPalmer moved this from Backlog to Fix for next release in MDM State Mar 29, 2023
@NigelPalmer NigelPalmer moved this from Fix for next release to In Progress in MDM State Mar 29, 2023
@NigelPalmer
Copy link
Contributor Author

NigelPalmer commented Mar 31, 2023

This problem was actually caused by the index going out of sync with the data. In the Mdm-UI this can be fixed by simply going to Configuration, clicking on Lucene and clicking on "Rebuild Index". Once that is done all the problems reported in this task go away.

With regards to the Mdm-Explorer only using finalised data models for the root, this has been implemented by the following two tasks:

Therefore, no changes are actually required for this task, so it can be closed.

@github-project-automation github-project-automation bot moved this from In Progress to Merged to Develop / Waiting to release in MDM State Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Merged to Develop / Waiting to release
Development

No branches or pull requests

2 participants