-
Notifications
You must be signed in to change notification settings - Fork 89
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
feat: allow feature identification on the smithy context #1424
Conversation
packages/types/src/feature-ids.ts
Outdated
SIGV4A_SIGNING: "S"; | ||
CREDENTIALS_CODE: "e"; | ||
CREDENTIALS_HTTP: "z"; | ||
CREDENTIALS_IMDS: "0"; |
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.
some of these credentials features aren't technically Smithy, but they live in this repository as of the migration from AWS SDK.
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.
The full list can be seen in the paired PR https://github.com/aws/aws-sdk-js-v3/pull/6536/files
under a similar file types/src/feature-ids.ts
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.
as of the migration from AWS SDK
I'm not sure what that means. If there's a separate list over there, why do AWSisms need to live here?
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.
All the JS code used to be in AWS SDK. The generic or core runtime packages were moved over to smithy but it wasn't completely separated and the instance metadata provider exists in the smithy-typescript repo. So, that feature may need to be known by the Smithy list of features.
However, I think I can remove credentials imds and credentials http feature detection from smithy and do it in the SDK code. I've pushed a commit to remove these two.
Adds a typed
features
map as a subsection of the Smithy Context, which is an object that has a lifecycle corresponding to an SDK request.This map is not written to or read from in this PR, but integrations will be added to identify certain features being used. It will be read downstream in the SDK user agent middleware.
This functionality is not strictly relevant to the standalone Smithy runtime, but I am suggesting this is the least obtrusive way to implement it.
downstream: aws/aws-sdk-js-v3#6536