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

add waitUntil to the context type #1465

Merged
merged 11 commits into from
Jul 25, 2024
Merged

add waitUntil to the context type #1465

merged 11 commits into from
Jul 25, 2024

Conversation

EmrysMyrddin
Copy link
Collaborator

Description

Server Adapter is always providing a waitUntil method in the serverContext, but this is not indicated in the types nor documented.

This PR fixes the type.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Copy link
Contributor

github-actions bot commented Jul 17, 2024

@benchmarks/node-fetch results (noConsumeBody)

   ✓ active_handles.................: avg=139.129434 min=52     med=139     max=197      p(90)=161     p(95)=167    
     data_received..................: 23 MB  779 kB/s
     data_sent......................: 15 MB  504 kB/s
     http_req_blocked...............: avg=4.53µs     min=671ns  med=1.54µs  max=7.63ms   p(90)=2.14µs  p(95)=2.62µs 
     http_req_connecting............: avg=2.37µs     min=0s     med=0s      max=7.05ms   p(90)=0s      p(95)=0s     
     http_req_duration..............: avg=19.56ms    min=1.04ms med=19ms    max=802.9ms  p(90)=25.5ms  p(95)=27.24ms
       { expected_response:true }...: avg=19.56ms    min=1.04ms med=19ms    max=802.9ms  p(90)=25.5ms  p(95)=27.24ms
     http_req_failed................: 0.00%  ✓ 0           ✗ 152695
     http_req_receiving.............: avg=39.63µs    min=9.52µs med=26.95µs max=24.13ms  p(90)=43.08µs p(95)=52.94µs
     http_req_sending...............: avg=12.92µs    min=3.47µs med=7.92µs  max=28.16ms  p(90)=11.28µs p(95)=16.71µs
     http_req_tls_handshaking.......: avg=0s         min=0s     med=0s      max=0s       p(90)=0s      p(95)=0s     
     http_req_waiting...............: avg=19.51ms    min=1.02ms med=18.95ms max=802.84ms p(90)=25.45ms p(95)=27.16ms
     http_reqs......................: 152695 5089.038152/s
     iteration_duration.............: avg=39.26ms    min=10.2ms med=38.31ms max=828.79ms p(90)=42.63ms p(95)=48.47ms
     iterations.....................: 76317  2543.502568/s
     vus............................: 100    min=100       max=100 
     vus_max........................: 100    min=100       max=100 

Copy link
Contributor

github-actions bot commented Jul 17, 2024

@benchmarks/server results (native)

     ✓ no-errors
     ✓ expected-result

   ✓ checks.........................: 100.00% ✓ 231080     ✗ 0     
     data_received..................: 23 MB   774 kB/s
     data_sent......................: 9.2 MB  308 kB/s
     http_req_blocked...............: avg=1.45µs   min=931ns    med=1.24µs   max=576.49µs p(90)=1.93µs   p(95)=2.11µs  
     http_req_connecting............: avg=4ns      min=0s       med=0s       max=506.72µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=198.16µs min=150.55µs med=186.6µs  max=31.81ms  p(90)=211.86µs p(95)=221.28µs
       { expected_response:true }...: avg=198.16µs min=150.55µs med=186.6µs  max=31.81ms  p(90)=211.86µs p(95)=221.28µs
     http_req_failed................: 0.00%   ✓ 0          ✗ 115540
     http_req_receiving.............: avg=25.45µs  min=14.38µs  med=24.1µs   max=4.29ms   p(90)=30.97µs  p(95)=32.98µs 
     http_req_sending...............: avg=6.31µs   min=4.15µs   med=5.52µs   max=522.4µs  p(90)=8.19µs   p(95)=8.8µs   
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=166.38µs min=123.79µs med=154.56µs max=31.72ms  p(90)=176.71µs p(95)=185.3µs 
     http_reqs......................: 115540  3851.17311/s
     iteration_duration.............: avg=255.33µs min=195.8µs  med=242.71µs max=31.95ms  p(90)=271.6µs  p(95)=283.66µs
     iterations.....................: 115540  3851.17311/s
     vus............................: 1       min=1        max=1   
     vus_max........................: 1       min=1        max=1   

Copy link
Contributor

github-actions bot commented Jul 17, 2024

@benchmarks/server results (ponyfill)

     ✓ no-errors
     ✓ expected-result

   ✓ checks.........................: 100.00% ✓ 293842      ✗ 0     
     data_received..................: 29 MB   965 kB/s
     data_sent......................: 12 MB   392 kB/s
     http_req_blocked...............: avg=1.42µs   min=872ns    med=1.22µs   max=266.39µs p(90)=1.91µs   p(95)=2.09µs  
     http_req_connecting............: avg=0ns      min=0s       med=0s       max=119.96µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=142.25µs min=96.56µs  med=136.54µs max=7.39ms   p(90)=157.92µs p(95)=164.5µs 
       { expected_response:true }...: avg=142.25µs min=96.56µs  med=136.54µs max=7.39ms   p(90)=157.92µs p(95)=164.5µs 
     http_req_failed................: 0.00%   ✓ 0           ✗ 146921
     http_req_receiving.............: avg=24.72µs  min=12.41µs  med=23.62µs  max=359.39µs p(90)=30.6µs   p(95)=32.59µs 
     http_req_sending...............: avg=6.42µs   min=4.15µs   med=5.72µs   max=298.2µs  p(90)=8.26µs   p(95)=8.93µs  
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=111.1µs  min=71.19µs  med=105.04µs max=7.33ms   p(90)=123.46µs p(95)=128.73µs
     http_reqs......................: 146921  4896.402588/s
     iteration_duration.............: avg=199.76µs min=139.85µs med=193.38µs max=8.3ms    p(90)=217.62µs p(95)=226.25µs
     iterations.....................: 146921  4896.402588/s
     vus............................: 1       min=1         max=1   
     vus_max........................: 1       min=1         max=1   

Copy link
Contributor

github-actions bot commented Jul 17, 2024

@benchmarks/node-fetch results (consumeBody)

   ✓ active_handles.................: avg=140.018362 min=103    med=140     max=198      p(90)=161     p(95)=167    
     data_received..................: 24 MB  803 kB/s
     data_sent......................: 15 MB  514 kB/s
     http_req_blocked...............: avg=3.89µs     min=621ns  med=1.38µs  max=13.1ms   p(90)=1.98µs  p(95)=2.28µs 
     http_req_connecting............: avg=1.91µs     min=0s     med=0s      max=6.8ms    p(90)=0s      p(95)=0s     
     http_req_duration..............: avg=18.99ms    min=2.6ms  med=18.53ms max=215.24ms p(90)=24.7ms  p(95)=27.3ms 
       { expected_response:true }...: avg=18.99ms    min=2.6ms  med=18.53ms max=215.24ms p(90)=24.7ms  p(95)=27.3ms 
     http_req_failed................: 0.00%  ✓ 0           ✗ 157414
     http_req_receiving.............: avg=35.19µs    min=8.72µs med=23.7µs  max=30.92ms  p(90)=39.03µs p(95)=47.55µs
     http_req_sending...............: avg=11.65µs    min=3.29µs med=6.59µs  max=32.33ms  p(90)=9.9µs   p(95)=15.32µs
     http_req_tls_handshaking.......: avg=0s         min=0s     med=0s      max=0s       p(90)=0s      p(95)=0s     
     http_req_waiting...............: avg=18.94ms    min=2.57ms med=18.49ms max=215.16ms p(90)=24.65ms p(95)=27.21ms
     http_reqs......................: 157414 5245.736223/s
     iteration_duration.............: avg=38.09ms    min=9.88ms med=36.85ms max=238.57ms p(90)=44.31ms p(95)=48.27ms
     iterations.....................: 78695  2622.468218/s
     vus............................: 100    min=100       max=100 
     vus_max........................: 100    min=100       max=100 

Copy link
Contributor

github-actions bot commented Jul 17, 2024

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@whatwg-node/server 0.9.40-alpha-20240725152057-1c7056ab66ca574fa0a239c120831bb05696ac10 npm ↗︎ unpkg ↗︎


## Breaking Changes

The function `handleNodeRequest` has been removed. Please use `handleNodeRequestAndResponse` instead.
Copy link
Owner

Choose a reason for hiding this comment

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

I am afraid this will be a breaking change on Yoga etc.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah... That could be a problem... Do you think I should put it back ?

Copy link
Owner

Choose a reason for hiding this comment

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

Let's put it back until we cut a major release in Yoga.

@ardatan ardatan merged commit 9f6546f into master Jul 25, 2024
21 of 22 checks passed
@ardatan ardatan deleted the wait-until-type branch July 25, 2024 15:19
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.

2 participants