When starting a worker using PosixInstanceWorker it can sometimes be the case that we query for the Worker's id before the worker.json file has been written to disk. If this happens then the test will fail.
What was the solution? (How)
Repeatedly query for the worker.json file in a delaying loop, up to a maximum of 10 queries after about a minute. Note that this mitigation was already implemented for the Windows agent, but was missing in the Linux agent.
What is the impact of this change?
Fewer flaky tests.
How was this change tested?
I ran the deadline-cloud-worker-agent e2e tests on linux.
Was this change documented?
N/A
Is this a breaking change?
No
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
What was the problem/requirement? (What/Why)
When starting a worker using PosixInstanceWorker it can sometimes be the case that we query for the Worker's id before the worker.json file has been written to disk. If this happens then the test will fail.
What was the solution? (How)
Repeatedly query for the worker.json file in a delaying loop, up to a maximum of 10 queries after about a minute. Note that this mitigation was already implemented for the Windows agent, but was missing in the Linux agent.
What is the impact of this change?
Fewer flaky tests.
How was this change tested?
I ran the deadline-cloud-worker-agent e2e tests on linux.
Was this change documented?
N/A
Is this a breaking change?
No
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.