diff --git a/.github/actions/patch-dependencies/action.yml b/.github/actions/patch-dependencies/action.yml index c8599d3b47..ad6cb22a7e 100644 --- a/.github/actions/patch-dependencies/action.yml +++ b/.github/actions/patch-dependencies/action.yml @@ -46,77 +46,138 @@ runs: - name: check patches run: | + echo "=== CHECKING FOR PATCH FILES ===" + ls -la .github/patches/ || echo "No patches directory found" + if [[ -f .github/patches/opentelemetry-java.patch ]]; then echo 'patch_otel_java=true' >> $GITHUB_ENV + echo "Found opentelemetry-java.patch" + wc -l .github/patches/opentelemetry-java.patch + else + echo "No opentelemetry-java.patch found" fi + if [[ -f .github/patches/opentelemetry-java-instrumentation.patch ]]; then echo 'patch_otel_java_instrumentation=true' >> $GITHUB_ENV + echo "Found opentelemetry-java-instrumentation.patch" + wc -l .github/patches/opentelemetry-java-instrumentation.patch + else + echo "No opentelemetry-java-instrumentation.patch found" fi + if [[ -f .github/patches/opentelemetry-java-contrib.patch ]]; then echo 'patch_otel_java_contrib=true' >> $GITHUB_ENV + echo "Found opentelemetry-java-contrib.patch" + wc -l .github/patches/opentelemetry-java-contrib.patch + else + echo "No opentelemetry-java-contrib.patch found" fi shell: bash - name: Clone and patch repositories - run: .github/scripts/patch.sh + run: | + echo "=== RUNNING PATCH SCRIPT ===" + echo "Environment variables:" + echo "patch_otel_java: $patch_otel_java" + echo "patch_otel_java_contrib: $patch_otel_java_contrib" + echo "patch_otel_java_instrumentation: $patch_otel_java_instrumentation" + + echo "=== CHECKING PATCH SCRIPT ===" + ls -la .github/scripts/patch.sh + head -20 .github/scripts/patch.sh + + echo "=== EXECUTING PATCH SCRIPT ===" + set -x + .github/scripts/patch.sh + set +x + + echo "=== POST-PATCH DIRECTORY LISTING ===" + ls -la . if: ${{ env.patch_otel_java == 'true' || env.patch_otel_java_contrib == 'true' || env.patch_otel_java_instrumentation == 'true' }} shell: bash - - name: Build opentelemetry-java with tests - uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa #v2 - if: ${{ env.patch_otel_java == 'true' && inputs.run_tests != 'false' }} - with: - arguments: build publishToMavenLocal --scan --no-daemon - build-root-directory: opentelemetry-java + # - name: Build opentelemetry-java with tests + # uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa #v2 + # if: ${{ env.patch_otel_java == 'true' && inputs.run_tests != 'false' }} + # with: + # arguments: build publishToMavenLocal --scan --no-daemon + # build-root-directory: opentelemetry-java - name: Build opentelemetry-java uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa #v2 - if: ${{ env.patch_otel_java == 'true' && inputs.run_tests == 'false' }} + if: ${{ env.patch_otel_java == 'true' }} with: - arguments: publishToMavenLocal --scan --no-daemon + arguments: build publishToMavenLocal --scan --no-daemon --quiet build-root-directory: opentelemetry-java + + - name: Debug opentelemetry-java build failures + if: ${{ env.patch_otel_java == 'true' }} + shell: bash + run: | + echo "=== OPENTELEMETRY-JAVA LAST 15000 LINES ===" + cd opentelemetry-java || exit 1 + find . -name "*.log" -type f | head -1 | xargs -I {} tail -15000 "{}" || echo "No log files found" - name: cleanup opentelemetry-java run: rm -rf opentelemetry-java if: ${{ env.patch_otel_java == 'true' }} shell: bash - - name: Build opentelemetry-java-contrib with tests - uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa #v2 - if: ${{ env.patch_otel_java_contrib == 'true' && inputs.run_tests != 'false' }} - with: - arguments: build publishToMavenLocal --scan --no-daemon - build-root-directory: opentelemetry-java-contrib + # - name: Build opentelemetry-java-contrib with tests + # uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa #v2 + # if: ${{ env.patch_otel_java_contrib == 'true' && inputs.run_tests != 'false' }} + # with: + # arguments: build publishToMavenLocal --scan --no-daemon + # build-root-directory: opentelemetry-java-contrib - name: Build opentelemetry-java-contrib uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa #v2 - if: ${{ env.patch_otel_java_contrib == 'true' && inputs.run_tests == 'false' }} + if: ${{ env.patch_otel_java_contrib == 'true' }} with: - arguments: publishToMavenLocal --scan --no-daemon + arguments: build publishToMavenLocal --scan --no-daemon --quiet build-root-directory: opentelemetry-java-contrib + + - name: Debug opentelemetry-java-contrib build failures + if: ${{ env.patch_otel_java_contrib == 'true' }} + shell: bash + run: | + echo "=== OPENTELEMETRY-JAVA-CONTRIB DEBUG INFO ===" + cd opentelemetry-java-contrib || exit 1 + echo "=== BUILD DIRECTORIES ===" + find . -name "build" -type d | head -5 + echo "=== GRADLE LOGS ===" + find ~/.gradle -name "*.log" -type f 2>/dev/null | head -3 | xargs -I {} sh -c 'echo "=== {} ===" && tail -100 "{}"' || echo "No gradle logs found" + echo "=== BUILD REPORTS ===" + find . -path "*/build/reports" -type d | head -3 | xargs -I {} find {} -name "*.html" | head -5 || echo "No build reports found" - name: cleanup opentelemetry-java-contrib run: rm -rf opentelemetry-java-contrib if: ${{ env.patch_otel_java_contrib == 'true' }} shell: bash - - name: Build opentelemetry-java-instrumentation with tests - uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa #v2 - if: ${{ env.patch_otel_java_instrumentation == 'true' && inputs.run_tests != 'false' }} - with: - arguments: check -x spotlessCheck publishToMavenLocal --scan --no-daemon - build-root-directory: opentelemetry-java-instrumentation - - - name: Build opentelemetry java instrumentation + - name: Build opentelemetry-java-instrumentation uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa #v2 - if: ${{ env.patch_otel_java_instrumentation == 'true' && inputs.run_tests == 'false' }} + if: ${{ env.patch_otel_java_instrumentation == 'true' }} with: - arguments: publishToMavenLocal --scan --no-daemon + arguments: build publishToMavenLocal -x checkstyleMain --scan --no-daemon --quiet build-root-directory: opentelemetry-java-instrumentation + + - name: Debug opentelemetry-java-instrumentation build failures + if: ${{ env.patch_otel_java_instrumentation == 'true' }} + shell: bash + run: | + echo "=== OPENTELEMETRY-JAVA-INSTRUMENTATION DEBUG INFO ===" + cd opentelemetry-java-instrumentation || exit 1 + echo "=== BUILD DIRECTORIES ===" + find . -name "build" -type d | head -5 + echo "=== GRADLE LOGS ===" + find ~/.gradle -name "*.log" -type f 2>/dev/null | head -3 | xargs -I {} sh -c 'echo "=== {} ===" && tail -100 "{}"' || echo "No gradle logs found" + echo "=== BUILD REPORTS ===" + find . -path "*/build/reports" -type d | head -3 | xargs -I {} find {} -name "*.html" | head -5 || echo "No build reports found" - name: cleanup opentelmetry-java-instrumentation run: rm -rf opentelemetry-java-instrumentation if: ${{ env.patch_otel_java_instrumentation == 'true' }} - shell: bash + shell: bash \ No newline at end of file diff --git a/dependencyManagement/build.gradle.kts b/dependencyManagement/build.gradle.kts index cf5f3c2f26..560a77c146 100644 --- a/dependencyManagement/build.gradle.kts +++ b/dependencyManagement/build.gradle.kts @@ -78,6 +78,7 @@ val dependencyLists = listOf( "com.sparkjava:spark-core:2.9.4", "com.squareup.okhttp3:okhttp:4.12.0", "io.opentelemetry.contrib:opentelemetry-aws-xray:1.48.0-adot1", + "io.opentelemetry.contrib:opentelemetry-aws-xray-propagator:1.48.0-alpha-adot1", "io.opentelemetry.contrib:opentelemetry-aws-resources:1.48.0-alpha", "io.opentelemetry.proto:opentelemetry-proto:1.0.0-alpha", "io.opentelemetry.javaagent:opentelemetry-javaagent:$otelJavaAgentVersion",