Skip to content

chore(server): rewrite resolveHTTPResponse with Fetch - #5676

Closed
KATT wants to merge 37 commits into
nextfrom
04-26-resolveResponse
Closed

KATT wants to merge 37 commits into
nextfrom
04-26-resolveResponse

Conversation

@KATT

@KATT KATT commented Apr 26, 2024 •

Copy link
Copy Markdown
Member

Don't review yet: we'll merge #5665 first
This branch is superseded by #5681

Closes #1853

🎯 Changes

Rewrites our resolve HTTP response function so it takes a Response and outputs a Request

Each adapter is responsible of converting their internal request-representation to a Response and handle a Response-response

βœ… Checklist

  • I have followed the steps listed in the Contributing guide.
  • If necessary, I have added documentation related to the changes made.
  • I have added or updated the tests related to the changes made.

@vercel

vercel Bot commented Apr 26, 2024 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
next-prisma-starter βœ… Ready (Inspect) Visit Preview Apr 27, 2024 10:31am
og-image βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Apr 27, 2024 10:31am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
www ⬜️ Ignored (Inspect) Visit Preview Apr 27, 2024 10:31am

});
}

export function getURLFromEvent(event: APIGatewayEvent): URL {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No idea if this works for the AWS adapter "for real" -- need to source someone deploying on AWS

@github-actions

github-actions Bot commented Apr 26, 2024 •

Copy link
Copy Markdown
Contributor

Diagnostics Comparison

Details

Numbers

Metric PR next
Files 794 795 (πŸ”½πŸŸ’ -1)
Lines of Library 40,640 40,640 (βž– 0)
Lines of Definitions 118,052 118,090 (πŸ”½πŸŸ’ -38)
Lines of TypeScript 4,967 4,967 (βž– 0)
Lines of JavaScript 0 0 (βž– 0)
Lines of JSON 0 0 (βž– 0)
Lines of Other 0 0 (βž– 0)
Identifiers 174,890 174,965 (πŸ”½πŸŸ’ -75)
Symbols 108,994 109,021 (πŸ”½πŸŸ’ -27)
Types 89 89 (βž– 0)
Instantiations 0 0 (βž– 0)
Memory used 175,712 175,936 (πŸ”½πŸŸ’ -224)
Assignability cache size 0 0 (βž– 0)
Identity cache size 0 0 (βž– 0)
Subtype cache size 0 0 (βž– 0)
Strict subtype cache size 0 0 (βž– 0)

Timings and averages

Metric PR next
max (s) 4.522 4.498 (πŸ”Ί 0.02)
min (s) 4.522 4.498 (πŸ”Ί 0.02)
avg (s) 4.522 4.498 (πŸ”Ί 0.02)
median (s) 4.522 4.498 (πŸ”Ί 0.02)
length 1 1 (βž– 0)
unstable timings

Unstable

Timings are not reliable in here

Metric PR next
I/O Read time 0.04 0.04 (βž– 0)
Parse time 0.72 0.72 (βž– 0)
ResolveTypeReference time 0.03 0.03 (βž– 0)
ResolveModule time 0.11 0.12 (πŸ”½πŸŸ’ -0.01)
ResolveLibrary time 0.02 0.02 (βž– 0)
Program time 1.06 1.07 (πŸ”½πŸŸ’ -0.01)
Bind time 0.41 0.44 (πŸ”½πŸŸ’ -0.03)
Total time 1.47 1.51 (πŸ”½πŸŸ’ -0.04)

@juliusmarminge

Copy link
Copy Markdown
Member

this seems to contain all the content handler stuff too? did you mean to target Nick's PR as a base? Unsure what to review..

@Nick-Lucas

Copy link
Copy Markdown
Contributor

this seems to contain all the content handler stuff too? did you mean to target Nick's PR as a base? Unsure what to review..

I guess the target could be changed, but I think the idea is this is the next stage on top of that work, and hopefully we're about to re-merge now that I've fixed the batching issue - albeit there's now an issue brought on by some lockfile changes πŸ˜”

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been locked because we are very unlikely to see comments on closed issues. If you think, this PR is still necessary, create a new one with the same branch. Thank you.

This branch was successfully deployed

5 active (1 outdated) deployments
Preview – todomvc β€” 12c618af Deployed Apr 27, 2024 by vercel[bot]
Preview – trpc-next-app-dir β€” 12c618af Deployed Apr 27, 2024 by vercel[bot]
Preview – og-image β€” 12c618af Deployed Apr 27, 2024 by vercel[bot]
Preview – next-prisma-starter β€” 12c618af Deployed Apr 27, 2024 by vercel[bot]
Preview – www β€” 624f6c6e Deployed Apr 27, 2024 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

🚧 wip work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

update request handling in resolveHttpResponse to follow Fetch API

4 participants