I accidentally made a model change in one of the c...
# gooddata-platform
I accidentally made a model change in one of the client workspaces. Now when I sync from the master, the model changes from the master are not propagated to the client. I have tried to "reset" the client model and every time I try to make a change on the client model and hit save it always says it saved but there is a message at the top of the model screen that says "View mode. Model contains changes that are not displayed. Edit". And every time I leave the model screen it warns me there are unsaved changes. No matter how many times I try to save, it keeps saying this. Also when I run my rollout brick from the service workspace and look at the logs there is a warning in the log that says "[2023-09-27T234121.423571 #7] INFO -- : Synchronize LDM to clients will not proceed in mode 'diff_against_master_with_fallback' due to no LDM changes in the segment master project. If you had changed LDM of clients manually, please use mode 'diff_against_clients' to force synchronize LDM to clients" How do I fix this? I want to force push the model that is in the master to all the clients. The change I made to the client model was an accident. I can't find any documentation on these various parameters so I don't know how to use them or change them.
Hi Willie, I assume you are using the release and rollout bricks to manage your client workspaces? • stuck local model in client workspace ◦ the local changes to the model are saved to browser local storage. In edit mode you might try to discard the locally saved version by clicking on the “Cancel” (which is next to the save button) and then confirming “Discard”. This should remove any working model from your local browser storage (no impact to the workspace on the server) and help get rid of that “contains changes that are not displayed…” message. • export/import to align the broken workspace model ◦ If you only have the model broken in one client workspace and know which one, It might be the easiest and quickest way to align it back with your master with an export and import of the LDM via a JSON file (I am assuming here you want to have the model exactly the same and you don’t have any custom fields there): ▪︎ go to the modeller in the master workspace (and make sure there are not any unsaved changes) ▪︎ click the three dots in the top right corner and select “Export model to JSON” and save the file. ▪︎ go to the modeller in the broken client workspace and switch to edit mode ▪︎ click the three dots in the top right corner and select “Import model from JSON” and select the previously saved file ▪︎ now you should have the exact copy of the master LDM and you can click “Save” to publish it to the broken client workspace ◦ note that this will only fix the model, it will not bring back any insights/metrics if the previous model change caused them to be removed. That could only be fixed by rollout. • synchronize_ldm parameter in the rollout brick ◦ NOTE: if you did the previsous import/export step and it worked, you don’t need to do this. ◦ What the warning in the rollout brick is talking about is the parameter “synchronize_ldm”. Because comparing data models of two workspaces can take some time, with a lot of client workspaces, this would make the rollout a long running process. Since normally all client workspaces have the same LDM, by default it only checks if there were changes from the previous master and applies those changes to all clients and does not check every single workspace against the latest master. That means if client LDM differs from the previous master (like in your case) it will not align it with the default setup. ◦ The parameter
changes this behavior and is described here in the Advanced section. ◦ The parameter would go into the gd_encoded_params parameter (see screenshot) and setting it to “`diff_against_clients`” value will force the rollout brick to compare each individual client workspace model to the master model and align it if it is not aligned. This can take a long time depending on size of the model and number of workspaces. ▪︎ NOTE: doing this will remove any model customizations you might have in ALL your client workspaces (i.e. renamed fields, additional custom fields, additional datasets etc.) ◦ Most probably you will only need to run this process with this parameter once (if at all). After the model is aligned, you can change/remove this parameter and continue with the default mode ◦ And again it might be much easier and safer to perform the export/import of the model manually if you know which workspace is broken than changing this parameter.
Thanks for the response. So, Suggestion 1 didn't work. Suggestion 2 didn't work. I ran the rollout brick with suggestion 3 and it didn't fix the problem either. I also completely cleared my browser cache. Every time I go into a client model the same thing happens. Even if I go into just view the model (not edit it) and I try to leave and go to a different screen it displays this message. Hitting save doesn't fix anything.
If I hit save, here is the summary screen. It seems to be getting stuck on the data mappings for one of the objects in my model.
If I hit save on that screen, it just happens again. Its like its never repairing itself. This is DEV so I only have 3 client workspaces, so it would be easy to fix it manually. I just can't figure out how to
Hmm that is weird indeed. Is the only change, the mapping of existing dataset? I am running out of ideas but you can try making some "bigger" change i.e. try to add a new dataset (just a dummy one which can be later removed). Just to try if the mapping is not "too small" change to go through by itself. (It should not be but just guessing if there is not some bug).