-
Notifications
You must be signed in to change notification settings - Fork 13k
fix: Trace method calls #37229
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
fix: Trace method calls #37229
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
🦋 Changeset detectedLatest commit: 7fbf328 The changes in this PR will be included in the next version bump. This PR includes changesets to release 42 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughUpdates getModifiedHttpHeaders to accept both Headers and plain objects, adding a runtime branch to normalize input. Maintains existing redaction for x-auth-token and rc_token in cookies. Adds unit tests parameterized over both input types. Adds a changeset entry for a patch release documenting the fix. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Caller
participant Func as getModifiedHttpHeaders
Note over Caller,Func: Normalize input and redact sensitive header data
Caller->>Func: getModifiedHttpHeaders(httpHeaders)
alt httpHeaders is Headers
Func->>Func: Convert via Object.fromEntries(headers)
else httpHeaders is Record<string,string>
Func->>Func: Use object directly
end
Func->>Func: Redact x-auth-token -> "[redacted]"
Func->>Func: Redact rc_token inside Cookie header
Func-->>Caller: Return modified headers object
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (3)
🧰 Additional context used🧬 Code graph analysis (1)apps/meteor/tests/unit/app/lib/server/functions/getModifiedHttpHeaders.tests.ts (1)
🪛 LanguageTool.changeset/new-eels-deliver.md[grammar] ~5-~5: There might be a mistake here. (QB_NEW_EN) [grammar] ~5-~5: There might be a mistake here. (QB_NEW_EN) ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
🔇 Additional comments (5)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #37229 +/- ##
========================================
Coverage 67.63% 67.63%
========================================
Files 3341 3341
Lines 114016 114018 +2
Branches 20667 20668 +1
========================================
+ Hits 77118 77120 +2
+ Misses 34222 34219 -3
- Partials 2676 2679 +3
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
abhinavkrin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Proposed changes (including videos or screenshots)
Enabling trace method call setting crashes the server due to how
httpHeadersis consumed.httpHeadersas plain javascript objecthttpHeadersas instance ofHeaderclass.We were not handling both cases properly which was causing the crash.
Issue(s)
fixes #36011
Steps to test or reproduce
Further comments
SUP-861
Summary by CodeRabbit