Currently an FDA can be deleted while its initial asynchronous fetch is still in progress. This leads to inconsistent behaviour depending on the execution stage.
Observed cases:
- If the delete request arrives before the initial bootstrap has finished, the DELETE request can block until the creation process completes and eventually fails.
- If the first non-recurring refresh job has already been scheduled but is still running, deleting the FDA removes the recurring jobs but leaves the one-shot Agenda job orphaned.
- Once the initial fetch has completed and only recurring refresh jobs remain, deletion works as expected.
The deletion flow should handle FDAs that are still being initialized.
Possible approaches include:
- Reject deletion while the first fetch hasn't finished.
- Or make deletion fully aware of running initialization jobs, ensuring both one-shot are also cleaned up correctly (as recurring Agenda jobs) and any ongoing work is safely cancelled or ignored.
Additionally, it would be worth reviewing whether the initial refresh job and the scheduled recurring refresh can overlap, potentially causing concurrent executions on the same FDA.
Currently an FDA can be deleted while its initial asynchronous fetch is still in progress. This leads to inconsistent behaviour depending on the execution stage.
Observed cases:
The deletion flow should handle FDAs that are still being initialized.
Possible approaches include:
Additionally, it would be worth reviewing whether the initial refresh job and the scheduled recurring refresh can overlap, potentially causing concurrent executions on the same FDA.