debian-forge-composer/cmd
Lars Karlitski 1184d78494 worker: remove race from WatchJob()
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().
2020-11-09 14:17:19 +01:00
..
cloud-cleaner ci: fix artifact name generation in cloud cleaner 2020-10-14 13:00:48 +02:00
osbuild-auth-tests test/auth: rework the test to use the new openssl setup 2020-11-05 13:48:48 +01:00
osbuild-composer tree-wide: drop f31 support 2020-10-21 09:04:13 +02:00
osbuild-composer-cli-tests tests: rename composer-cli tests 2020-10-06 13:08:26 +02:00
osbuild-dnf-json-tests tree-wide: drop f31 support 2020-10-21 09:04:13 +02:00
osbuild-image-tests test: restructure dir layout 2020-10-21 09:04:13 +02:00
osbuild-koji upload/koji: don't pass task_id to cg_init_build 2020-09-16 00:15:02 +01:00
osbuild-koji-tests test/koji: move the koji test to schutzbot 2020-11-02 19:59:28 +01:00
osbuild-pipeline tree-wide: drop f31 support 2020-10-21 09:04:13 +02:00
osbuild-store-dump distro: replace BasePackages() with Packages() 2020-06-29 16:04:38 +02:00
osbuild-upload-aws Refactor Azure upload code to a separate package 2019-11-27 12:14:07 +01:00
osbuild-upload-azure cmd/osbuild-upload-azure: improve error message on wrong arguments 2020-04-27 20:34:20 +02:00
osbuild-worker worker: remove race from WatchJob() 2020-11-09 14:17:19 +01:00