From f6bcdef9b0675eb1efd299fdcbfd9d6d526c6b3f Mon Sep 17 00:00:00 2001 From: 0marperez Date: Thu, 18 Sep 2025 17:56:23 -0400 Subject: [PATCH 1/7] feat: remove deprecated shapes check --- .../workflows/remove-deprecated-shapes.yml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/remove-deprecated-shapes.yml diff --git a/.github/workflows/remove-deprecated-shapes.yml b/.github/workflows/remove-deprecated-shapes.yml new file mode 100644 index 00000000000..8a2624010a5 --- /dev/null +++ b/.github/workflows/remove-deprecated-shapes.yml @@ -0,0 +1,26 @@ +name: Remove deprecated shapes check +on: + pull_request: + types: [ opened, synchronize, reopened, labeled, unlabeled ] + branches: [ main ] + +jobs: + remove-deprecated-shapes: + # Only runs if the deprecated-shape-cutoff-date was not updated + if: ${{ !contains(github.event.pull_request.labels.*.name, 'updated-deprecated-shape-cutoff-date') }} + permissions: {} + runs-on: ubuntu-latest + steps: + - name: Check branch name + run: | + # Only continue on branches starting with vX.X (e.g. v1.2, v1.2.3, v1.2-main) + if [[ ! "$GITHUB_HEAD_REF" =~ ^v\.[0-9]+\.[0-9]+.*$ ]]; then + exit 0 + fi + + - name: Update deprecated shape cutoff date + run: | + echo "Please update the deprecated shape cutoff date and add the 'updated-deprecated-shape-cutoff-date' label" + echo "It must be set to the release date of the current minor version" + echo "See: https://github.com/aws/aws-sdk-kotlin/blob/8df78fb048ddc40120c8fe370cd3e0d35c077b2b/build-support/src/main/kotlin/aws/sdk/kotlin/gradle/sdk/Util.kt#L16" + exit 1 From 2bb09c834283df8608b12bff3ff1aac05be8adc3 Mon Sep 17 00:00:00 2001 From: 0marperez Date: Fri, 19 Sep 2025 10:41:46 -0400 Subject: [PATCH 2/7] debug --- .github/workflows/remove-deprecated-shapes.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/remove-deprecated-shapes.yml b/.github/workflows/remove-deprecated-shapes.yml index 8a2624010a5..70a2dba065d 100644 --- a/.github/workflows/remove-deprecated-shapes.yml +++ b/.github/workflows/remove-deprecated-shapes.yml @@ -13,6 +13,7 @@ jobs: steps: - name: Check branch name run: | + echo $$GITHUB_HEAD_REF # Only continue on branches starting with vX.X (e.g. v1.2, v1.2.3, v1.2-main) if [[ ! "$GITHUB_HEAD_REF" =~ ^v\.[0-9]+\.[0-9]+.*$ ]]; then exit 0 From b1699ab257672201d13901ba5aa8fa0431e10af2 Mon Sep 17 00:00:00 2001 From: 0marperez Date: Fri, 19 Sep 2025 10:43:35 -0400 Subject: [PATCH 3/7] debug --- .github/workflows/remove-deprecated-shapes.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/remove-deprecated-shapes.yml b/.github/workflows/remove-deprecated-shapes.yml index 70a2dba065d..5419a02324c 100644 --- a/.github/workflows/remove-deprecated-shapes.yml +++ b/.github/workflows/remove-deprecated-shapes.yml @@ -13,7 +13,8 @@ jobs: steps: - name: Check branch name run: | - echo $$GITHUB_HEAD_REF + echo $GITHUB_HEAD_REF + echo ${{ github.head_ref }} # Only continue on branches starting with vX.X (e.g. v1.2, v1.2.3, v1.2-main) if [[ ! "$GITHUB_HEAD_REF" =~ ^v\.[0-9]+\.[0-9]+.*$ ]]; then exit 0 From de1d41a7f3e81cb0287e3bba72356eb918604d6f Mon Sep 17 00:00:00 2001 From: 0marperez Date: Fri, 19 Sep 2025 10:48:44 -0400 Subject: [PATCH 4/7] revert debug --- .github/workflows/remove-deprecated-shapes.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/remove-deprecated-shapes.yml b/.github/workflows/remove-deprecated-shapes.yml index 5419a02324c..8a2624010a5 100644 --- a/.github/workflows/remove-deprecated-shapes.yml +++ b/.github/workflows/remove-deprecated-shapes.yml @@ -13,8 +13,6 @@ jobs: steps: - name: Check branch name run: | - echo $GITHUB_HEAD_REF - echo ${{ github.head_ref }} # Only continue on branches starting with vX.X (e.g. v1.2, v1.2.3, v1.2-main) if [[ ! "$GITHUB_HEAD_REF" =~ ^v\.[0-9]+\.[0-9]+.*$ ]]; then exit 0 From 52ef8d13db7f49bf01a621e9da0342d9b621cbe5 Mon Sep 17 00:00:00 2001 From: 0marperez Date: Fri, 19 Sep 2025 11:01:12 -0400 Subject: [PATCH 5/7] fix regex --- .github/workflows/remove-deprecated-shapes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/remove-deprecated-shapes.yml b/.github/workflows/remove-deprecated-shapes.yml index 8a2624010a5..9bb8dc872ac 100644 --- a/.github/workflows/remove-deprecated-shapes.yml +++ b/.github/workflows/remove-deprecated-shapes.yml @@ -14,7 +14,7 @@ jobs: - name: Check branch name run: | # Only continue on branches starting with vX.X (e.g. v1.2, v1.2.3, v1.2-main) - if [[ ! "$GITHUB_HEAD_REF" =~ ^v\.[0-9]+\.[0-9]+.*$ ]]; then + if [[ ! "$GITHUB_HEAD_REF" =~ ^v[0-9]+\.[0-9]+.*$ ]]; then exit 0 fi From c6438bc8aedbbbacd0638834c01a7914aaa80a89 Mon Sep 17 00:00:00 2001 From: 0marperez Date: Fri, 19 Sep 2025 11:06:46 -0400 Subject: [PATCH 6/7] try github.head_ref --- .github/workflows/remove-deprecated-shapes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/remove-deprecated-shapes.yml b/.github/workflows/remove-deprecated-shapes.yml index 9bb8dc872ac..fef2389730d 100644 --- a/.github/workflows/remove-deprecated-shapes.yml +++ b/.github/workflows/remove-deprecated-shapes.yml @@ -14,7 +14,7 @@ jobs: - name: Check branch name run: | # Only continue on branches starting with vX.X (e.g. v1.2, v1.2.3, v1.2-main) - if [[ ! "$GITHUB_HEAD_REF" =~ ^v[0-9]+\.[0-9]+.*$ ]]; then + if [[ ! "${{ github.head_ref }}" =~ ^v[0-9]+\.[0-9]+.*$ ]]; then exit 0 fi From a69164b8a8463172698f7aa18ba0e17a88180ff7 Mon Sep 17 00:00:00 2001 From: 0marperez Date: Fri, 19 Sep 2025 11:11:01 -0400 Subject: [PATCH 7/7] fix? --- .github/workflows/remove-deprecated-shapes.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/remove-deprecated-shapes.yml b/.github/workflows/remove-deprecated-shapes.yml index fef2389730d..c2dfe851872 100644 --- a/.github/workflows/remove-deprecated-shapes.yml +++ b/.github/workflows/remove-deprecated-shapes.yml @@ -11,15 +11,13 @@ jobs: permissions: {} runs-on: ubuntu-latest steps: - - name: Check branch name + - name: Update deprecated shape cutoff date run: | # Only continue on branches starting with vX.X (e.g. v1.2, v1.2.3, v1.2-main) if [[ ! "${{ github.head_ref }}" =~ ^v[0-9]+\.[0-9]+.*$ ]]; then exit 0 fi - - name: Update deprecated shape cutoff date - run: | echo "Please update the deprecated shape cutoff date and add the 'updated-deprecated-shape-cutoff-date' label" echo "It must be set to the release date of the current minor version" echo "See: https://github.com/aws/aws-sdk-kotlin/blob/8df78fb048ddc40120c8fe370cd3e0d35c077b2b/build-support/src/main/kotlin/aws/sdk/kotlin/gradle/sdk/Util.kt#L16"