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

[now dev] Wait for blocking builds to complete before handling requests #2562

Merged
merged 7 commits into from Jul 23, 2019

Conversation

TooTallNate
Copy link
Member

After the now dev server has already booted, if you delete a build match that previously required a build at bootup time (i.e. @now/next) from the builds array in now.json (i.e. change the builder to @now/static), and then change it back to @now/next, then previously the build would never execute.

With this change, the blocking build occurs as expected, and any HTTP requests that occur are blocked until that build has completed.

@codecov-io
Copy link

codecov-io commented Jul 17, 2019

Codecov Report

Merging #2562 into canary will increase coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           canary   #2562      +/-   ##
=========================================
+ Coverage    7.95%   7.95%   +<.01%     
=========================================
  Files         258     258              
  Lines        9383    9401      +18     
  Branches     1063    1068       +5     
=========================================
+ Hits          746     748       +2     
- Misses       8588    8604      +16     
  Partials       49      49
Impacted Files Coverage Δ
src/util/dev/server.ts 11.28% <0%> (-0.11%) ⬇️
src/util/metrics.ts 61.53% <0%> (-6.65%) ⬇️

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 c413cc7...c1f2cff. Read the comment docs.

After the `now dev` server has already booted, if you delete a build
match that previously required a build at bootup time (i.e. `@now/next`)
from the `builds` array in `now.json` (i.e. change the builder to
`@now/static`), and then change it back to `@now/next`, then previously
the build would never execute.

With this change, the blocking build occurs as expected, and any HTTP
requests that occur are blocked until that build has completed.
@TooTallNate TooTallNate force-pushed the update/now-dev-blocking-builds branch from 6e80797 to 7d1b727 Compare July 22, 2019 23:33
@TooTallNate TooTallNate merged commit 3f18d24 into canary Jul 23, 2019
@TooTallNate TooTallNate deleted the update/now-dev-blocking-builds branch July 23, 2019 21:58
TooTallNate added a commit that referenced this pull request Jul 24, 2019
PR #2562 caused an issue with blocking builds at bootup being built
twice, which is problematic when i.e. running `yarn` simultaneously
on the same directory causing cache corruption issues.
TooTallNate added a commit that referenced this pull request Jul 24, 2019
PR #2562 caused an issue with blocking builds at bootup being built
twice, which is problematic when i.e. running `yarn` simultaneously
on the same directory causing cache corruption issues.
AndyBitz pushed a commit that referenced this pull request Jul 25, 2019
…ts (#2562)

* [now dev] Wait for blocking builds to complete before handling requests

After the `now dev` server has already booted, if you delete a build
match that previously required a build at bootup time (i.e. `@now/next`)
from the `builds` array in `now.json` (i.e. change the builder to
`@now/static`), and then change it back to `@now/next`, then previously
the build would never execute.

With this change, the blocking build occurs as expected, and any HTTP
requests that occur are blocked until that build has completed.

* Prettier

* Better diff

* Add test
AndyBitz pushed a commit that referenced this pull request Jul 25, 2019
PR #2562 caused an issue with blocking builds at bootup being built
twice, which is problematic when i.e. running `yarn` simultaneously
on the same directory causing cache corruption issues.
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.

None yet

4 participants