Cannot upload any NodeSet2.xml via UA-CloudViewer
sebwiendl opened this issue · 4 comments
Hello everyone,
I am trying to setup a UA-CloudLibrary. Currently I'm working locally in a trivial/minimal environment defined by this compose.yaml
:
services:
uacv:
image: ghcr.io/digitaltwinconsortium/ua-cloudviewer:main
ports:
- 8080:80
uacl:
image: ghcr.io/opcfoundation/ua-cloudlibrary:latest
ports:
- 8081:80
environment:
- PostgreSQLEndpoint=db
- PostgreSQLUsername=uacl
- PostgreSQLPassword=uacl
- ServicePassword=uacl
depends_on:
- db
db:
image: postgres:latest
environment:
- POSTGRES_USER=uacl
- POSTGRES_PASSWORD=uacl
- POSTGRES_DB=uacl
I can visit the UA-CloudLibrary under http://localhost:8081 and register for an account. I can then use this account to login from the UA-CloudViewer from http://localhost:8080. I can also upload and browse any (of the ones I tried; one was proprietary, one was PackML from https://github.com/OPCFoundation/UA-Nodeset/blob/latest/PackML/Opc.Ua.PackML.NodeSet2.xml) NodeSet2.xml files to the UA-CloudViewer.
However, trying to use the UA-CloudViewer to upload any NodeSet2.xml to the UA-CloudLibrary (with all required fields filled out and all non-required fields empty) always fails with PublicationDate in metadata does not match nodeset XML.
. However, my UA-CloudViewer upload dialog has no PublicationDate form field. The validation in question seems to be:
What am I missing here? Any help is much appreciated.
Best Regards
Sebastian
It looks like this validation was added in August 2022 to prevent inconsistencies between the metadata in the database and the nodeset. With the new, stricter metadata mechanism we could now just always use the data from the nodeset itself, maybe just log a warning if the metadata being passed in is out of date? Or we could allow that the PublicationDate and other metadata not be specified, but still check for consistency if they are?
It appears that the UA-CloudViewer does not set this metadata, so a fix/workaround would be to change the UA-CloudViewer, but it seems better if we make the Cloud Library itself more lenient here. Happy to make the fix if everybody agrees.
Thanks Markus for taking a look. I agree that we should harden UA Cloud Lib. Let's discuss in our next meeting on Tuesday.
Let's keep publication date and return it for queries but ignore it on upload and always take the publication date from the nodeset file.
Thanks for your feedback on this issue. The solution sounds feasible.
In the meantime, I successfully used the UA-CloudLibrary REST API to directly upload information models, bypassing the UA-CloudViewer UI.