WatchJob() regularly checks if a job was canceled in a goroutine. It
does so by accessing composer's `/jobs/{token}` route. However, once the
main goroutine marks the job as done (by sending PATCH to that same
route), the `token` is no longer valid and thus the route not accessible
anymore.
main() does cancel the goroutine running WatchJob, but it's not
guaranteed that it gets scheduled in time to actually stop watching the
job.
Thus, don't cancel the job when fetching the `/jobs/{token}` fails. This
means that it won't cancel the job anymore when the connection to
composer goes down.
Also, we will be able to move job.Update() into RunJob().
|
||
|---|---|---|
| .. | ||
| cloud-cleaner | ||
| osbuild-auth-tests | ||
| osbuild-composer | ||
| osbuild-composer-cli-tests | ||
| osbuild-dnf-json-tests | ||
| osbuild-image-tests | ||
| osbuild-koji | ||
| osbuild-koji-tests | ||
| osbuild-pipeline | ||
| osbuild-store-dump | ||
| osbuild-upload-aws | ||
| osbuild-upload-azure | ||
| osbuild-worker | ||