Skip to content

Commit e5f8e18

Browse files
Revert "merge"
This reverts commit 6f00505.
1 parent 6f00505 commit e5f8e18

File tree

732 files changed

+23381
-42864
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

732 files changed

+23381
-42864
lines changed

.editorconfig

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,5 @@ indent_size = 4
99
indent_style = space
1010
insert_final_newline = true
1111
max_line_length = 120
12-
1312
# Ktlint-specific config
14-
ktlint_standard = enabled
15-
ktlint_experimental = disabled
16-
ktlint_standard_filename = disabled
17-
ktlint_standard_max-line-length = disabled
18-
ktlint_standard_argument-list-wrapping = disabled
19-
ktlint_standard_parameter-list-wrapping = disabled
13+
disabled_rules = filename, max-line-length, argument-list-wrapping, parameter-list-wrapping

.github/scripts/docker-image-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ set -eo pipefail
1111
cd "$(dirname "$0")"
1212
cd "$(git rev-parse --show-toplevel)"
1313

14-
git ls-files -s --full-name "tools/ci-build" | git hash-object --stdin
14+
git ls-files -s --full-name "tools" | git hash-object --stdin

.github/scripts/get-or-create-release-branch.sh

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ set -eux
88
# Compute the name of the release branch starting from the version that needs to be released ($SEMANTIC_VERSION).
99
# If it's the beginning of a new release series, the branch is created and pushed to the remote (chosen according to
1010
# the value $DRY_RUN).
11+
# If it isn't the beginning of a new release series, the script makes sure that the commit that will be tagged is at
12+
# the tip of the (pre-existing) release branch.
1113
#
1214
# The script populates an output file with key-value pairs that are needed in the release CI workflow to carry out
1315
# the next steps in the release flow: the name of the release branch and a boolean flag that is set to 'true' if this
@@ -55,7 +57,16 @@ if [[ "${DRY_RUN}" == "true" ]]; then
5557
git push --force origin "HEAD:refs/heads/${branch_name}"
5658
else
5759
commit_sha=$(git rev-parse --short HEAD)
58-
if ! git ls-remote --exit-code --heads origin "${branch_name}"; then
60+
if git ls-remote --exit-code --heads origin "${branch_name}"; then
61+
# The release branch already exists, we need to make sure that our commit is its current tip
62+
branch_head_sha=$(git rev-parse --verify --short "refs/heads/${branch_name}")
63+
if [[ "${branch_head_sha}" != "${commit_sha}" ]]; then
64+
echo "The release branch - ${branch_name} - already exists. ${commit_sha}, the commit you chose when "
65+
echo "launching this release, is not its current HEAD (${branch_head_sha}). This is not allowed: you "
66+
echo "MUST release from the HEAD of the release branch if it already exists."
67+
exit 1
68+
fi
69+
else
5970
# The release branch does not exist.
6071
# We need to make sure that the commit SHA that we are releasing is on `main`.
6172
git fetch origin main
@@ -64,7 +75,7 @@ else
6475
git checkout -b "${branch_name}"
6576
git push origin "${branch_name}"
6677
else
67-
echo "You must choose a commit from main to create a new release branch!"
78+
echo "You must choose a commit from main to create a new release series!"
6879
exit 1
6980
fi
7081
fi

.github/workflows/ci-merge-queue.yml

Lines changed: 0 additions & 93 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ on:
2929
required: false
3030

3131
env:
32-
rust_version: 1.66.1
32+
rust_version: 1.62.1
3333
rust_toolchain_components: clippy,rustfmt
3434
ENCRYPTED_DOCKER_PASSWORD: ${{ secrets.ENCRYPTED_DOCKER_PASSWORD }}
3535
DOCKER_LOGIN_TOKEN_PASSPHRASE: ${{ secrets.DOCKER_LOGIN_TOKEN_PASSPHRASE }}

.github/workflows/claim-crate-names.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ concurrency:
1010
cancel-in-progress: true
1111

1212
env:
13-
rust_version: 1.66.1
13+
rust_version: 1.62.1
1414

1515
name: Claim unpublished crate names on crates.io
1616
run-name: ${{ github.workflow }}

.github/workflows/pull-request-bot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ concurrency:
2828

2929
env:
3030
java_version: 11
31-
rust_version: 1.66.1
31+
rust_version: 1.62.1
3232
rust_toolchain_components: clippy,rustfmt
3333
apt_dependencies: libssl-dev gnuplot jq
3434

.github/workflows/release-scripts/create-release.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,10 @@ module.exports = async ({
4444
isDryRun,
4545
// Release manifest file path
4646
releaseManifestPath,
47-
// The commit-like reference that we want to release (e.g. a commit SHA or a branch name)
48-
releaseCommitish,
4947
}) => {
5048
assert(github !== undefined, "The `github` argument is required");
5149
assert(isDryRun !== undefined, "The `isDryRun` argument is required");
5250
assert(releaseManifestPath !== undefined, "The `releaseManifestPath` argument is required");
53-
assert(releaseCommitish !== undefined, "The `releaseCommitish` argument is required");
5451

5552
console.info(`Starting GitHub release creation with isDryRun: ${isDryRun}, and releaseManifestPath: '${releaseManifestPath}'`);
5653

@@ -77,7 +74,6 @@ module.exports = async ({
7774
name: releaseManifest.name,
7875
body: releaseManifest.body,
7976
prerelease: releaseManifest.prerelease,
80-
target_commitish: releaseCommitish,
8177
});
8278
console.info(`SUCCESS: Created release with ID: ${response.data.id}, URL: ${response.data.html_url} `);
8379
} else {

.github/workflows/release.yml

Lines changed: 13 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ concurrency:
1010
cancel-in-progress: true
1111

1212
env:
13-
rust_version: 1.66.1
13+
rust_version: 1.62.1
1414

1515
name: Release smithy-rs
1616
run-name: ${{ github.workflow }} ${{ inputs.semantic_version }} (${{ inputs.commit_sha }}) - ${{ inputs.dry_run && 'Dry run' || 'Production run' }}
1717
on:
1818
workflow_dispatch:
1919
inputs:
2020
commit_sha:
21-
description: |
22-
The SHA of the git commit that you want to release.
21+
description: |
22+
The SHA of the git commit that you want to release.
2323
You must use the non-abbreviated SHA (e.g. b2318b0 won't work!).
2424
required: true
2525
type: string
@@ -75,8 +75,8 @@ jobs:
7575
# We need `always` here otherwise this job won't run if the previous job has been skipped
7676
# See https://samanpavel.medium.com/github-actions-conditional-job-execution-e6aa363d2867
7777
if: |
78-
always() &&
79-
needs.acquire-base-image.result == 'success' &&
78+
always() &&
79+
needs.acquire-base-image.result == 'success' &&
8080
(needs.release-ci.result == 'success' || needs.release-ci.result == 'skipped')
8181
runs-on: ubuntu-latest
8282
outputs:
@@ -87,7 +87,6 @@ jobs:
8787
with:
8888
ref: ${{ inputs.commit_sha }}
8989
token: ${{ secrets.RELEASE_AUTOMATION_BOT_PAT }}
90-
fetch-depth: 0
9190
- name: Get or create release branch
9291
id: branch-push
9392
shell: bash
@@ -113,13 +112,11 @@ jobs:
113112
runs-on: ubuntu-latest
114113
outputs:
115114
release_branch: ${{ needs.get-or-create-release-branch.outputs.release_branch }}
116-
commit_sha: ${{ steps.gradle-push.outputs.commit_sha }}
117115
steps:
118116
- uses: actions/checkout@v3
119117
with:
120-
ref: ${{ inputs.commit_sha }}
118+
ref: ${{ needs.get-or-create-release-branch.outputs.release_branch }}
121119
path: smithy-rs
122-
fetch-depth: 0
123120
token: ${{ secrets.RELEASE_AUTOMATION_BOT_PAT }}
124121
- name: Upgrade gradle.properties
125122
uses: ./smithy-rs/.github/actions/docker-build
@@ -134,30 +131,13 @@ jobs:
134131
shell: bash
135132
env:
136133
SEMANTIC_VERSION: ${{ inputs.semantic_version }}
137-
RELEASE_COMMIT_SHA: ${{ inputs.commit_sha }}
138-
RELEASE_BRANCH_NAME: ${{ needs.get-or-create-release-branch.outputs.release_branch }}
139134
DRY_RUN: ${{ inputs.dry_run }}
140135
run: |
141136
set -x
142-
143137
# For debugging purposes
144138
git status
145-
146-
if ! git diff-index --quiet HEAD; then
147-
# gradle.properties was changed, we need to commit and push the diff
148-
git -c 'user.name=AWS SDK Rust Bot' -c 'user.email=aws-sdk-rust-primary@amazon.com' commit gradle.properties --message "Upgrade the smithy-rs runtime crates version to ${SEMANTIC_VERSION}"
149-
150-
# This will fail if we tried to release from a non-HEAD commit on the release branch.
151-
# The only scenario where we would try to release a non-HEAD commit from the release branch is
152-
# to retry a release action execution that failed due to a transient issue.
153-
# In that case, we expect the commit to be releasable as-is, i.e. the runtime crate version in gradle.properties
154-
# should already be the expected one.
155-
git push origin "HEAD:refs/heads/${RELEASE_BRANCH_NAME}"
156-
157-
echo "commit_sha=$(git rev-parse HEAD)" > $GITHUB_OUTPUT
158-
else
159-
echo "commit_sha=${RELEASE_COMMIT_SHA}" > $GITHUB_OUTPUT
160-
fi
139+
# The file was actually changed, we need to commit the changes
140+
git diff-index --quiet HEAD || { git -c 'user.name=AWS SDK Rust Bot' -c 'user.email=aws-sdk-rust-primary@amazon.com' commit gradle.properties --message "Upgrade the smithy-rs runtime crates version to ${SEMANTIC_VERSION}" && git push origin; }
161141
162142
release:
163143
name: Release
@@ -178,7 +158,7 @@ jobs:
178158
- name: Checkout smithy-rs
179159
uses: actions/checkout@v3
180160
with:
181-
ref: ${{ needs.upgrade-gradle-properties.outputs.commit_sha }}
161+
ref: ${{ needs.upgrade-gradle-properties.outputs.release_branch }}
182162
path: smithy-rs
183163
token: ${{ secrets.RELEASE_AUTOMATION_BOT_PAT }}
184164
- name: Generate release artifacts
@@ -190,20 +170,9 @@ jobs:
190170
- name: Push smithy-rs changes
191171
shell: bash
192172
working-directory: smithy-rs-release/smithy-rs
193-
id: push-changelog
194-
env:
195-
RELEASE_BRANCH_NAME: ${{ needs.upgrade-gradle-properties.outputs.release_branch }}
196173
run: |
197-
if ! git diff-index --quiet HEAD; then
198-
echo "Pushing release commits..."
199-
# This will fail if we tried to release from a non-HEAD commit on the release branch.
200-
# The only scenario where we would try to release a non-HEAD commit from the release branch is
201-
# to retry a release action execution that failed due to a transient issue.
202-
# In that case, we expect the commit to be releasable as-is, i.e. the changelog should have already
203-
# been processed.
204-
git push origin "HEAD:refs/heads/${RELEASE_BRANCH_NAME}"
205-
fi
206-
echo "commit_sha=$(git rev-parse HEAD)" > $GITHUB_OUTPUT
174+
echo "Pushing release commits..."
175+
git push origin
207176
- name: Tag release
208177
uses: actions/github-script@v6
209178
with:
@@ -213,8 +182,7 @@ jobs:
213182
await createReleaseScript({
214183
github,
215184
isDryRun: ${{ inputs.dry_run }},
216-
releaseManifestPath: "smithy-rs-release/smithy-rs-release-manifest.json",
217-
releaseCommitish: "${{ steps.push-changelog.outputs.commit_sha }}"
185+
releaseManifestPath: "smithy-rs-release/smithy-rs-release-manifest.json"
218186
});
219187
- name: Publish to crates.io
220188
shell: bash
@@ -264,7 +232,7 @@ jobs:
264232
shell: bash
265233
run: |
266234
set -eux
267-
235+
268236
# This will fail if other commits have been pushed to `main` after `commit_sha`
269237
# In particular, this will ALWAYS fail if you are creating a new release series from
270238
# a commit that is not the current tip of `main`.

.github/workflows/update-sdk-next.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Set up Rust
3333
uses: dtolnay/rust-toolchain@master
3434
with:
35-
toolchain: 1.66.1
35+
toolchain: 1.62.1
3636
- name: Delete old SDK
3737
run: |
3838
- name: Generate a fresh SDK

0 commit comments

Comments
 (0)