optimus
optimus copied to clipboard
Bug on creating sensor with duplicate task id
Describe the bug
This bug happens when we want to create one or more sensors that already exist. So far, this bug happens when we encounter the following scenario:
- duplicate job name being used as sensor
- let's say we have
job1
exists inproject1
andproject2
- at the same time, we have
job2
that requiresjob1
to run first - during
job2
dag compilation, it will encounterjob1
twice as the dependency, when creating the sensor
- let's say we have
- two or more hooks with the same type
- let's say we have
job1
with two same hooks, for example, let's name the hooksbq2bq
- during
job1
dag compilation, it will encounterhook_bq2bq
twice, and this causes error
- let's say we have
Expected behavior
For this issue, we need to come up with a way to ensure the task_id
is unique. And along with that, the duplication shouldn't happen and no error is encountered.