From 0728f3797719a1662c4864ec3494ca07507a230a Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Fri, 20 Sep 2024 12:54:47 +0100 Subject: [PATCH] Try to diagnose instability of ZipkinWebClientSenderTests --- .github/actions/build/action.yml | 42 +++++- .../workflows/build-and-deploy-snapshot.yml | 55 -------- .github/workflows/build-pull-request.yml | 42 ------ .github/workflows/ci.yml | 27 +--- .github/workflows/release.yml | 126 ------------------ .github/workflows/run-system-tests.yml | 40 ------ .github/workflows/verify.yml | 73 ---------- .../zipkin/ZipkinWebClientSenderTests.java | 13 ++ 8 files changed, 55 insertions(+), 363 deletions(-) delete mode 100644 .github/workflows/build-and-deploy-snapshot.yml delete mode 100644 .github/workflows/build-pull-request.yml delete mode 100644 .github/workflows/release.yml delete mode 100644 .github/workflows/run-system-tests.yml delete mode 100644 .github/workflows/verify.yml diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 39adc65be1c7..f7aa3802c89d 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -46,7 +46,47 @@ runs: id: build if: ${{ inputs.publish == 'false' }} shell: bash - run: ./gradlew build + run: | + ./gradlew --no-build-cache spring-boot-project:spring-boot-actuator-autoconfigure:test --tests ZipkinWebClientSenderTests + rm -r spring-boot-project/spring-boot-actuator-autoconfigure/build/test-results + ./gradlew --no-build-cache spring-boot-project:spring-boot-actuator-autoconfigure:test --tests ZipkinWebClientSenderTests + rm -r spring-boot-project/spring-boot-actuator-autoconfigure/build/test-results + ./gradlew --no-build-cache spring-boot-project:spring-boot-actuator-autoconfigure:test --tests ZipkinWebClientSenderTests + rm -r spring-boot-project/spring-boot-actuator-autoconfigure/build/test-results + ./gradlew --no-build-cache spring-boot-project:spring-boot-actuator-autoconfigure:test --tests ZipkinWebClientSenderTests + rm -r spring-boot-project/spring-boot-actuator-autoconfigure/build/test-results + ./gradlew --no-build-cache spring-boot-project:spring-boot-actuator-autoconfigure:test --tests ZipkinWebClientSenderTests + rm -r spring-boot-project/spring-boot-actuator-autoconfigure/build/test-results + ./gradlew --no-build-cache spring-boot-project:spring-boot-actuator-autoconfigure:test --tests ZipkinWebClientSenderTests + rm -r spring-boot-project/spring-boot-actuator-autoconfigure/build/test-results + ./gradlew --no-build-cache spring-boot-project:spring-boot-actuator-autoconfigure:test --tests ZipkinWebClientSenderTests + rm -r spring-boot-project/spring-boot-actuator-autoconfigure/build/test-results + ./gradlew --no-build-cache spring-boot-project:spring-boot-actuator-autoconfigure:test --tests ZipkinWebClientSenderTests + rm -r spring-boot-project/spring-boot-actuator-autoconfigure/build/test-results + ./gradlew --no-build-cache spring-boot-project:spring-boot-actuator-autoconfigure:test --tests ZipkinWebClientSenderTests + rm -r spring-boot-project/spring-boot-actuator-autoconfigure/build/test-results + ./gradlew --no-build-cache spring-boot-project:spring-boot-actuator-autoconfigure:test --tests ZipkinWebClientSenderTests + rm -r spring-boot-project/spring-boot-actuator-autoconfigure/build/test-results + ./gradlew --no-build-cache spring-boot-project:spring-boot-actuator-autoconfigure:test --tests ZipkinWebClientSenderTests + rm -r spring-boot-project/spring-boot-actuator-autoconfigure/build/test-results + ./gradlew --no-build-cache spring-boot-project:spring-boot-actuator-autoconfigure:test --tests ZipkinWebClientSenderTests + rm -r spring-boot-project/spring-boot-actuator-autoconfigure/build/test-results + ./gradlew --no-build-cache spring-boot-project:spring-boot-actuator-autoconfigure:test --tests ZipkinWebClientSenderTests + rm -r spring-boot-project/spring-boot-actuator-autoconfigure/build/test-results + ./gradlew --no-build-cache spring-boot-project:spring-boot-actuator-autoconfigure:test --tests ZipkinWebClientSenderTests + rm -r spring-boot-project/spring-boot-actuator-autoconfigure/build/test-results + ./gradlew --no-build-cache spring-boot-project:spring-boot-actuator-autoconfigure:test --tests ZipkinWebClientSenderTests + rm -r spring-boot-project/spring-boot-actuator-autoconfigure/build/test-results + ./gradlew --no-build-cache spring-boot-project:spring-boot-actuator-autoconfigure:test --tests ZipkinWebClientSenderTests + rm -r spring-boot-project/spring-boot-actuator-autoconfigure/build/test-results + ./gradlew --no-build-cache spring-boot-project:spring-boot-actuator-autoconfigure:test --tests ZipkinWebClientSenderTests + rm -r spring-boot-project/spring-boot-actuator-autoconfigure/build/test-results + ./gradlew --no-build-cache spring-boot-project:spring-boot-actuator-autoconfigure:test --tests ZipkinWebClientSenderTests + rm -r spring-boot-project/spring-boot-actuator-autoconfigure/build/test-results + ./gradlew --no-build-cache spring-boot-project:spring-boot-actuator-autoconfigure:test --tests ZipkinWebClientSenderTests + rm -r spring-boot-project/spring-boot-actuator-autoconfigure/build/test-results + ./gradlew --no-build-cache spring-boot-project:spring-boot-actuator-autoconfigure:test --tests ZipkinWebClientSenderTests + rm -r spring-boot-project/spring-boot-actuator-autoconfigure/build/test-results - name: Publish id: publish if: ${{ inputs.publish == 'true' }} diff --git a/.github/workflows/build-and-deploy-snapshot.yml b/.github/workflows/build-and-deploy-snapshot.yml deleted file mode 100644 index c429887ad691..000000000000 --- a/.github/workflows/build-and-deploy-snapshot.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Build and Deploy Snapshot -on: - push: - branches: - - 3.2.x -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} -jobs: - build-and-deploy-snapshot: - name: Build and Deploy Snapshot - runs-on: ${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} - if: ${{ github.repository == 'spring-projects/spring-boot' }} - steps: - - name: Check Out Code - uses: actions/checkout@v4 - - name: Build and Publish - id: build-and-publish - uses: ./.github/actions/build - with: - develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }} - publish: true - - name: Deploy - uses: spring-io/artifactory-deploy-action@26bbe925a75f4f863e1e529e85be2d0093cac116 # v0.0.1 - with: - uri: 'https://repo.spring.io' - username: ${{ secrets.ARTIFACTORY_USERNAME }} - password: ${{ secrets.ARTIFACTORY_PASSWORD }} - build-name: 'spring-boot-3.2.x' - repository: 'libs-snapshot-local' - folder: 'deployment-repository' - signing-key: ${{ secrets.GPG_PRIVATE_KEY }} - signing-passphrase: ${{ secrets.GPG_PASSPHRASE }} - artifact-properties: | - /**/spring-boot-docs-*.zip::zip.type=docs,zip.deployed=false - - name: Send Notification - uses: ./.github/actions/send-notification - if: always() - with: - webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }} - status: ${{ job.status }} - build-scan-url: ${{ steps.build-and-publish.outputs.build-scan-url }} - run-name: ${{ format('{0} | Linux | Java 17', github.ref_name) }} - outputs: - version: ${{ steps.build-and-publish.outputs.version }} - verify: - name: Verify - needs: build-and-deploy-snapshot - uses: ./.github/workflows/verify.yml - secrets: - google-chat-webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }} - repository-password: ${{ secrets.ARTIFACTORY_PASSWORD }} - repository-username: ${{ secrets.ARTIFACTORY_USERNAME }} - token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} - with: - version: ${{ needs.build-and-deploy-snapshot.outputs.version }} diff --git a/.github/workflows/build-pull-request.yml b/.github/workflows/build-pull-request.yml deleted file mode 100644 index 96667f8684b7..000000000000 --- a/.github/workflows/build-pull-request.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Build Pull Request -on: pull_request - -permissions: - contents: read - -jobs: - build: - name: Build Pull Request - runs-on: ${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} - if: ${{ github.repository == 'spring-projects/spring-boot' }} - steps: - - name: Free Disk Space - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 - with: - large-packages: false - docker-images: false - - name: Set Up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'liberica' - - name: Check Out - uses: actions/checkout@v4 - - name: Validate Gradle Wrapper - uses: gradle/actions/wrapper-validation@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0 - - name: Set Up Gradle - uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0 - - name: Build - env: - CI: 'true' - GRADLE_ENTERPRISE_URL: 'https://ge.spring.io' - run: ./gradlew -Dorg.gradle.internal.launcher.welcomeMessageEnabled=false --no-daemon --no-parallel --continue build - - name: Print JVM Thread Dumps When Cancelled - uses: ./.github/actions/print-jvm-thread-dumps - if: cancelled() - - name: Upload Build Reports - uses: actions/upload-artifact@v4 - if: failure() - with: - name: build-reports - path: '**/build/reports/' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19b437bf72ae..7b547d173c3b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,37 +1,20 @@ name: CI -on: - push: - branches: - - '3.2.x' +on: push concurrency: group: ${{ github.workflow }}-${{ github.ref }} jobs: ci: name: '${{ matrix.os.name}} | Java ${{ matrix.java.version}}' runs-on: ${{ matrix.os.id }} - if: ${{ github.repository == 'spring-projects/spring-boot' }} strategy: fail-fast: false matrix: os: - - id: ${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} - name: Linux - id: windows-latest name: Windows java: - version: 17 toolchain: false - - version: 21 - toolchain: true - - version: 22 - toolchain: true - - version: 23 - toolchain: true - exclude: - - os: - name: Linux - java: - version: 17 steps: - name: Prepare Windows runner if: ${{ runner.os == 'Windows' }} @@ -50,11 +33,3 @@ jobs: java-toolchain: ${{ matrix.java.toolchain }} java-distribution: ${{ matrix.java.distribution }} develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }} - - name: Send Notification - uses: ./.github/actions/send-notification - if: always() - with: - webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }} - status: ${{ job.status }} - build-scan-url: ${{ steps.build.outputs.build-scan-url }} - run-name: ${{ format('{0} | {1} | Java {2}', github.ref_name, matrix.os.name, matrix.java.version) }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index c36467b68692..000000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,126 +0,0 @@ -name: Release -on: - push: - tags: - - v3.2.[0-9]+ -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} -jobs: - build-and-stage-release: - name: Build and Stage Release - runs-on: ${{ vars.UBUNTU_MEDIUIM || 'ubuntu-latest' }} - if: ${{ github.repository == 'spring-projects/spring-boot' }} - steps: - - name: Check Out Code - uses: actions/checkout@v4 - - name: Build and Publish - id: build-and-publish - uses: ./.github/actions/build - with: - develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }} - publish: true - - name: Stage Release - uses: spring-io/artifactory-deploy-action@26bbe925a75f4f863e1e529e85be2d0093cac116 # v0.0.1 - with: - uri: 'https://repo.spring.io' - username: ${{ secrets.ARTIFACTORY_USERNAME }} - password: ${{ secrets.ARTIFACTORY_PASSWORD }} - build-name: ${{ format('spring-boot-{0}', steps.build-and-publish.outputs.version)}} - repository: 'libs-staging-local' - folder: 'deployment-repository' - signing-key: ${{ secrets.GPG_PRIVATE_KEY }} - signing-passphrase: ${{ secrets.GPG_PASSPHRASE }} - artifact-properties: | - /**/spring-boot-docs-*.zip::zip.type=docs,zip.deployed=false - outputs: - version: ${{ steps.build-and-publish.outputs.version }} - verify: - name: Verify - needs: build-and-stage-release - uses: ./.github/workflows/verify.yml - with: - staging: true - version: ${{ needs.build-and-stage-release.outputs.version }} - secrets: - google-chat-webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }} - repository-password: ${{ secrets.ARTIFACTORY_PASSWORD }} - repository-username: ${{ secrets.ARTIFACTORY_USERNAME }} - token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} - sync-to-maven-central: - name: Sync to Maven Central - needs: - - build-and-stage-release - - verify - runs-on: ${{ vars.UBUNTU_SMALL || 'ubuntu-latest' }} - steps: - - name: Check Out Code - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Sync to Maven Central - uses: ./.github/actions/sync-to-maven-central - with: - jfrog-cli-config-token: ${{ secrets.JF_ARTIFACTORY_SPRING }} - ossrh-s01-staging-profile: ${{ secrets.OSSRH_S01_STAGING_PROFILE }} - ossrh-s01-token-password: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }} - ossrh-s01-token-username: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }} - spring-boot-version: ${{ needs.build-and-stage-release.outputs.version }} - promote-release: - name: Promote Release - needs: - - build-and-stage-release - - sync-to-maven-central - runs-on: ${{ vars.UBUNTU_SMALL || 'ubuntu-latest' }} - steps: - - name: Set up JFrog CLI - uses: jfrog/setup-jfrog-cli@9fe0f98bd45b19e6e931d457f4e98f8f84461fb5 # v4.4.1 - env: - JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }} - - name: Promote build - run: jfrog rt build-promote ${{ format('spring-boot-{0}', needs.build-and-stage-release.outputs.version)}} ${{ github.run_number }} libs-release-local - publish-gradle-plugin: - name: Publish Gradle Plugin - needs: - - build-and-stage-release - - sync-to-maven-central - runs-on: ${{ vars.UBUNTU_SMALL || 'ubuntu-latest' }} - steps: - - name: Check Out Code - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Publish - uses: ./.github/actions/publish-gradle-plugin - with: - gradle-plugin-publish-key: ${{ secrets.GRADLE_PLUGIN_PUBLISH_KEY }} - gradle-plugin-publish-secret: ${{ secrets.GRADLE_PLUGIN_PUBLISH_SECRET }} - jfrog-cli-config-token: ${{ secrets.JF_ARTIFACTORY_SPRING }} - plugin-version: ${{ needs.build-and-stage-release.outputs.version }} - publish-to-sdkman: - name: Publish to SDKMAN! - needs: - - build-and-stage-release - - sync-to-maven-central - runs-on: ${{ vars.UBUNTU_SMALL || 'ubuntu-latest' }} - steps: - - name: Check Out Code - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Publish to SDKMAN! - uses: ./.github/actions/publish-to-sdkman - with: - make-default: false - sdkman-consumer-key: ${{ secrets.SDKMAN_CONSUMER_KEY }} - sdkman-consumer-token: ${{ secrets.SDKMAN_CONSUMER_TOKEN }} - spring-boot-version: ${{ needs.build-and-stage-release.outputs.version }} - create-github-release: - name: Create GitHub Release - needs: - - build-and-stage-release - - promote-release - - publish-gradle-plugin - - publish-to-sdkman - runs-on: ${{ vars.UBUNTU_SMALL || 'ubuntu-latest' }} - steps: - - name: Check Out Code - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Create GitHub Release - uses: ./.github/actions/create-github-release - with: - milestone: ${{ needs.build-and-stage-release.outputs.version }} - token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} diff --git a/.github/workflows/run-system-tests.yml b/.github/workflows/run-system-tests.yml deleted file mode 100644 index 43641898b1be..000000000000 --- a/.github/workflows/run-system-tests.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Run System Tests -on: - push: - branches: - - '3.2.x' -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} -jobs: - run-system-tests: - name: 'Java ${{ matrix.java.version}}' - runs-on: ${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} - if: ${{ github.repository == 'spring-projects/spring-boot' }} - strategy: - matrix: - java: - - version: 17 - toolchain: false - - version: 21 - toolchain: true - steps: - - name: Check Out Code - uses: actions/checkout@v4 - - name: Prepare Gradle Build - uses: ./.github/actions/prepare-gradle-build - with: - develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }} - java-version: ${{ matrix.java.version }} - java-toolchain: ${{ matrix.java.toolchain }} - - name: Run System Tests - id: run-system-tests - shell: bash - run: ./gradlew systemTest - - name: Send Notification - uses: ./.github/actions/send-notification - if: always() - with: - webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }} - status: ${{ job.status }} - build-scan-url: ${{ steps.run-system-tests.outputs.build-scan-url }} - run-name: ${{ format('{0} | System Tests | Java {1}', github.ref_name, matrix.java.version) }} \ No newline at end of file diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml deleted file mode 100644 index ca8b9fb09ef9..000000000000 --- a/.github/workflows/verify.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: Verify -on: - workflow_call: - inputs: - version: - required: true - type: string - staging: - required: false - default: false - type: boolean - secrets: - repository-username: - required: false - repository-password: - required: false - google-chat-webhook-url: - required: true - token: - required: true -jobs: - verify: - name: Verify - runs-on: ${{ vars.UBUNTU_SMALL || 'ubuntu-latest' }} - steps: - - name: Check Out Release Verification Tests - uses: actions/checkout@v4 - with: - repository: spring-projects/spring-boot-release-verification - ref: 'v0.0.3' - token: ${{ secrets.token }} - - name: Check Out Send Notification Action - uses: actions/checkout@v4 - with: - path: spring-boot - sparse-checkout: .github/actions/send-notification - - name: Set Up Java - uses: actions/setup-java@v4 - with: - distribution: 'liberica' - java-version: 17 - - name: Set Up Homebrew - uses: Homebrew/actions/setup-homebrew@7657c9512f50e1c35b640971116425935bab3eea - - name: Set Up Gradle - uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0 - with: - cache-read-only: false - - name: Configure Gradle Properties - shell: bash - run: | - mkdir -p $HOME/.gradle - echo 'org.gradle.daemon=false' >> $HOME/.gradle/gradle.properties - - name: Run Release Verification Tests - env: - RVT_VERSION: ${{ inputs.version }} - RVT_RELEASE_TYPE: oss - RVT_STAGING: ${{ inputs.staging }} - RVT_OSS_REPOSITORY_USERNAME: ${{ secrets.repository-username }} - RVT_OSS_REPOSITORY_PASSWORD: ${{ secrets.repository-password }} - run: ./gradlew spring-boot-release-verification-tests:test - - name: Upload Build Reports on Failure - uses: actions/upload-artifact@v4 - if: failure() - with: - name: build-reports - path: '**/build/reports/' - - name: Send Notification - uses: ./spring-boot/.github/actions/send-notification - if: always() - with: - webhook-url: ${{ secrets.google-chat-webhook-url }} - status: ${{ job.status }} - run-name: ${{ format('{0} | Verification | {1}', github.ref_name, inputs.version) }} diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/tracing/zipkin/ZipkinWebClientSenderTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/tracing/zipkin/ZipkinWebClientSenderTests.java index dcfb8616660b..13d21b7a1b48 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/tracing/zipkin/ZipkinWebClientSenderTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/tracing/zipkin/ZipkinWebClientSenderTests.java @@ -199,6 +199,19 @@ void clear() { getResponseQueue().clear(); } + @Override + public MockResponse dispatch(RecordedRequest request) throws InterruptedException { + System.out.println("Dispatching " + request); + MockResponse response = super.dispatch(request); + System.out.println("Responding with " + response); + return response; + } + + @Override + public MockResponse peek() { + return super.peek(); + } + } }