aicers / review-web

A web interface to REview
Apache License 2.0
0 stars 1 forks source link

Validate request to apply new configuration to a node #293

Open sehkone opened 3 weeks ago

sehkone commented 3 weeks ago

The GraphQL resolver applyNode receives a node ID and attempts to update the node's information and agent configurations. However, if the node is modified by another administrator in the meantime, the user of the resolver might encounter unexpected results. Therefore, the resolver should receive all the node's information as an argument and reject the request if it doesn't match the data stored in the database. This way, we can ensure that users of applyNode don't experience unexpected updates to the node.

I think it would be great to enable this feature after the current node tasks are completed.

sehkone commented 3 weeks ago

This implies that the user already knows all the information about a node including Giganto. Therefore, the resolver will not need to return the draft of Giganto. Instead, it should return whether the user can send a request to Giganto.