We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API Server / GraphQL
0.16.1
Creating nodes currently that use the same value for an unique attribute is allowed and we end up with duplicate entries.
Running the above script should create only one node and subsequent creations should fail.
Using the following schema:
nodes: - name: Service namespace: Cloud display_labels: - name__value attributes: - name: name kind: Text unique: true
If you run the following script that creates multiple nodes with the same name attribute:
name
#!/usr/bin/env python3 import threading import time from infrahub_sdk import InfrahubClientSync def create_node(): client = InfrahubClientSync() node = client.create(kind="CloudService", data={"name": "Unique"}) node.save() for i in range(10): threading.Thread(name=f"t{i}", target=create_node).start() time.sleep(2)
You end up with many nodes.
Might be related to #3272
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Component
API Server / GraphQL
Infrahub version
0.16.1
Current Behavior
Creating nodes currently that use the same value for an unique attribute is allowed and we end up with duplicate entries.
Expected Behavior
Running the above script should create only one node and subsequent creations should fail.
Steps to Reproduce
Using the following schema:
If you run the following script that creates multiple nodes with the same
name
attribute:You end up with many nodes.
Additional Information
Might be related to #3272
The text was updated successfully, but these errors were encountered: