Skip to content

Add custom path for vscode-server socket files and named pipe length#172481

Merged
bpasero merged 4 commits intomicrosoft:mainfrom
MarkZuber:markzuber/socketpaths
Feb 22, 2023
Merged

Add custom path for vscode-server socket files and named pipe length#172481
bpasero merged 4 commits intomicrosoft:mainfrom
MarkZuber:markzuber/socketpaths

Conversation

@MarkZuber
Copy link
Copy Markdown
Contributor

@MarkZuber MarkZuber commented Jan 25, 2023

Change for #172480

For socket file name length we scope version to 4 characters and type to 6 characters and have found that works great for Windows.

This has been tested and validated in our environment to remove issues related to ensuring windows named pipes are resilient to variable name length.

@alexdima
Copy link
Copy Markdown
Member

Let's discuss in #172480 (comment)

@alexdima alexdima requested review from alexdima and bpasero February 17, 2023 12:50
@alexdima alexdima assigned bpasero and unassigned alexdima Feb 17, 2023
alexdima
alexdima previously approved these changes Feb 17, 2023
@bpasero bpasero added this to the February 2023 milestone Feb 17, 2023
Copy link
Copy Markdown
Member

@bpasero bpasero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not really understand this change. The comment indicates this helps on Windows, but this change is for macOS/Linux?

Besides, the only consumer of this method is this it seems:

get mainIPCHandle(): string { return createStaticIPCHandle(this.userDataPath, 'main', this.productService.version); }

As such, the type is always going to be short (main) and the version at least for stable will be short as well (1.75.0).

Am I missing something?

@bpasero bpasero added the info-needed Issue requires more information from poster label Feb 17, 2023
@bpasero bpasero removed this from the February 2023 milestone Feb 20, 2023
@MarkZuber
Copy link
Copy Markdown
Contributor Author

Our version string is longer than 1.75.0 (we use date based versions which end up extending this beyond the limit). So in your the case of public VS Code, this wouldn't have an effect but it does for us. If you feel this doesn't make sense to upstream given the way the public product is versioned, we can keep this fork on our end.

@bpasero
Copy link
Copy Markdown
Member

bpasero commented Feb 21, 2023

I see. Still, this change has no impact on Windows right? So what problem does this address?

@MarkZuber
Copy link
Copy Markdown
Contributor Author

Apologies on the comment, I went backwards. :( windows returns early from this function with their named pipe which works fine. but there's a limit on macos and linux for the name of the .sock file which ends up getting too long with our additional versioning. This is related to the stackexchange comment in the original issue.

https://unix.stackexchange.com/questions/367008/why-is-socket-path-length-limited-to-a-hundred-chars

@bpasero bpasero removed the info-needed Issue requires more information from poster label Feb 22, 2023
@bpasero bpasero added this to the March 2023 milestone Feb 22, 2023
@bpasero
Copy link
Copy Markdown
Member

bpasero commented Feb 22, 2023

Ok understood, setting to March for consideration.

Copy link
Copy Markdown
Member

@bpasero bpasero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I think this is good to go even for Feb.

@bpasero bpasero enabled auto-merge (squash) February 22, 2023 08:04
@bpasero bpasero requested a review from alexdima February 22, 2023 09:42
@bpasero bpasero merged commit a0bf7f5 into microsoft:main Feb 22, 2023
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants