-
Couldn't load subscription status.
- Fork 1
Open
Labels
bugSomething isn't workingSomething isn't workingpythonPull requests that update python codePull requests that update python code
Milestone
Description
Description of Bug
In offline mode, if you define multiple of the same alert, these are sent to the server first, and you get back the same online ID for all identical offline IDs. If you then send the run, itll swap all offline IDs for the same online ID, which means you have a list of the same IDs. The server then throws a 'duplicate run IDs' error, and the run doesnt get created
Steps To Reproduce
Code to reproduce the behavior:
from simvue import Run
import simvue.sender as sender
if __name__ == "__main__":
with Run(mode='offline') as run:
run.init()
for i in range(5):
_ta_id = run.create_metric_threshold_alert(
name='test_alert',
frequency=1,
rule='is below',
threshold=1,
metric='metric_counter',
window=2
)
sender.sender()
Expected behavior
Alerts should be deduplicated, run should be created with one alert
Actual Behaviour
Run isnt created and throws back an error
Screenshots
If applicable, add screenshots to help explain your problem.
Setup
- OS: Ubuntu
- Python version: 3.10
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpythonPull requests that update python codePull requests that update python code