Skip to content

Commit

Permalink
Merge branch 'main' into into_make_service_with_connect_info
Browse files Browse the repository at this point in the history
  • Loading branch information
82marbag authored Nov 14, 2022
2 parents f19a20f + 7477cfb commit ca0160f
Show file tree
Hide file tree
Showing 118 changed files with 3,997 additions and 1,798 deletions.
11 changes: 6 additions & 5 deletions .github/actions/docker-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ inputs:
runs:
using: composite
steps:
- uses: actions/cache@v2
- uses: actions/cache@v3
name: Gradle Cache
with:
path: |
Expand All @@ -24,11 +24,12 @@ runs:
key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/caches/**/*', 'gradle/wrapper/**/*') }}
restore-keys: |
${{ runner.os }}-gradle-
# Pinned to the commit hash of v1.3.0
- uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641
# Pinned to the commit hash of v2.1.0
- uses: Swatinem/rust-cache@b894d59a8d236e2979b247b80dac8d053ab340dd
with:
sharedKey: ${{ runner.os }}-${{ github.job }}
target-dir: ./smithy-rs-target
shared-key: ${{ runner.os }}-${{ github.job }}
workspaces: |
. smithy-rs-target
- name: Download all artifacts
uses: ./smithy-rs/.github/actions/download-all-artifacts
- name: Prepare build image
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Build image
run: |
IMAGE_TAG="$(./tools/ci-build/tools-hash)"
Expand All @@ -38,7 +38,7 @@ jobs:
-t "${{ env.ecr_repository }}:main" \
.
- name: Acquire credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v1-node16
with:
role-to-assume: ${{ secrets.SMITHY_RS_PUBLIC_ECR_PUSH_ROLE_ARN }}
role-session-name: GitHubActions
Expand Down
66 changes: 29 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
workflow_call:

env:
rust_version: 1.62.0
rust_version: 1.62.1
rust_toolchain_components: clippy,rustfmt

jobs:
Expand Down Expand Up @@ -121,16 +121,17 @@ jobs:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v3
# Pinned to the commit hash of v1.3.0
- uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641
# Pinned to the commit hash of v2.1.0
- uses: Swatinem/rust-cache@b894d59a8d236e2979b247b80dac8d053ab340dd
with:
sharedKey: ${{ runner.os }}-${{ env.rust_version }}-${{ github.job }}
target-dir: ./target
- uses: actions-rs/toolchain@v1
shared-key: ${{ runner.os }}-${{ env.rust_version }}-${{ github.job }}
workspaces: |
.
tools
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.rust_version }}
components: ${{ env.rust_toolchain_components }}
default: true
- name: Run tests
shell: bash
run: |
Expand Down Expand Up @@ -181,19 +182,19 @@ jobs:
CROSS_CONFIG: Cross.toml
steps:
- name: Checkout
uses: actions/checkout@v1
# Pinned to the commit hash of v1.3.0
- uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641
uses: actions/checkout@v3
# Pinned to the commit hash of v2.1.0
- uses: Swatinem/rust-cache@b894d59a8d236e2979b247b80dac8d053ab340dd
with:
sharedKey: ${{ runner.os }}-${{ env.rust_version }}-${{ github.job }}-${{ matrix.target }}
target-dir: ./target
- uses: actions-rs/toolchain@v1
shared-key: ${{ runner.os }}-${{ env.rust_version }}-${{ github.job }}-${{ matrix.target }}
workspaces: |
.
tools
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.rust_version }}
components: ${{ env.rust_toolchain_components }}
profile: minimal
override: true
target: ${{ matrix.target }}
targets: ${{ matrix.target }}
- name: Sets OpenSSL env vars on i686
run: |
echo "OPENSSL_LIB_DIR=/usr/lib/i386-linux-gnu" >> $GITHUB_ENV
Expand All @@ -208,6 +209,8 @@ jobs:
# configure and cross compile openssl locally on ppc and ppc64 to be able to run aws-smithy-client tests.
# since cross dropped support for openssl, we use the build script from version 0.16.
run: |
cargo install cross --locked --version 0.2.4
cat > Cross.toml << EOF
[target.i686-unknown-linux-gnu]
pre-build = ["dpkg --add-architecture i386", "apt-get update && apt-get install --assume-yes pkg-config:i386 libssl-dev:i386"]
Expand All @@ -226,29 +229,17 @@ jobs:
passthrough = ["OPENSSL_DIR"]
EOF
- name: Build Smithy-rs rust-runtime crates
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: -vv --target ${{ matrix.target }} --manifest-path "rust-runtime/Cargo.toml" ${{ matrix.build_smithy_rs_exclude }} --workspace ${{ matrix.build_smithy_rs_features }}
shell: bash
run: cross build -vv --target ${{ matrix.target }} --manifest-path "rust-runtime/Cargo.toml" ${{ matrix.build_smithy_rs_exclude }} --workspace ${{ matrix.build_smithy_rs_features }}
- name: Build AWS rust-runtime crates
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: -vv --target ${{ matrix.target }} --manifest-path "aws/rust-runtime/Cargo.toml" ${{ matrix.build_aws_exclude }} --workspace
shell: bash
run: cross build -vv --target ${{ matrix.target }} --manifest-path "aws/rust-runtime/Cargo.toml" ${{ matrix.build_aws_exclude }} --workspace
- name: Test Smithy-rs rust-runtime crates
uses: actions-rs/cargo@v1
with:
use-cross: true
command: test
args: --target ${{ matrix.target }} --manifest-path "rust-runtime/Cargo.toml" ${{ matrix.test_smithy_rs_exclude }} --workspace ${{ matrix.test_smithy_rs_features }}
shell: bash
run: cross test --target ${{ matrix.target }} --manifest-path "rust-runtime/Cargo.toml" ${{ matrix.test_smithy_rs_exclude }} --workspace ${{ matrix.test_smithy_rs_features }}
- name: Test AWS rust-runtime crates
uses: actions-rs/cargo@v1
with:
use-cross: true
command: test
args: --target ${{ matrix.target }} --manifest-path "aws/rust-runtime/Cargo.toml" ${{ matrix.test_aws_exclude }} --workspace
shell: bash
run: cross test --target ${{ matrix.target }} --manifest-path "aws/rust-runtime/Cargo.toml" ${{ matrix.test_aws_exclude }} --workspace

# This job is split out from the rest since it is not required to pass for merge
check-sdk-examples:
Expand Down Expand Up @@ -280,6 +271,7 @@ jobs:
name: Matrix Success
steps:
- name: Verify jobs succeeded
uses: re-actors/alls-green@3a2de129f0713010a71314c74e33c0e3ef90e696
# Pinned to commit hash of v1.2.2
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe
with:
jobs: ${{ toJSON(needs) }}
6 changes: 2 additions & 4 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: dtolnay/rust-toolchain@stable
- name: Generate docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual-pull-request-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- name: Get PR info
id: get-pr-info
uses: actions/github-script@v5
uses: actions/github-script@v6
with:
script: |
const response = await github.rest.pulls.get({
Expand Down
25 changes: 13 additions & 12 deletions .github/workflows/pull-request-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ concurrency:

env:
java_version: 11
rust_version: 1.62.0
rust_version: 1.62.1
rust_toolchain_components: clippy,rustfmt
apt_dependencies: libssl-dev gnuplot jq

Expand All @@ -46,15 +46,15 @@ jobs:
outputs:
bot-message: ${{ steps.generate-diff.outputs.bot-message }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
path: smithy-rs
- name: Generate diff
uses: ./smithy-rs/.github/actions/docker-build
with:
action: generate-codegen-diff
action-arguments: ${{ inputs.base_revision }}
- uses: aws-actions/configure-aws-credentials@v1
- uses: aws-actions/configure-aws-credentials@v1-node16
name: Acquire credentials for uploading to S3
with:
role-to-assume: ${{ secrets.SMITHY_RS_PULL_REQUEST_CDN_ROLE_ARN }}
Expand All @@ -80,8 +80,8 @@ jobs:
outputs:
bot-message: ${{ steps.generate-preview.outputs.bot-message }}
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v3
- uses: actions/cache@v3
name: Gradle Cache
with:
path: |
Expand All @@ -92,13 +92,14 @@ jobs:
${{ runner.os }}-gradle-
# JDK is needed to generate code
- name: Set up JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
distribution: corretto
java-package: jdk
java-version: ${{ env.java_version }}
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.rust_version }}
default: true
- name: Generate doc preview
id: generate-preview
# Only generate three of the smallest services since the doc build can be very large. STS and SSO must be
Expand All @@ -122,8 +123,8 @@ jobs:
popd
./tools/generate-doc-preview-index.sh ${{ inputs.base_revision }}
echo '::set-output name=bot-message::A [new doc preview](https://d2luzm2xt3nokh.cloudfront.net/docs/'${{ inputs.head_revision }}'/index.html) is ready to view.'
- uses: aws-actions/configure-aws-credentials@v1
echo 'bot-message=A [new doc preview](https://d2luzm2xt3nokh.cloudfront.net/docs/'${{ inputs.head_revision }}'/index.html) is ready to view.' >> "${GITHUB_OUTPUT}"
- uses: aws-actions/configure-aws-credentials@v1-node16
name: Acquire credentials for uploading to S3
with:
role-to-assume: ${{ secrets.SMITHY_RS_PULL_REQUEST_CDN_ROLE_ARN }}
Expand Down Expand Up @@ -153,9 +154,9 @@ jobs:
id: bot-messages
run: |
set -eux
echo ::set-output name=codegen-diff::"$(cat ./bot-message-codegen-diff)"
echo "codegen-diff=$(cat ./bot-message-codegen-diff)" >> "${GITHUB_OUTPUT}"
- name: Post bot comment
uses: actions/github-script@v5
uses: actions/github-script@v6
with:
script: |
await github.rest.issues.createComment({
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ concurrency:
cancel-in-progress: true

env:
rust_version: 1.62.0
rust_version: 1.62.1

name: Release smithy-rs
run-name: ${{ github.workflow }} - ${{ inputs.dry_run && 'Dry run' || 'Production run' }}
Expand Down Expand Up @@ -73,10 +73,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.rust_version }}
default: true
- name: Checkout smithy-rs
uses: actions/checkout@v3
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/update-sdk-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ jobs:
path: aws-sdk-rust
token: ${{ secrets.RELEASE_AUTOMATION_BOT_PAT }}
- name: Set up JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
distribution: corretto
java-package: jdk
java-version: 11
# Rust is only used to `rustfmt` the generated code; doesn't need to match MSRV
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
uses: dtolnay/rust-toolchain@stable
- name: Delete old SDK
run: |
- name: Generate a fresh SDK
Expand Down
37 changes: 37 additions & 0 deletions CHANGELOG.next.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
# meta = { "breaking" = false, "tada" = false, "bug" = false, "target" = "client | server | all"}
# author = "rcoh"

[[smithy-rs]]
message = "Upgrade Rust MSRV to 1.62.1"
references = ["smithy-rs#0"]
meta = { "breaking" = true, "tada" = true, "bug" = false, "target" = "all" }
author = "jjantdev"

[[smithy-rs]]
message = "Support Sigv4 signature generation on PowerPC 32 and 64 bit. This architecture cannot compile `ring`, so the implementation has been updated to rely on `hamc` + `sha2` to achive the same result with broader platform compatibility and higher performance. We also updated the CI which is now running as many tests as possible against i686 and PowerPC 32 and 64 bit."
references = ["smithy-rs#1847"]
Expand Down Expand Up @@ -79,3 +85,34 @@ message = "Fix cargo audit issue on criterion."
references = ["smithy-rs#1923"]
meta = { "breaking" = false, "tada" = false, "bug" = false }
author = "ysaito1001"

[[aws-sdk-rust]]
message = "Ability to add an inline policy or a list of policy ARNs to the `AssumeRoleProvider` builder."
references = ["aws-sdk-rust#641", "smithy-rs#1892"]
meta = { "breaking" = false, "tada" = true, "bug" = false }
author = "albe-rosado"

[[aws-sdk-rust]]
message = "Removed re-export of `aws_smithy_client::retry::Config` from the `middleware` module."
references = ["smithy-rs#1935"]
meta = { "breaking" = true, "tada" = false, "bug" = false }
author = "jdisanti"

[[smithy-rs]]
message = "Upgrade to Smithy 1.26.2"
references = ["smithy-rs#1972"]
meta = { "breaking" = false, "tada" = false, "bug" = false }
author = "rcoh"

[[smithy-rs]]
message = "Several breaking changes have been made to errors. See [the upgrade guide](https://github.com/awslabs/smithy-rs/issues/1950) for more information."
references = ["smithy-rs#1926", "smithy-rs#1819"]
meta = { "breaking" = true, "tada" = false, "bug" = false, "target" = "client" }
author = "jdisanti"

[[aws-sdk-rust]]
message = "Several breaking changes have been made to errors. See [the upgrade guide](https://github.com/awslabs/aws-sdk-rust/issues/657) for more information."
references = ["smithy-rs#1926", "smithy-rs#1819"]
meta = { "breaking" = true, "tada" = false, "bug" = false }
author = "jdisanti"

1 change: 1 addition & 0 deletions aws/rust-runtime/aws-config/external-types.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# require manual version bumping every time an automated version bump
# to the exposed SDK crates happens.
allowed_external_types = [
"aws_sdk_sts::model::PolicyDescriptorType",
"aws_smithy_async::rt::sleep::AsyncSleep",
"aws_smithy_client::bounds::SmithyConnector",
"aws_smithy_client::erase::DynConnector",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl DefaultCredentialsChain {
async fn credentials(&self) -> credentials::Result {
self.0
.provide_credentials()
.instrument(tracing::info_span!("provide_credentials", provider = %"default_chain"))
.instrument(tracing::debug_span!("provide_credentials", provider = %"default_chain"))
.await
}
}
Expand Down
3 changes: 2 additions & 1 deletion aws/rust-runtime/aws-config/src/ecs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ use std::net::IpAddr;

use aws_smithy_client::erase::boxclone::BoxCloneService;
use aws_smithy_http::endpoint::Endpoint;
use aws_smithy_types::error::display::DisplayErrorContext;
use aws_types::credentials;
use aws_types::credentials::{future, CredentialsError, ProvideCredentials};
use http::uri::{InvalidUri, Scheme};
Expand Down Expand Up @@ -182,7 +183,7 @@ impl Provider {
let mut relative_uri = match relative_uri.parse::<Uri>() {
Ok(uri) => uri,
Err(invalid_uri) => {
tracing::warn!(uri = ?invalid_uri, "invalid URI loaded from environment");
tracing::warn!(uri = %DisplayErrorContext(&invalid_uri), "invalid URI loaded from environment");
return Err(EcsConfigurationErr::InvalidRelativeUri {
err: invalid_uri,
uri: relative_uri,
Expand Down
Loading

0 comments on commit ca0160f

Please sign in to comment.