We've been having an issue with the GCS ftest taking > 10 minutes. Digging with @artem-shelkovnikov today, we found that there was a sync that received a SIGINT, and acted like it was stopping/cleaning up (printed job counters and everything) but the extractor clearly kept going. Digging further, we found a logical error, where the SyncOrchestrator's tasks were only being canceled if there was an "error" in the job.
This change instead makes sure that orchestrator.close() always cancels the tasks if they are still running. It also makes sure that the SyncJobRunner's _sync_done() function always calls orchestrator.cancel(). There is no risk in calling cancel() multiple times.
Checklists
Pre-Review Checklist
[x] this PR does NOT contain credentials of any kind, such as API keys or username/passwords (double check config.yml.example)
[x] this PR has a meaningful title
[x] this PR links to all relevant github issues that it fixes or partially addresses
[x] this PR has a thorough description
[x] Covered the changes with automated tests
[x] Tested the changes locally
[x] Added a label for each target release version (example: v7.13.2, v7.14.0, v8.0.0)
Release Note
Fixes a bug where the framework might receive an interrupt, but not terminate all running sync job tasks correctly.
relates to https://github.com/elastic/connectors/issues/2638
We've been having an issue with the GCS ftest taking > 10 minutes. Digging with @artem-shelkovnikov today, we found that there was a sync that received a SIGINT, and acted like it was stopping/cleaning up (printed job counters and everything) but the extractor clearly kept going. Digging further, we found a logical error, where the SyncOrchestrator's tasks were only being canceled if there was an "error" in the job.
This change instead makes sure that
orchestrator.close()
always cancels the tasks if they are still running. It also makes sure that the SyncJobRunner's_sync_done()
function always callsorchestrator.cancel()
. There is no risk in callingcancel()
multiple times.Checklists
Pre-Review Checklist
config.yml.example
)v7.13.2
,v7.14.0
,v8.0.0
)Release Note
Fixes a bug where the framework might receive an interrupt, but not terminate all running sync job tasks correctly.