fix: install-deadline-worker doesn't create queues persistence dir on Windows #377
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What was the problem/requirement? (What/Why)
On Linux, the
install-deadline-worker
command creates the<PERSISTENCE_DIR>/queues
directory if it does not pre-exist.On Windows, the
install-deadline-worker
command does not create the<PERSISTENCE_DIR>/queues
directory.See https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/mainline/docs/state.md#persistence-directory for details on the persistence directory.
What was the solution? (How)
Add logic to the Windows
install-deadline-worker
implementation to create the<PERSISTENCE_DIR>/queues
directory if it does not exist.When trying to run the linting (
hatch run lint
) and unit tests (hatch run test
) on Windows, I encountered some failures that I've included in this PR to get the tests passing.What is the impact of this change?
The behavior of
install-deadline-worker
is consistent between Linux and Windows and creates the<PERSISTENCE_DIR>/queues
directory if it does not exist.How was this change tested?
Ran the modified
install-deadline-worker
on a Windows host and confirmed that the<PERSISTENCE_DIR>/queues
directory was created as expected.Was this change documented?
No
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.