cli: retain workspace volume when volumes option is set #970
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.
Currently the workspace bind mount is overwritten when setting the volumes property in the steps' options field.
Popper Version: 2020.09.1
Minimal Working Example:
This behavior can be worked around by using docker-py's mount option instead of the volumes option, but the behavior of the volumes option seems unintuitive to me.
This pull request retains the workspace mount, by appending it to the volumes list after the update call with the step specific options.
In case anyone else stumbles over this behavior before this behavior is changed (or if the behavior is intentional) the following workflow works as intended. However, keep in mind that the mounts option requires you to specify the mount type, which would be inferred when using the volumes option.