diagnostics icon indicating copy to clipboard operation
diagnostics copied to clipboard

dotnet tools don't work in read-only FS deployments due to tmp dependency

Open hoyosjs opened this issue 1 year ago • 1 comments

System.Commandline tries to create a sentinel in tmp when registering for dotnet-suggest for their support of autocompletion support. This prevents usage of tools in read-only deployments.

hoyosjs avatar Jan 09 '24 23:01 hoyosjs

Some thoughts:

  • We have documented our dependency on /tmp or $TMPDIR and with that workaround our tools seem to work on RO filesystems (as far as I can tell). Perhaps we should link https://learn.microsoft.com/en-us/dotnet/core/diagnostics/diagnostic-port#default-diagnostic-port documentation to our global tool docs and specifically call out if /tmp isn't writable, then TMPDIR needs to be set in both the target process as well as the diagnostic tool.
  • Add a warning/error to dotnet-* tools when we detect that /tmp or $TMPDIR isn't writable.

tommcdon avatar Jan 10 '24 00:01 tommcdon

Partially solved with https://github.com/dotnet/diagnostics/pull/4593

hoyosjs avatar May 20 '24 22:05 hoyosjs

Why does this only partially solves this issue? The initial description only talks about the System.CommandLine problem which is fixed by that PR. The title and Tom's comments may indicate there are other R/O /tmp problems. Can we list them?

mikem8361 avatar May 20 '24 23:05 mikem8361

Or can we create other issues to address the rest of the R/O problems?

mikem8361 avatar May 20 '24 23:05 mikem8361

Fixed in the next tools release which will be this week or next.

mikem8361 avatar Jun 06 '24 21:06 mikem8361