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

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

Merged
merged 13 commits into from
Jun 4, 2024

Conversation

connorjclark
Copy link
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
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
@connorjclark connorjclark merged commit be2ab51 into main Jun 4, 2024
27 checks passed
@connorjclark connorjclark deleted the lantern-rawRequest branch June 4, 2024 19:05
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