Skip to content

core(lantern): rename NetworkRequest record to rawRequest#16037

Merged
connorjclark merged 13 commits intomainfrom
lantern-rawRequest
Jun 4, 2024
Merged

core(lantern): rename NetworkRequest record to rawRequest#16037
connorjclark merged 13 commits intomainfrom
lantern-rawRequest

Conversation

@connorjclark
Copy link
Copy Markdown
Collaborator

record (the impl-specific source of truth) and request (aka LanternRequest) are too close to each other, and that was causing bugs, and the terms were not used consistently inside Lantern, so this PR fixes all that. Now:

  • request is used everywhere for LanternRequest
  • replace record with rawRequest as a property accessible on a LanternRequest and NetworkNode

ref #15841

@connorjclark connorjclark requested a review from a team as a code owner June 4, 2024 17:40
@connorjclark connorjclark requested review from adamraine and removed request for a team June 4, 2024 17:40
.reduce((map, node) => map.set(node.record, node), new Map());
const originalNodesByRequest = Array.from(simulationBeforeChanges.nodeTimings.keys())
// @ts-expect-error we don't care if all nodes without a request collect on `undefined`
.reduce((map, node) => map.set(node.request, node), new Map());
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

rawRequest is not necessarily unique (well it may be, but let's not require it. how redirects are handled may not adhere to this constraint atm). so just use request as a key.

@connorjclark connorjclark changed the title wip core(lantern): rename NetworkRequest record to rawRequest Jun 4, 2024
Base automatically changed from more-lantern-trace to main June 4, 2024 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants