Issue creating new configuration snapshots via Cumulocity IoT frontend

Product/components used and version/fix level:

Cumulocity IoT device management application version 1018.503.1

Detailed explanation of the problem:

We want to upload multiple configuration snapshots to a configuration repository via the device management user interface. Our device supports typed file-based configuration, so we need to associate each snapshot with a type while creating it. With the mentioned version of the frontend application, we can’t upload multiple snapshots of the same type because the UI updates an arbitrary existing snapshot of the same type when trying to upload a new snapshot.

We believe the underlying issue is, that the “Add configuration snapshot” dialogue fetches all existing snapshots to determine which configuration types are available. When the user selects an existing configuration type via the dropdown menu, the UI switches from “Create a new snapshot” mode to “Update an existing snapshot” mode. You can trace this via the network inspector of the browser (The frontend issues a PUT request instead of a POST request to the /inventory/managedObjects endpoint). We believe this is a bug that is very confusing for the end user.

We have found a workaround to upload multiple snapshots of the same type that involves not using the proposed items in the dropdown menu and always entering the configuration type via the keyboard. Then the UI does not update an existing item and creates a new one like we expect it to do. We doubt that the dialogue is meant to be used that way because this defeats the purpose of a dropdown menu.

Question related to a free trial, or to a production (customer) instance?

We are a device partner for Cumulocity IoT, and we encountered this issue on the instance we use for device certification.

Hi @uwe.sommerlatt

you might be right or it seems to be intended.

By selecting an existing type from the drop down box you might have the intention to update an existing configuration of the same type by clicking the existing one. Still, it leads to confusion as you don’t see the existing values. So either existing values should be populated and updated or even the type even when selected should always be created.

This should be tracked as an issue in our support channel. Are you able to create one or should we do it for you?

If you click on “new” you can make sure that a “new” configuration of the same type is created.

@Stefan_Witschel Thanks for your reply!

We have no access to a support channel, and the people we tried to contact at Empower and the Software AG partner program suggested that we post this here. If you can create an issue for us, that would be much appreciated because that was my intention in the first place.

You are right that the observed behaviour might be intended. I would like to argue that there are several hints that this is not the case:

  • Previous versions of the device management frontend did not exhibit this behaviour (e.g. version 1015.0.393 or 1011.0.12)
  • The submit button of the form still reads “Add configuration”, whereas when you update an existing configuration by clicking on the entry it reads “Update configuration”
  • If the intent was to update an existing snapshot, then it should replace the existing snapshot file by the new one that the user selected via the form, but that is not the case

Thanks for posting it here!
I asked @Christian.Schade to create an issue for this. There it can be discussed if this intended or not and also be improved.

@Stefan_Witschel, @Christian.Schade

:+1: Thank you!

If you are looking for easy way to upload multiple configuration files with your current tenant, then you could consider using go-c8y-cli - the unofficial cli tool for Cumulocity IoT (disclosure, I’m the author).

You can add multiple configurations (of the same type) using the c8y configuration create command.

# upload config1
c8y configuration create --name config1 --configurationType agent --file ./example.json

# upload config2
c8y configuration create --name config2 --configurationType agent --file ./example.json

Then either check in the UI to see config1 and config2, both with the configuration type agent.

Or you can use the cli to get a list of configuration items:

% c8y configuration list --configurationType agent
| id             | name         | configurationType | devicetype           | lastUpdated                   |
|----------------|--------------|-------------------|----------------------|-------------------------------|
| 906364900      | config1      | agent             |                      | 2024-01-17T08:44:36.703Z      |
| 306367032      | config2      | agent             |                      | 2024-01-17T08:44:42.696Z      |

@Reuben_Miller2 Thanks for the hint. I have slapped together a small bash script to upload multiple configuration snapshots just because of this issue, but your tool looks much better indeed!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.