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(server): set port before instantiating server #2143

Merged
merged 10 commits into from Jul 30, 2019

Conversation

joeldenning
Copy link
Contributor

@joeldenning joeldenning commented Jul 22, 2019

  • This is a bugfix
  • This is a feature
  • This is a code refactor
  • This is a test update
  • This is a docs update
  • This is a metadata update

For Bugs and Features; did you add new tests?

Yes

Motivation / Use-Case

This resolves #2142.

Breaking Changes

No breaking changes.

Additional Info

The reason this fixes the bug is that we are setting options.port before calling new Server() instead of afterwards. The constructor in Server calls function that need the port to already be present.

@codecov
Copy link

codecov bot commented Jul 22, 2019

Codecov Report

Merging #2143 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2143   +/-   ##
=======================================
  Coverage   93.91%   93.91%           
=======================================
  Files          33       33           
  Lines        1265     1265           
  Branches      361      361           
=======================================
  Hits         1188     1188           
  Misses         71       71           
  Partials        6        6

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f80e2ae...f962dc2. Read the comment docs.

@joeldenning joeldenning force-pushed the issue-2142 branch 2 times, most recently from 3acd2f0 to 3b6cc69 Compare July 22, 2019 05:44
Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

/cc @hiroppy @Loonride what do you think guys?

@knagaitsev
Copy link
Collaborator

This solution looks good to me, just one note.

@evilebottnawi Unfortunately, this problem will make it difficult, or maybe impossible, to move findPort into the API for the CLI refactor.

test/cli/cli.test.js Outdated Show resolved Hide resolved
@joeldenning
Copy link
Contributor Author

The failed tests are related to a "page crashed" error that seems to be unrelated to my code changes.

@joeldenning
Copy link
Contributor Author

@Loonride @hiroppy anything else before this is good to merge?

@knagaitsev
Copy link
Collaborator

Looks good to me.

@joeldenning
Copy link
Contributor Author

Anybody know why one of the azure checks is still pending? When I go to Azure it says that everything passed. Is it because a commit on master isn't merged into this branch?

I'm trying out merging master into this branch again.

@knagaitsev
Copy link
Collaborator

@joeldenning It looks like a Page crashed issue. Not your fault, there is still some instability with the e2e tests here. Your PR can still be merged if a couple CI builds are failing/timing out for this particular reason since your changes are not causing it.

@joeldenning
Copy link
Contributor Author

All checks are now passing, after merging master in to retrigger the build.

Time to merge?

@mistic
Copy link
Contributor

mistic commented Jul 30, 2019

@evilebottnawi could you merge this?

@alexander-akait alexander-akait merged commit cfbf229 into webpack:master Jul 30, 2019
@joeldenning joeldenning deleted the issue-2142 branch July 30, 2019 07:46
@joeldenning joeldenning restored the issue-2142 branch July 30, 2019 07:46
@joeldenning joeldenning deleted the issue-2142 branch July 30, 2019 07:46
@joeldenning joeldenning restored the issue-2142 branch July 30, 2019 07:46
knagaitsev pushed a commit to knagaitsev/webpack-dev-server that referenced this pull request Jul 31, 2019
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.

Websocket and /info requests go to wrong domain when using default port
6 participants