@@ -46,19 +46,53 @@ runs:
4646
4747 - name : check patches
4848 run : |
49+ echo "=== CHECKING FOR PATCH FILES ==="
50+ ls -la .github/patches/ || echo "No patches directory found"
51+
4952 if [[ -f .github/patches/opentelemetry-java.patch ]]; then
5053 echo 'patch_otel_java=true' >> $GITHUB_ENV
54+ echo "Found opentelemetry-java.patch"
55+ wc -l .github/patches/opentelemetry-java.patch
56+ else
57+ echo "No opentelemetry-java.patch found"
5158 fi
59+
5260 if [[ -f .github/patches/opentelemetry-java-instrumentation.patch ]]; then
5361 echo 'patch_otel_java_instrumentation=true' >> $GITHUB_ENV
62+ echo "Found opentelemetry-java-instrumentation.patch"
63+ wc -l .github/patches/opentelemetry-java-instrumentation.patch
64+ else
65+ echo "No opentelemetry-java-instrumentation.patch found"
5466 fi
67+
5568 if [[ -f .github/patches/opentelemetry-java-contrib.patch ]]; then
5669 echo 'patch_otel_java_contrib=true' >> $GITHUB_ENV
70+ echo "Found opentelemetry-java-contrib.patch"
71+ wc -l .github/patches/opentelemetry-java-contrib.patch
72+ else
73+ echo "No opentelemetry-java-contrib.patch found"
5774 fi
5875 shell : bash
5976
6077 - name : Clone and patch repositories
61- run : .github/scripts/patch.sh
78+ run : |
79+ echo "=== RUNNING PATCH SCRIPT ==="
80+ echo "Environment variables:"
81+ echo "patch_otel_java: $patch_otel_java"
82+ echo "patch_otel_java_contrib: $patch_otel_java_contrib"
83+ echo "patch_otel_java_instrumentation: $patch_otel_java_instrumentation"
84+
85+ echo "=== CHECKING PATCH SCRIPT ==="
86+ ls -la .github/scripts/patch.sh
87+ head -20 .github/scripts/patch.sh
88+
89+ echo "=== EXECUTING PATCH SCRIPT ==="
90+ set -x
91+ .github/scripts/patch.sh
92+ set +x
93+
94+ echo "=== POST-PATCH DIRECTORY LISTING ==="
95+ ls -la .
6296 if : ${{ env.patch_otel_java == 'true' ||
6397 env.patch_otel_java_contrib == 'true' ||
6498 env.patch_otel_java_instrumentation == 'true' }}
@@ -73,10 +107,25 @@ runs:
73107
74108 - name : Build opentelemetry-java
75109 uses : gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2
76- if : ${{ env.patch_otel_java == 'true' && inputs.run_tests == 'true' }}
110+ if : ${{ env.patch_otel_java == 'true' }}
77111 with :
78112 arguments : publishToMavenLocal --scan --no-daemon
79113 build-root-directory : opentelemetry-java
114+
115+ - name : Debug opentelemetry-java build failures
116+ if : ${{ env.patch_otel_java == 'true' }}
117+ shell : bash
118+ run : |
119+ echo "=== OPENTELEMETRY-JAVA BUILD FAILURE DEBUG ==="
120+ cd opentelemetry-java || exit 1
121+ echo "Directory contents:"
122+ ls -la
123+ echo "=== GRADLE BUILD LOGS ==="
124+ find . -name "*.log" -type f | head -10 | xargs -I {} sh -c 'echo "=== {} ===" && tail -50 "{}"'
125+ echo "=== GRADLE DAEMON LOGS ==="
126+ find ~/.gradle/daemon -name "*.log" -type f | head -5 | xargs -I {} sh -c 'echo "=== {} ===" && tail -20 "{}"'
127+ echo "=== BUILD SCAN URL ==="
128+ grep -r "https://gradle.com/s/" . || echo "No build scan URL found"
80129
81130 - name : cleanup opentelemetry-java
82131 run : rm -rf opentelemetry-java
@@ -92,59 +141,59 @@ runs:
92141
93142 - name : Build opentelemetry-java-contrib
94143 uses : gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2
95- if : ${{ env.patch_otel_java_contrib == 'true' && inputs.run_tests == 'true' }}
144+ if : ${{ env.patch_otel_java_contrib == 'true' }}
96145 with :
97146 arguments : publishToMavenLocal --scan --no-daemon
98147 build-root-directory : opentelemetry-java-contrib
99-
100- - name : Show opentelemetry-java-contrib build failures
101- if : ${{ failure() && env.patch_otel_java_contrib == 'true' }}
148+
149+ - name : Debug opentelemetry-java-contrib build failures
150+ if : ${{ env.patch_otel_java_contrib == 'true' }}
102151 shell : bash
103152 run : |
104- echo "=== OPENTELEMETRY-JAVA-CONTRIB BUILD FAILURES ==="
105- cd opentelemetry-java-contrib
106- find . -name "*.log" -exec grep -l "FAILED\|ERROR\|Exception" {} \; | head -5 | xargs -I {} sh -c 'echo "=== {} ===" && grep -A 5 -B 5 "FAILED\|ERROR\|Exception" "{}"'
107- echo "=== GRADLE BUILD SCAN URL ==="
108- grep -o "https://gradle.com/s/[a-zA-Z0-9]*" build.log || echo "No build scan URL found"
153+ echo "=== OPENTELEMETRY-JAVA-CONTRIB BUILD FAILURE DEBUG ==="
154+ cd opentelemetry-java-contrib || exit 1
155+ echo "Directory contents:"
156+ ls -la
157+ echo "=== GRADLE BUILD LOGS ==="
158+ find . -name "*.log" -type f | head -10 | xargs -I {} sh -c 'echo "=== {} ===" && tail -50 "{}"'
159+ echo "=== TEST FAILURE REPORTS ==="
160+ find . -path "*/build/reports/tests/*/index.html" | head -5 | xargs -I {} dirname {} | xargs -I {} find {} -name "*.html" | head -10
161+ find . -name "TEST-*.xml" | head -5 | xargs -I {} sh -c 'echo "=== {} ===" && grep -A 5 -B 5 "failure\|error" "{}"'
162+ echo "=== COMPILATION ERRORS ==="
163+ find . -name "*.log" -exec grep -l "compilation failed\|cannot find symbol\|package does not exist" {} \; | head -5 | xargs -I {} sh -c 'echo "=== {} ===" && grep -A 10 -B 5 "compilation failed\|cannot find symbol\|package does not exist" "{}"'
164+ echo "=== BUILD SCAN URL ==="
165+ grep -r "https://gradle.com/s/" . || echo "No build scan URL found"
109166
110167 - name : cleanup opentelemetry-java-contrib
111168 run : rm -rf opentelemetry-java-contrib
112169 if : ${{ env.patch_otel_java_contrib == 'true' }}
113170 shell : bash
114171
115- - name : Build opentelemetry-java-instrumentation with tests
116- uses : gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2
117- if : ${{ env.patch_otel_java_instrumentation == 'true' && inputs.run_tests != 'false' }}
118- with :
119- arguments : check -x spotlessCheck publishToMavenLocal --scan --no-daemon
120- build-root-directory : opentelemetry-java-instrumentation
121-
122- - name : Show opentelemetry-java-instrumentation build failures
123- if : ${{ failure() && env.patch_otel_java_instrumentation == 'true' }}
124- shell : bash
125- run : |
126- echo "=== OPENTELEMETRY-JAVA-INSTRUMENTATION BUILD FAILURES ==="
127- cd opentelemetry-java-instrumentation
128- find . -name "*.log" -exec grep -l "FAILED\|ERROR\|Exception" {} \; | head -5 | xargs -I {} sh -c 'echo "=== {} ===" && grep -A 5 -B 5 "FAILED\|ERROR\|Exception" "{}"'
129- echo "=== GRADLE BUILD SCAN URL ==="
130- grep -o "https://gradle.com/s/[a-zA-Z0-9]*" build.log || echo "No build scan URL found"
131-
132- - name : Build opentelemetry java instrumentation
172+ - name : Build opentelemetry-java-instrumentation
133173 uses : gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2
134- if : ${{ env.patch_otel_java_instrumentation == 'true' && inputs.run_tests == 'true' }}
174+ if : ${{ env.patch_otel_java_instrumentation == 'true' }}
135175 with :
136176 arguments : publishToMavenLocal --scan --no-daemon
137177 build-root-directory : opentelemetry-java-instrumentation
138-
139- - name : Show opentelemetry java instrumentation build failures
140- if : ${{ failure() && env.patch_otel_java_instrumentation == 'true' }}
178+
179+ - name : Debug opentelemetry- java- instrumentation build failures
180+ if : ${{ env.patch_otel_java_instrumentation == 'true' }}
141181 shell : bash
142182 run : |
143- echo "=== OPENTELEMETRY-JAVA-INSTRUMENTATION BUILD FAILURES ==="
144- cd opentelemetry-java-instrumentation
145- find . -name "*.log" -exec grep -l "FAILED\|ERROR\|Exception" {} \; | head -5 | xargs -I {} sh -c 'echo "=== {} ===" && grep -A 5 -B 5 "FAILED\|ERROR\|Exception" "{}"'
146- echo "=== GRADLE BUILD SCAN URL ==="
147- grep -o "https://gradle.com/s/[a-zA-Z0-9]*" build.log || echo "No build scan URL found"
183+ echo "=== OPENTELEMETRY-JAVA-INSTRUMENTATION BUILD FAILURE DEBUG ==="
184+ cd opentelemetry-java-instrumentation || exit 1
185+ echo "Directory contents:"
186+ ls -la
187+ echo "=== GRADLE BUILD LOGS ==="
188+ find . -name "*.log" -type f | head -10 | xargs -I {} sh -c 'echo "=== {} ===" && tail -50 "{}"'
189+ echo "=== DEPENDENCY RESOLUTION ERRORS ==="
190+ find . -name "*.log" -exec grep -l "Could not resolve\|Could not find\|dependency.*failed" {} \; | head -5 | xargs -I {} sh -c 'echo "=== {} ===" && grep -A 10 -B 5 "Could not resolve\|Could not find\|dependency.*failed" "{}"'
191+ echo "=== COMPILATION ERRORS ==="
192+ find . -name "*.log" -exec grep -l "compilation failed\|cannot find symbol\|package does not exist" {} \; | head -5 | xargs -I {} sh -c 'echo "=== {} ===" && grep -A 10 -B 5 "compilation failed\|cannot find symbol\|package does not exist" "{}"'
193+ echo "=== MAVEN LOCAL CONTENTS ==="
194+ ls -la ~/.m2/repository/io/opentelemetry/ || echo "No opentelemetry artifacts in maven local"
195+ echo "=== BUILD SCAN URL ==="
196+ grep -r "https://gradle.com/s/" . || echo "No build scan URL found"
148197
149198 - name : cleanup opentelmetry-java-instrumentation
150199 run : rm -rf opentelemetry-java-instrumentation
0 commit comments