batches: fix Docker Desktop for Linux handling#813
Merged
Conversation
If the default temporary directory is in use _and_ Docker Desktop for Linux is the default Docker context, this changes the temporary directory to be one under `~/.cache/sourcegraph/batch-tmp` instead. Fixes #754.
Piszmog
approved these changes
Aug 10, 2022
courier-new
approved these changes
Aug 10, 2022
courier-new
left a comment
Contributor
There was a problem hiding this comment.
I'm so glad you have an actual linux box to test this on. Thanks for all the comments for future context, too!
| } | ||
| defer cancel() | ||
|
|
||
| args := []string{"context", "inspect", "--format", "{{ .Name }}"} |
Contributor
There was a problem hiding this comment.
Wow, it makes me happy that this is so straightforward to get from Docker! 😄
Contributor
Author
There was a problem hiding this comment.
I suspected the hardest part of this ticket was going to be detecting this case, so this was a very pleasant surprise.
scjohns
pushed a commit
that referenced
this pull request
Apr 24, 2023
If the default temporary directory is in use _and_ Docker Desktop for Linux is the default Docker context, this changes the temporary directory to be one under `~/.cache/sourcegraph/batch-tmp` instead. Fixes #754.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
If the default temporary directory is in use and Docker Desktop for Linux is the default Docker context, this changes the temporary directory to be one under
~/.cache/sourcegraph/batch-tmpinstead.Fixes #754.
Test plan
Tested manually in both workspace modes.