Skip to content

Add reccomendations for client context#2924

Merged
JordonPhillips merged 4 commits intomainfrom
typed-context
Feb 3, 2026
Merged

Add reccomendations for client context#2924
JordonPhillips merged 4 commits intomainfrom
typed-context

Conversation

@JordonPhillips
Copy link
Contributor

This adds guidance on implementing context in Smithy clients.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

This adds guidance on implementing context in Smithy clients.
@JordonPhillips JordonPhillips requested a review from a team as a code owner January 14, 2026 16:22
@github-actions
Copy link
Contributor

This pull request does not contain a staged changelog entry. To create one, use the ./.changes/new-change command. For example:

./.changes/new-change --pull-requests "#2924" --type feature --description "Add reccomendations for client context"

Make sure that the description is appropriate for a changelog entry and that the proper feature type is used. See ./.changes/README or run ./.changes/new-change -h for more information.

@JordonPhillips JordonPhillips requested a review from kstich January 23, 2026 12:57
Comment on lines +32 to +34
HTTP clients don't have many common [context](#typed-context) parameters, but
they should check the context for a request timeout setting and use it if that
setting's value present.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I think we're missing a word here:

use it if that setting's value present

I think "is" belongs before "present".

Comment on lines +114 to +117
Smithy clients should pass this context object to any integration hooks.
[TODO: link to interceptors documentation.] There should be at least one hook at
the beginning of the request pipeline to enable client plugins to populate the
context as soon as possible.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Saying that there "should be at least one hook at the beginning" sounds like a requirement for hooks, not a requirement for context. I think we should drop that sentence from this doc and just let the (to-be-written) interceptors doc do the talking.

@JordonPhillips JordonPhillips merged commit ffe10ae into main Feb 3, 2026
16 checks passed
@JordonPhillips JordonPhillips deleted the typed-context branch February 3, 2026 15:55
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