hivemq / hivemq-edge

HiveMQ Edge is an MQTT gateway that enables interoperability between OT devices and IT systems. It translates diverse protocols into MQTT for streamlined communication and helps organize data into a unified namespace, making managing and streaming data across your infrastructure easier.
http://hivemq.com
Apache License 2.0
104 stars 23 forks source link

fix(19825): Ensure resources are fully published before handling policy requests #300

Closed vanch3d closed 7 months ago

vanch3d commented 7 months ago

See https://hivemq.kanbanize.com/ctrl_board/57/cards/19825/details/

The PR reorganises the batch of resource requests (e.g. script and schema1) to ensure that they are all settled before the main policy request (e.g. data policy or behavior policy) is being processed.

Each request triggers an error or success toast, as expected.

The policy request will only be executed if EVERY resource request is successful. A success or error toast is also triggered

Note that is a resource already exists, the relevant resource request will fail, triggering a fail for the policy request. This behaviour might need to be changedwe consider that an existing resource is still a correct one for the policy to reference to.