Skip to content

Commit 9c9926a

Browse files
committed
updated scripts to remove instrumentation patch
1 parent 5a5d794 commit 9c9926a

File tree

5 files changed

+2
-65
lines changed

5 files changed

+2
-65
lines changed

.github/actions/patch-dependencies/action.yml

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: "Patch dependencies"
22
description: |
33
Patches direct dependencies of this project leveraging maven local to publish the results.
44
5-
This workflow supports patching opentelemetry-java and opentelemetry-java-instrumentation repositories by executing
5+
This workflow supports patching opentelemetry-java and opentelemetry-java-contrib repositories by executing
66
the `patch.sh` script that will try to patch those repositories and after that will optionally test and then publish
77
the artifacts to maven local.
88
To add a patch you have to add a file in the `.github/patches/` directory with the name of the repository that must
@@ -49,9 +49,6 @@ runs:
4949
if [[ -f .github/patches/opentelemetry-java.patch ]]; then
5050
echo 'patch_otel_java=true' >> $GITHUB_ENV
5151
fi
52-
if [[ -f .github/patches/opentelemetry-java-instrumentation.patch ]]; then
53-
echo 'patch_otel_java_instrumentation=true' >> $GITHUB_ENV
54-
fi
5552
if [[ -f .github/patches/opentelemetry-java-contrib.patch ]]; then
5653
echo 'patch_otel_java_contrib=true' >> $GITHUB_ENV
5754
fi
@@ -60,7 +57,6 @@ runs:
6057
- name: Clone and patch repositories
6158
run: .github/scripts/patch.sh
6259
if: ${{ env.patch_otel_java == 'true' ||
63-
env.patch_otel_java_instrumentation == 'true' ||
6460
env.patch_otel_java_contrib == 'true' }}
6561
shell: bash
6662

@@ -101,22 +97,3 @@ runs:
10197
run: rm -rf opentelemetry-java-contrib
10298
if: ${{ env.patch_otel_java_contrib == 'true' }}
10399
shell: bash
104-
105-
- name: Build opentelemetry-java-instrumentation with tests
106-
uses: gradle/gradle-build-action@v2
107-
if: ${{ env.patch_otel_java_instrumentation == 'true' && inputs.run_tests != 'false' }}
108-
with:
109-
arguments: check -x spotlessCheck publishToMavenLocal
110-
build-root-directory: opentelemetry-java-instrumentation
111-
112-
- name: Build opentelemetry java instrumentation
113-
uses: gradle/gradle-build-action@v2
114-
if: ${{ env.patch_otel_java_instrumentation == 'true' && inputs.run_tests == 'false' }}
115-
with:
116-
arguments: publishToMavenLocal
117-
build-root-directory: opentelemetry-java-instrumentation
118-
119-
- name: cleanup opentelmetry-java-instrumentation
120-
run: rm -rf opentelemetry-java-instrumentation
121-
if: ${{ env.patch_otel_java_instrumentation == 'true' }}
122-
shell: bash

.github/patches/versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
OTEL_JAVA_INSTRUMENTATION_VERSION=v2.11.0
12
OTEL_JAVA_CONTRIB_VERSION=v1.39.0

.github/scripts/patch.sh

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ set -x -e -u
66
# This is used so that we can properly clone the upstream repositories.
77
# This file should define the following variables:
88
# OTEL_JAVA_VERSION. Tag of the opentelemetry-java repository to use. E.g.: JAVA_OTEL_JAVA_VERSION=v1.21.0
9-
# OTEL_JAVA_INSTRUMENTATION_VERSION. Tag of the opentelemetry-java-instrumentation repository to use, e.g.: OTEL_JAVA_INSTRUMENTATION_VERSION=v1.21.0
109
# OTEL_JAVA_CONTRIB_VERSION. Tag of the opentelemetry-java-contrib repository. E.g.: OTEL_JAVA_CONTRIB_VERSION=v1.21.0
1110
# This script will fail if a variable that is supposed to exist is referenced.
1211

@@ -45,16 +44,3 @@ if [[ -f "$OTEL_JAVA_CONTRIB_PATCH" ]]; then
4544
else
4645
echo "Skipping patching opentelemetry-java-contrib"
4746
fi
48-
49-
50-
OTEL_JAVA_INSTRUMENTATION_PATCH=".github/patches/opentelemetry-java-instrumentation.patch"
51-
if [[ -f "$OTEL_JAVA_INSTRUMENTATION_PATCH" ]]; then
52-
git clone https://github.com/open-telemetry/opentelemetry-java-instrumentation.git
53-
cd opentelemetry-java-instrumentation
54-
git checkout ${OTEL_JAVA_INSTRUMENTATION_VERSION} -b tag-${OTEL_JAVA_INSTRUMENTATION_VERSION}
55-
patch -p1 < "../${OTEL_JAVA_INSTRUMENTATION_PATCH}"
56-
git commit -a -m "ADOT Patch release"
57-
cd -
58-
else
59-
echo "Skipping patching opentelemetry-java-instrumentation"
60-
fi

lambda-layer/build-layer.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ git clone https://github.com/open-telemetry/opentelemetry-java-instrumentation.g
2222
pushd opentelemetry-java-instrumentation
2323
git checkout v${version} -b tag-v${version}
2424

25-
# There is another patch in the .github/patches directory for other changes. We should apply them too for consistency.
26-
patch -p1 < "$SOURCEDIR"/../.github/patches/opentelemetry-java-instrumentation.patch
27-
2825
# This patch is for Lambda related context propagation
2926
patch -p1 < "$SOURCEDIR"/patches/opentelemetry-java-instrumentation.patch
3027

scripts/local_patch.sh

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -56,28 +56,4 @@ if [[ -f "$OTEL_JAVA_CONTRIB_PATCH" ]]; then
5656
rm -rf opentelemetry-java-contrib
5757
else
5858
echo "Skipping patching opentelemetry-java-contrib"
59-
fi
60-
61-
62-
# Patching opentelemetry-java-instrumentation
63-
OTEL_JAVA_INSTRUMENTATION_PATCH=".github/patches/opentelemetry-java-instrumentation.patch"
64-
if [[ -f "$OTEL_JAVA_INSTRUMENTATION_PATCH" ]]; then
65-
echo "Patching opentelemetry-java-instrumentation"
66-
git clone https://github.com/open-telemetry/opentelemetry-java-instrumentation.git
67-
cd opentelemetry-java-instrumentation
68-
69-
echo "Checking out tag ${OTEL_JAVA_INSTRUMENTATION_VERSION}"
70-
git checkout ${OTEL_JAVA_INSTRUMENTATION_VERSION} -b tag-${OTEL_JAVA_INSTRUMENTATION_VERSION}
71-
patch -p1 < "../${OTEL_JAVA_INSTRUMENTATION_PATCH}"
72-
git commit -a -m "ADOT Patch release"
73-
74-
echo "Building patched opentelemetry-java-instrumentation"
75-
./gradlew clean assemble
76-
./gradlew publishToMavenLocal
77-
cd -
78-
79-
echo "Cleaning up opentelemetry-java-instrumentation"
80-
rm -rf opentelemetry-java-instrumentation
81-
else
82-
echo "Skipping patching opentelemetry-java-instrumentation"
8359
fi

0 commit comments

Comments
 (0)