Open ogenstad opened 11 months ago
I think there are a couple of changes we could do to improve that.
I'm not sure we want to enforce unique attributes in that way. For instance with groups I think we might want to be able to have the same name for different type of groups.
Don't quite get what you mean with the filter and how that would help here, would need some clarity there.
Component
API Server / GraphQL
Task Description
In relation to the ArtifactDefinition we define this generic object:
And these nodes that are tied to an artifact definition:
Within the example scripts for
infrastructure_edge.py
we create a number of StandardGroups and then refer to these from the infrahub-edge repository:The assumption here is that
arista_devices
would be a unique name for this group. However we don't have any such guarantee. While we can ensure that StandardGroup won't have other groups that might have the same name.I.e. we can have a query that looks like this:
Response:
While I haven't tested to see what happens this feels problematic and it could cause random errors etc. The best solution might be to force users to specify the type of group instead of just any group coming from "CoreGroup".