You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Some directories are separate from --user-data-dir #6834
You can set xdg data home environment variable instead of using the flag.
Notes
Changing this could be considered be a breaking change? If someone was setting --user-data-dir but then relying on these files being in the other location. Not 100% sure how best to proceed. Maybe check if they exist, and if not use the new location, but even that could be breaking.
Maybe introduce a new flag and deprecate --user-data-dir.
I'm not setting --user-data-dir but seeing ~/date-time-01-/home/coder/.local/share/code-server/coder-logs/ directories fill up in ~.
the logs look like it's correct though, and that file/dir actually exists. [CHANGED] /home/coder/.local/share/code-server/coder-logs/code-server-stdout.log
My thought is that these directories should exist as /home/coder/.local/share/code-server/coder-logs/date-time-01-/code-server-stdout.log
Oh weird yeah I got this issue once but then I could never reproduce it. It is especially weird because we are not adding any date time to the file path so I have no idea where it is coming from. Are you on the latest version of code-server?
Do you have any XDG* environment variables set? And just for sanity's sake, is the HOME env var the right value?
Yep, latest.
Running in kubernetes w/ a deployment yaml.
Only env var I set myself is PASSWORD.
no XDG vars, HOME is /home/coder
I am running with args --log trace, along with the tls args.
I suppose trace logs might be it, but I haven't tried it. this was just left over from debugging other things.
I was going to experiment with podman run -p 8080:8080 codercom/code-server --log trace and see if I could get it to reproduce, but seems Docker Hub is down right now. 🔥 I will try later!
I noticed that all the logs that are left over are 10M,
I think it might be hitting the limit and getting rotated out by rotating-file-stream
taking a quick look at the docs, I think the first param for createStream is a filename, not a path.
Additionally there's a path option that:
If present, it is prepended to generated file names as well as for history file.
So I think with trace on, logs have just been getting big enough to be rotated and when they're rotated rfs is prepending the time/date to the whole path, rather than the filename since that's what was passed in.
Activity
bdkuhman commentedon Jun 18, 2024
Might be related, or a separate issue.
I'm not setting --user-data-dir but seeing
~/date-time-01-/home/coder/.local/share/code-server/coder-logs/directories fill up in ~.the logs look like it's correct though, and that file/dir actually exists.
[CHANGED] /home/coder/.local/share/code-server/coder-logs/code-server-stdout.logMy thought is that these directories should exist as
/home/coder/.local/share/code-server/coder-logs/date-time-01-/code-server-stdout.logcode-asher commentedon Jun 20, 2024
Oh weird yeah I got this issue once but then I could never reproduce it. It is especially weird because we are not adding any date time to the file path so I have no idea where it is coming from. Are you on the latest version of code-server?
Do you have any
XDG*environment variables set? And just for sanity's sake, is theHOMEenv var the right value?bdkuhman commentedon Jun 20, 2024
Yep, latest.
Running in kubernetes w/ a deployment yaml.
Only env var I set myself is PASSWORD.
no XDG vars, HOME is /home/coder
I am running with args
--log trace, along with the tls args.I suppose trace logs might be it, but I haven't tried it. this was just left over from debugging other things.
code-asher commentedon Jun 20, 2024
I was going to experiment with
podman run -p 8080:8080 codercom/code-server --log traceand see if I could get it to reproduce, but seems Docker Hub is down right now. 🔥 I will try later!bdkuhman commentedon Jun 21, 2024
I noticed that all the logs that are left over are 10M,
I think it might be hitting the limit and getting rotated out by
rotating-file-streamtaking a quick look at the docs, I think the first param for
createStreamis a filename, not a path.Additionally there's a
pathoption that:So I think with trace on, logs have just been getting big enough to be rotated and when they're rotated rfs is prepending the time/date to the whole path, rather than the filename since that's what was passed in.
code-asher commentedon Jun 21, 2024
Ohhh! Really good find!!! I reproduced by lowering the limit.
Pushed up a fix here: d431c9c
Thank you for figuring this out. It will make it into the 4.90.3 release today.