Skip to content

Commit

Permalink
Merge branch 'main' into clean-builder-types
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeMathWalker authored Oct 25, 2022
2 parents a17c083 + 15c80de commit cc78a64
Show file tree
Hide file tree
Showing 441 changed files with 10,022 additions and 9,569 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
[*.{kt,kts}]
ij_kotlin_allow_trailing_comma = true
ij_kotlin_allow_trailing_comma_on_call_site = true
ij_java_use_single_class_imports = true
ij_groovy_use_single_class_imports = true
ij_kotlin_name_count_to_use_star_import = 100
ij_kotlin_name_count_to_use_star_import_for_members = 100
indent_size = 4
indent_style = space
insert_final_newline = true
Expand Down
67 changes: 66 additions & 1 deletion .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.61.0
rust_version: 1.62.0
rust_toolchain_components: clippy,rustfmt

jobs:
Expand Down Expand Up @@ -62,6 +62,7 @@ jobs:
- action: check-aws-sdk-adhoc-tests
- action: check-client-codegen-integration-tests
- action: check-client-codegen-unit-tests
- action: check-core-codegen-unit-tests
- action: check-rust-runtimes
- action: check-sdk-codegen-unit-tests
- action: check-server-codegen-integration-tests
Expand Down Expand Up @@ -142,6 +143,69 @@ jobs:
popd &>/dev/null
done
# We make sure that Smithy-rs can be compiled on platforms that are not natively supported by GitHub actions.
# We do not run tests on those platforms (yet) because it'd require a more complicated setup involving architecture
# emulation via QEMU, likely to cause a significant degradation on CI completion time.
test-exotic-platform-support:
name: Exotic platform support
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- target: i686-unknown-linux-gnu
non_aws_features: --all-features
aws_excludes: ''
# We only test `native-tls` here because `rustls` depends on `ring` which in turn does not support powerpc
# as a target platform (see https://github.com/briansmith/ring/issues/389)
# We also exclude all first-party crates that have a non-optional dependency on `ring`.
- target: powerpc-unknown-linux-gnu
non_aws_features: --features native-tls
aws_excludes: --exclude aws-inlineable --exclude aws-sigv4 --exclude aws-sig-auth
env:
CROSS_CONFIG: Cross.toml
OPENSSL_LIB_DIR: /usr/lib/i386-linux-gnu
OPENSSL_INCLUDE_DIR: /usr/include/i386-linux-gnu
steps:
- name: Checkout
uses: actions/checkout@v1
# Pinned to the commit hash of v1.3.0
- uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641
with:
sharedKey: ${{ runner.os }}-${{ env.rust_version }}-${{ github.job }}-${{ matrix.target }}
target-dir: ./target
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.rust_version }}
components: ${{ env.rust_toolchain_components }}
profile: minimal
override: true
target: ${{ matrix.target }}
- name: Configure cross
shell: bash
run: |
cat > Cross.toml << EOF
[build]
pre-build = ["dpkg --add-architecture i386", "apt-get update && apt-get install --assume-yes pkg-config:i386 libssl-dev:i386"]
[build.env]
passthrough = [
"OPENSSL_LIB_DIR",
"OPENSSL_INCLUDE_DIR",
]
EOF
- name: Build rust-runtime crates
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --target ${{ matrix.target }} --manifest-path "rust-runtime/Cargo.toml" --exclude aws-smithy-http-server-python --workspace ${{ matrix.non_aws_features }}
- name: Build AWS rust-runtime crates
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --target ${{ matrix.target }} --manifest-path "aws/rust-runtime/Cargo.toml" ${{ matrix.aws_excludes }} --workspace

# This job is split out from the rest since it is not required to pass for merge
check-sdk-examples:
name: Check SDK Examples
Expand All @@ -165,6 +229,7 @@ jobs:
- test-codegen
- test-sdk
- test-rust-windows
- test-exotic-platform-support
# Run this job even if its dependency jobs fail
if: always()
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .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.61.0
rust_version: 1.62.0
rust_toolchain_components: clippy,rustfmt
apt_dependencies: libssl-dev gnuplot jq

Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ concurrency:
cancel-in-progress: true

env:
rust_version: 1.61.0
rust_version: 1.62.0

name: Release smithy-rs
run-name: ${{ github.workflow }} - ${{ inputs.dry_run && 'Dry run' || 'Production run' }}
on:
workflow_dispatch:
inputs:
Expand All @@ -23,12 +24,25 @@ on:
default: true

jobs:
main-branch-check:
name: Check that workflow is running in main
runs-on: ubuntu-latest
steps:
- name: Main branch check
if: ${{ github.ref_name != 'main' }}
uses: actions/github-script@v6
with:
script: |
core.setFailed("The release workflow can only be ran on main (current branch: ${{ github.ref_name }})")
# If a release is kicked off before an image is built after push to main,
# or if a dry-run release is kicked off against a non-main branch to test
# automation changes, we'll need to build a base image to work against.
# This job will be a no-op if an image was already built on main.
acquire-base-image:
name: Acquire Base Image
needs:
- main-branch-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/update-sdk-next.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# This workflow updates the `next` branch with freshly generated
# code from the latest smithy-rs and models that reside in aws-sdk-rust.
name: Update `aws-sdk-rust/next`
on:
workflow_dispatch:

jobs:
update-next:
name: Update `next`
runs-on: ubuntu-latest
steps:
- name: Check out `smithy-rs`
uses: actions/checkout@v3
with:
repository: awslabs/smithy-rs
ref: main
path: smithy-rs
- name: Check out `aws-sdk-rust`
uses: actions/checkout@v3
with:
repository: awslabs/aws-sdk-rust
ref: main
path: aws-sdk-rust
token: ${{ secrets.RELEASE_AUTOMATION_BOT_PAT }}
- name: Set up JDK
uses: actions/setup-java@v1
with:
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
- name: Delete old SDK
run: |
- name: Generate a fresh SDK
run: |
WORKSPACE="$(pwd)"
cd smithy-rs
./gradlew aws:sdk:assemble --info -Paws.sdk.models.path="${WORKSPACE}/aws-sdk-rust/aws-models"
- name: Update `aws-sdk-rust/next`
run: |
set -eux
cd aws-sdk-rust
git checkout origin/main -b next
# Delete the old SDK
rm -rf sdk examples
rm -f versions.toml Cargo.toml index.md
# Copy in the new SDK
mv ../smithy-rs/aws/sdk/build/aws-sdk/* .
git add .
git -c 'user.name=AWS SDK Rust Bot' -c '[email protected]' commit -m 'Update `aws-sdk-rust/next`' --allow-empty
git push origin next:next --force
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,33 @@
<!-- Do not manually edit this file. Use the `changelogger` tool. -->
October 24th, 2022
==================
**Breaking Changes:**
- ⚠ (all, [smithy-rs#1825](https://github.com/awslabs/smithy-rs/issues/1825)) Bump MSRV to be 1.62.0.
- ⚠ (server, [smithy-rs#1825](https://github.com/awslabs/smithy-rs/issues/1825)) Bump pyo3 and pyo3-asyncio from 0.16.x to 0.17.0 for aws-smithy-http-server-python.
- ⚠ (client, [smithy-rs#1811](https://github.com/awslabs/smithy-rs/issues/1811)) Replace all usages of `AtomicU64` with `AtomicUsize` to support 32bit targets.
- ⚠ (server, [smithy-rs#1803](https://github.com/awslabs/smithy-rs/issues/1803)) Mark `operation` and `operation_handler` modules as private in the generated server crate.
Both modules did not contain any public types, therefore there should be no actual breakage when updating.
- ⚠ (client, [smithy-rs#1740](https://github.com/awslabs/smithy-rs/issues/1740), [smithy-rs#256](https://github.com/awslabs/smithy-rs/issues/256)) A large list of breaking changes were made to accomodate default timeouts in the AWS SDK.
See [the smithy-rs upgrade guide](https://github.com/awslabs/smithy-rs/issues/1760) for a full list
of breaking changes and how to resolve them.
- ⚠ (server, [smithy-rs#1829](https://github.com/awslabs/smithy-rs/issues/1829)) Remove `Protocol` enum, removing an obstruction to extending smithy to third-party protocols.
- ⚠ (server, [smithy-rs#1829](https://github.com/awslabs/smithy-rs/issues/1829)) Convert the `protocol` argument on `PyMiddlewares::new` constructor to a type parameter.

**New this release:**
- (server, [smithy-rs#1811](https://github.com/awslabs/smithy-rs/issues/1811)) Replace all usages of `AtomicU64` with `AtomicUsize` to support 32bit targets.
- 🐛 (all, [smithy-rs#1802](https://github.com/awslabs/smithy-rs/issues/1802)) Sensitive fields in errors now respect @sensitive trait and are properly redacted.
- (server, [smithy-rs#1727](https://github.com/awslabs/smithy-rs/issues/1727), @GeneralSwiss) Pokémon Service example code now runs clippy during build.
- (server, [smithy-rs#1734](https://github.com/awslabs/smithy-rs/issues/1734)) Implement support for pure Python request middleware. Improve idiomatic logging support over tracing.
- 🐛 (client, [aws-sdk-rust#620](https://github.com/awslabs/aws-sdk-rust/issues/620), [smithy-rs#1748](https://github.com/awslabs/smithy-rs/issues/1748)) Paginators now stop on encountering a duplicate token by default rather than panic. This behavior can be customized by toggling the `stop_on_duplicate_token` property on the paginator before calling `send`.
- 🐛 (all, [smithy-rs#1817](https://github.com/awslabs/smithy-rs/issues/1817), @ethyi) Update aws-types zeroize to flexible version to prevent downstream version conflicts.
- (all, [smithy-rs#1852](https://github.com/awslabs/smithy-rs/issues/1852), @ogudavid) Enable local maven repo dependency override.

**Contributors**
Thank you for your contributions! ❤
- @GeneralSwiss ([smithy-rs#1727](https://github.com/awslabs/smithy-rs/issues/1727))
- @ethyi ([smithy-rs#1817](https://github.com/awslabs/smithy-rs/issues/1817))
- @ogudavid ([smithy-rs#1852](https://github.com/awslabs/smithy-rs/issues/1852))

September 20th, 2022
====================
**Breaking Changes:**
Expand Down
45 changes: 1 addition & 44 deletions CHANGELOG.next.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,47 +9,4 @@
# message = "Fix typos in module documentation for generated crates"
# references = ["smithy-rs#920"]
# meta = { "breaking" = false, "tada" = false, "bug" = false, "target" = "client | server | all"}
# author = "rcoh"
[[rust-runtime]]
message = "Pokémon Service example code now runs clippy during build."
references = ["smithy-rs#1727"]
meta = { "breaking" = false, "tada" = false, "bug" = false, "target" = "server" }
author = "GeneralSwiss"

[[smithy-rs]]
message = "Implement support for pure Python request middleware. Improve idiomatic logging support over tracing."
references = ["smithy-rs#1734"]
meta = { "breaking" = false, "tada" = false, "bug" = false, "target" = "server" }
author = "crisidev"

[[aws-sdk-rust]]
message = """
The SDK, by default, now times out if socket connect or time to first byte read takes longer than
3.1 seconds. There are a large number of breaking changes that come with this change that may
affect you if you customize the client configuration at all.
See [the upgrade guide](https://github.com/awslabs/aws-sdk-rust/issues/622) for information
on how to configure timeouts, and how to resolve compilation issues after upgrading.
"""
references = ["smithy-rs#1740", "smithy-rs#256"]
meta = { "breaking" = true, "tada" = false, "bug" = false }
author = "jdisanti"

[[aws-sdk-rust]]
message = """
Setting connect/read timeouts with `SdkConfig` now works. Previously, these timeout config values
were lost during connector creation, so the only reliable way to set them was to manually override
the HTTP connector.
"""
references = ["smithy-rs#1740", "smithy-rs#256"]
meta = { "breaking" = false, "tada" = false, "bug" = true }
author = "jdisanti"

[[smithy-rs]]
message = """
A large list of breaking changes were made to accomodate default timeouts in the AWS SDK.
See [the smithy-rs upgrade guide](https://github.com/awslabs/smithy-rs/issues/1760) for a full list
of breaking changes and how to resolve them.
"""
references = ["smithy-rs#1740", "smithy-rs#256"]
meta = { "breaking" = true, "tada" = false, "bug" = false, "target" = "client" }
author = "jdisanti"
# author = "rcoh"
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/rust-runtime/aws-smithy-http-server/ @awslabs/smithy-rs-server

# Shared ownership
/.github/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
/CHANGELOG.md @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
/CHANGELOG.next.toml @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
/README.md @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Setup

1. `./gradlew` will setup gradle for you. JDK 17 is required.
2. Running tests requires a working Rust installation. See [Rust docs](https://www.rust-lang.org/learn/get-started) for
installation instructions on your platform. Minimum supported Rust version is the latest released Rust version, although older versions may work.
installation instructions on your platform. The MSRV (**M**inimum **S**upported **R**ust **V**ersion) for the crates in this project is `stable-2`, i.e. the current `stable` Rust version and the prior two versions. Older versions may work.

Development
-----------
Expand Down
Loading

0 comments on commit cc78a64

Please sign in to comment.