Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dev): ensure socket path is accessable #1115

Merged
merged 6 commits into from
Jun 28, 2023
Merged

fix(dev): ensure socket path is accessable #1115

merged 6 commits into from
Jun 28, 2023

Conversation

sbittmann
Copy link
Contributor

@sbittmann sbittmann commented Apr 5, 2023

πŸ”— Linked issue

nuxt/nuxt#15164

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

On windows we are facing the issue, that the devServer returns status 503. This is caused by the existsSync() call, which returns false if the the api is under load. With fs.promises.access I didn't face this problem anymore.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@codecov
Copy link

codecov bot commented Apr 6, 2023

Codecov Report

Merging #1115 (e74885f) into main (20c841c) will decrease coverage by 0.04%.
The diff coverage is 65.21%.

@@            Coverage Diff             @@
##             main    #1115      +/-   ##
==========================================
- Coverage   76.58%   76.55%   -0.04%     
==========================================
  Files          70       70              
  Lines        7193     7212      +19     
  Branches      715      718       +3     
==========================================
+ Hits         5509     5521      +12     
- Misses       1683     1690       +7     
  Partials        1        1              
Impacted Files Coverage Ξ”
src/dev/server.ts 83.81% <65.21%> (-1.52%) ⬇️

src/dev/server.ts Outdated Show resolved Hide resolved
datismoa added a commit to datismoa/nitro that referenced this pull request Jun 20, 2023
@pi0 pi0 changed the title fix: windows dev-Server returns 503 fix(dev): ensure socket path is accessable Jun 20, 2023
danielroe added a commit to nuxt/nuxt that referenced this pull request Jun 21, 2023
Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

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

In preliminary testing, this seems to decrease flakiness in nuxt CI dev server tests.

Is it also worth switching to fsp.access here too?
https://github.com/unjs/nitro/blob/34d9d1dc074f2c13f6d5c83a50d500d501a725ac/src/dev/server.ts#L97-L99

@pi0
Copy link
Member

pi0 commented Jun 21, 2023

I am aware this is an important DX fix. However needs to be tested more if we can find a solution without per/request overhead of checking sockets and that this works universally. Delaying to next patch/minor release.

@csprance
Copy link

This issue still seems to be happening even with this fix.

@pi0
Copy link
Member

pi0 commented Jul 17, 2023

Tracking via #1454

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants