Artifact name with script update module

Is it possible to prevent the artifact_name from changing when running a script from an artifact created using the script update module?

I’d like to be able to deploy a script artifact and have it run without changing the current artifact_name (and the “Current software” field under Devices in the Mender server dashboard). Thanks.

At the moment no. I know there are some discussions regarding how to handle artifact naming and history but I don’t think anything is actively in progress. @kacf can you comment?

Indeed, it’s not possible to prevent this at the moment. But this is a problem we’re very aware of, and as recently as last week we were discussing potential remedies for this problem. Since no decision has been made yet, I don’t want to promise neither a time nor what form it will take, but rest assured that it’s something we are working to improve.

Sounds good, thanks. In the meantime I am using a custom device inventory attribute to track the firmware version across various updates instead of using the artifact name.

Hello, do you have any update on this topic?

Thanks

Yes, we do! The implementation plan for this was just finished last week. Reading the requirements list might be a little bit technical, but it breaks down to this:

  • Artifact name will always be updated, as before.
  • However, in addition, each Update Module will have it’s own namespace, with its own name. For example you will have
    • rootfs-image.name: My-rootfs-image-name
    • single-file.name: My-single-file-update
  • In addition you can have custom names, like:
    • MyCustomApp.name: MyApp-version-2.1

The important thing is that each namespace does not affect the other namespaces, so you can install a new single-file update, and the rootfs-image.name will not change. There are more customizations and details, but that’s the heart of it.

1 Like

Any update? In the meantime, how do you suggest to track the OS version (and the application version if we use a different artifact type for it)?

No update, unfortunately. Still on the roadmap, but development hasn’t started yet.

As a workaround, I suggest you put an identifier for your OS and application in a file which gets deployed to the device together with the artifact, and then use an inventory script to report that back to the server.

1 Like

Makes sense. Thanks a lot.