From 9c61e8b2b8cd0e6d58c362070d24fd0f0233932a Mon Sep 17 00:00:00 2001 From: Tony Knapp <5892063+texastony@users.noreply.github.com> Date: Mon, 16 Sep 2024 12:23:13 -0700 Subject: [PATCH] test: stop .NET testing goals until Dafny fixes land (#718) Crypto Tools would like to prepare for our next release, but it seems we have stumbled into a few Dafny bugs. The Dafny .NET compiler is struggling with the Storage changes in Additionally, the Smithy-Diff workflow has generated far too much noise. Crypto Tools use GitHub notifications to track customer cut or updated GitHub issues. Tagging a contributor for every commit pushed generates far too much noise. See https://github.com/aws/aws-cryptographic-material-providers-library/pull/717 as evidence that '.github/workflows/block_main.yml' fails if this commit targets main. --- .github/workflows/block_main.yml | 17 +++++++++ .github/workflows/library_interop_tests.yml | 13 +++++-- .github/workflows/library_net_tests.yml | 9 ++--- .github/workflows/smithy-diff.yml | 38 --------------------- 4 files changed, 32 insertions(+), 45 deletions(-) create mode 100644 .github/workflows/block_main.yml delete mode 100644 .github/workflows/smithy-diff.yml diff --git a/.github/workflows/block_main.yml b/.github/workflows/block_main.yml new file mode 100644 index 000000000..637973baf --- /dev/null +++ b/.github/workflows/block_main.yml @@ -0,0 +1,17 @@ +# This workflow ensures rc-1.7.0 does not go to main until .NET testing is restored +name: rc-1.7.0-no-main + +on: + pull_request: + branches: + - main +jobs: + forbid: + runs-on: ubuntu-latest + steps: + - name: fail + run: exit 1 +# When we revert this, we MUST revert/restore: +# .github/workflows/library_net_tests.yml#L27-L30 +# .github/workflows/library_interop_tests.yml#L28-31 +# .github/workflows/library_interop_tests.yml#L134-139 diff --git a/.github/workflows/library_interop_tests.yml b/.github/workflows/library_interop_tests.yml index 02c510614..3b461f4f6 100644 --- a/.github/workflows/library_interop_tests.yml +++ b/.github/workflows/library_interop_tests.yml @@ -25,7 +25,10 @@ jobs: ubuntu-latest, macos-12, ] - language: [java, net] + # language: [java, net] + # Cutting .NET tests for rc-1.7.0 + # We MUST restore these before going GA + language: [java] # https://taskei.amazon.dev/tasks/CrypTool-5284 dotnet-version: ["6.0.x"] runs-on: ${{ matrix.os }} @@ -128,8 +131,12 @@ jobs: ubuntu-latest, macos-12, ] - encrypting_language: [java, net] - decrypting_language: [java, net] + # Cutting .NET tests for rc-1.7.0 + # We MUST restore these before going GA + # encrypting_language: [java, net] + # decrypting_language: [java, net] + encrypting_language: [java] + decrypting_language: [java] dotnet-version: ["6.0.x"] runs-on: ${{ matrix.os }} permissions: diff --git a/.github/workflows/library_net_tests.yml b/.github/workflows/library_net_tests.yml index f8d92fa4b..146365ab9 100644 --- a/.github/workflows/library_net_tests.yml +++ b/.github/workflows/library_net_tests.yml @@ -19,14 +19,15 @@ jobs: strategy: fail-fast: false matrix: - library: - [ + library: [ StandardLibrary, AwsCryptographyPrimitives, ComAmazonawsKms, ComAmazonawsDynamodb, - AwsCryptographicMaterialProviders, - TestVectorsAwsCryptographicMaterialProviders, + # Cutting .NET tests for rc-1.7.0 + # We MUST restore these before going GA + # AwsCryptographicMaterialProviders, + # TestVectorsAwsCryptographicMaterialProviders, ] dotnet-version: ["6.0.x"] os: [windows-latest, ubuntu-latest, macos-12] diff --git a/.github/workflows/smithy-diff.yml b/.github/workflows/smithy-diff.yml deleted file mode 100644 index b874861c1..000000000 --- a/.github/workflows/smithy-diff.yml +++ /dev/null @@ -1,38 +0,0 @@ -# This workflow checks if specfic files were modified, -# if they were they require more than one approval from CODEOWNERS -name: Check Smithy Files - -on: - pull_request: - -jobs: - require-approvals: - runs-on: ubuntu-latest - permissions: - issues: write - pull-requests: write - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Get Files changed - id: file-changes - shell: bash - run: - # Checks to see if any of the smithy Models are being updated. - # Doing this check allows us to catch things like, missing @javadoc trait documentation or bug in smithy dafny that has not be resolved. - echo "FILES=$(git diff --name-only origin/main origin/${GITHUB_HEAD_REF} | grep '\.smithy$' | tr '\n' ' ')" >> "$GITHUB_OUTPUT" - - - name: Check if FILES is not empty - id: comment - env: - PR_NUMBER: ${{ github.event.number }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - FILES: ${{ steps.file-changes.outputs.FILES }} - if: ${{env.FILES != ''}} - run: | - # TODO: If https://github.com/smithy-lang/smithy-dafny/issues/491 is resolved, remove comment about this issue. - COMMENT="@${{github.actor}}, I noticed you are updating the smithy model files.\nDoes this update need new or updated javadoc trait documentation?\n Are you adding constraints inside list, map or union? Do you know about this issue: https://github.com/smithy-lang/smithy-dafny/issues/491?" - COMMENT_URL="https://api.github.com/repos/${{ github.repository }}/issues/${PR_NUMBER}/comments" - curl -s -H "Authorization: token ${GITHUB_TOKEN}" -X POST $COMMENT_URL -d "{\"body\":\"$COMMENT\"}"