Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
📝 WalkthroughWalkthroughInjects a build-time custom user agent for Serverless Framework into AWS SDK v3 client configuration at runtime when proxy code paths are used. Applies a conditional SF_CORE_VERSION-based identifier to the client after creation; proxy and NO_PROXY logic remain unchanged. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@packages/util/src/proxy/aws.js`:
- Around line 177-183: In addProxyToAwsClient, don’t overwrite
client.config.customUserAgent; instead merge/append the Serverless token
(customUserAgent) into the existing client.config.customUserAgent while avoiding
duplicates: detect whether client.config.customUserAgent is a string or array,
normalize to an array, push the customUserAgent only if not already present, and
set client.config.customUserAgent back to the normalized form expected by the
AWS SDK; reference the addProxyToAwsClient function, the customUserAgent
variable, and client.config.customUserAgent when making the change.
|
Note Docstrings generation - SUCCESS |
Docstrings generation was requested by @czubocha. * #13279 (comment) The following files were modified: * `packages/util/src/proxy/aws.js`
|
@coderabbitai help |
ChatThere are 3 ways to chat with CodeRabbit:
CodeRabbit commands
Other keywords and placeholders
CodeRabbit configuration file (
|
Summary
serverless-framework/<version>to the User-Agent header for all AWS SDK v3 API requestsaddProxyToAwsClient()in@serverless/utilwhich wraps all AWS clients__SF_CORE_VERSION__build-time constant for the versionExample User-Agent:
Test plan
NODE_DEBUG=httpsthatserverless-framework/4.31.0appears in all AWS API requestsSLS_AWS_SDK=3and default SDK pathspackage.jsonHow to test
Expected output should include:
Related
Closes #13245
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.