-
Notifications
You must be signed in to change notification settings - Fork 12
Remove auditUserId and handle undefined cache config #229
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Pull request overview
This PR removes the deprecated auditUserId functionality and adds defensive handling for undefined cache duration configuration values. The changes prevent potential issues when cache configuration properties are missing while simplifying the metadata handling logic.
- Removed
auditUserIdmetadata from S3 upload operations - Added null checks for cache duration configurations (htmlCacheDuration, jsCacheDuration, cssCacheDuration, imageCacheDuration)
- Refactored
_getCacheControlConfigmethod to use explicit null returns when cache durations are undefined
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| lib/remote-storage.js | Removed auditUserId metadata handling and refactored cache control logic to return null when cache duration configs are undefined |
| test/lib/remote-storage.test.js | Added tests for undefined cache duration scenarios and updated existing test to reflect removal of auditUserId metadata |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: