From c45dc122a1fa7a7067d11ec1bffa01576dd94db3 Mon Sep 17 00:00:00 2001 From: Landon James Date: Thu, 16 May 2024 13:10:48 -0700 Subject: [PATCH] Updating docs for app_name on ConfigLoader (#3645) ## Motivation and Context Docs indicating that the `AppName` can be loaded from an environment variable or profile key were buried in the default provider and would be hard to find for users. ## Description This change adds documentation to the `app_name` method on `ConfigLoader` that makes the options for loading the `AppName` more explicit. ## Testing Ran `cargo doc` to ensure the docs were generated correctly ## Checklist - [x] I have updated `CHANGELOG.next.toml` if I made changes to the smithy-rs codegen or runtime crates ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ --------- Co-authored-by: ysaito1001 --- CHANGELOG.next.toml | 6 +++++- aws/rust-runtime/aws-config/Cargo.toml | 2 +- aws/rust-runtime/aws-config/src/lib.rs | 9 ++++++++- tools/ci-build/changelogger/smithy-rs-maintainers.txt | 1 + 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.next.toml b/CHANGELOG.next.toml index 8efe01ab84..22094149df 100644 --- a/CHANGELOG.next.toml +++ b/CHANGELOG.next.toml @@ -36,4 +36,8 @@ references = ["aws-sdk-rust#1079"] meta = { "breaking" = false, "bug" = true, "tada" = false } author = "rcoh" - +[[aws-sdk-rust]] +message = "Updating the documentation for the `app_name` method on `ConfigLoader` to indicate the order of precedence for the sources of the `AppName`." +references = ["smithy-rs#3645"] +meta = { "breaking" = false, "bug" = false, "tada" = false } +author = "landonxjames" diff --git a/aws/rust-runtime/aws-config/Cargo.toml b/aws/rust-runtime/aws-config/Cargo.toml index 3be6ffadfd..e9be8457d8 100644 --- a/aws/rust-runtime/aws-config/Cargo.toml +++ b/aws/rust-runtime/aws-config/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aws-config" -version = "1.4.0" +version = "1.4.1" authors = [ "AWS Rust SDK Team ", "Russell Cohen ", diff --git a/aws/rust-runtime/aws-config/src/lib.rs b/aws/rust-runtime/aws-config/src/lib.rs index 7cbbdfe719..8d7adc10bf 100644 --- a/aws/rust-runtime/aws-config/src/lib.rs +++ b/aws/rust-runtime/aws-config/src/lib.rs @@ -532,9 +532,16 @@ mod loader { /// Override the name of the app used to build [`SdkConfig`]. /// - /// This _optional_ name is used to identify the application in the user agent that + /// This _optional_ name is used to identify the application in the user agent header that /// gets sent along with requests. /// + /// The app name is selected from an ordered list of sources: + /// 1. This override. + /// 2. The value of the `AWS_SDK_UA_APP_ID` environment variable. + /// 3. Profile files from the key `sdk_ua_app_id` + /// + /// If none of those sources are set the value is `None` and it is not added to the user agent header. + /// /// # Examples /// ```no_run /// # async fn create_config() { diff --git a/tools/ci-build/changelogger/smithy-rs-maintainers.txt b/tools/ci-build/changelogger/smithy-rs-maintainers.txt index 7143fc996f..4935983a8e 100644 --- a/tools/ci-build/changelogger/smithy-rs-maintainers.txt +++ b/tools/ci-build/changelogger/smithy-rs-maintainers.txt @@ -9,3 +9,4 @@ drganjoo rschmitt rhernandez35 aajtodd +landonxjames