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

feat: allow feature identification on the smithy context #1424

Merged
merged 3 commits into from
Oct 7, 2024

Conversation

kuhe
Copy link
Contributor

@kuhe kuhe commented Oct 2, 2024

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

SIGV4A_SIGNING: "S";
CREDENTIALS_CODE: "e";
CREDENTIALS_HTTP: "z";
CREDENTIALS_IMDS: "0";
Copy link
Contributor Author

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.

Copy link
Contributor Author

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

Copy link
Contributor

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?

Copy link
Contributor Author

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.

@kuhe kuhe merged commit 84bec05 into smithy-lang:main Oct 7, 2024
11 checks passed
@kuhe kuhe deleted the feat/features branch October 7, 2024 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants