Skip to content

Commit

Permalink
[release/v1.28.x] backport okio-bom version bump to otel-java (#486)
Browse files Browse the repository at this point in the history
* backport okio-bom version bump to otel-java

* fix patch files

* Fix patch files and versions

* Add java inst to versions

* Fix versions file

* fix inst patch

* Add moar powwaaa

* Setup tests for Vaadin
  • Loading branch information
bryan-aguilar authored Jul 31, 2023
1 parent eaf370a commit 844a3d1
Show file tree
Hide file tree
Showing 6 changed files with 131 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
commit 9ad7e335023493544a02128c75f5ba12532a92eb
Author: Bryan Aguilar <[email protected]>
Date: Fri Jul 28 11:08:04 2023 -0700

Patch instrumentation versions

diff --git a/dependencyManagement/build.gradle.kts b/dependencyManagement/build.gradle.kts
index 39d3c109c2..0caba721a6 100644
--- a/dependencyManagement/build.gradle.kts
+++ b/dependencyManagement/build.gradle.kts
@@ -12,7 +12,7 @@ val dependencyVersions = hashMapOf<String, String>()
rootProject.extra["versions"] = dependencyVersions

// this line is managed by .github/scripts/update-sdk-version.sh
-val otelSdkVersion = "1.28.0"
+val otelSdkVersion = "1.28.0-adot1"
val otelSdkAlphaVersion = otelSdkVersion.replaceFirst("(-SNAPSHOT)?$".toRegex(), "-alpha$1")

// Need both BOM and groovy jars
diff --git a/examples/distro/build.gradle b/examples/distro/build.gradle
index 9a97747771..2dd29a055f 100644
--- a/examples/distro/build.gradle
+++ b/examples/distro/build.gradle
@@ -27,7 +27,7 @@ subprojects {
ext {
versions = [
// this line is managed by .github/scripts/update-sdk-version.sh
- opentelemetrySdk : "1.28.0",
+ opentelemetrySdk : "1.28.0-adot1",

// these lines are managed by .github/scripts/update-version.sh
opentelemetryJavaagent : "1.28.0",
diff --git a/examples/extension/build.gradle b/examples/extension/build.gradle
index 1c25a1e530..39000803bf 100644
--- a/examples/extension/build.gradle
+++ b/examples/extension/build.gradle
@@ -23,7 +23,7 @@ version '1.0'
ext {
versions = [
// this line is managed by .github/scripts/update-sdk-version.sh
- opentelemetrySdk : "1.28.0",
+ opentelemetrySdk : "1.28.0-adot1",

// these lines are managed by .github/scripts/update-version.sh
opentelemetryJavaagent : "1.28.0",
diff --git a/version.gradle.kts b/version.gradle.kts
index cc1414c0bf..c7b1ea682e 100644
--- a/version.gradle.kts
+++ b/version.gradle.kts
@@ -1,5 +1,5 @@
-val stableVersion = "1.28.0"
-val alphaVersion = "1.28.0-alpha"
+val stableVersion = "1.28.0-adot1"
+val alphaVersion = "1.28.0-adot1-alpha"

allprojects {
if (findProperty("otel.stable") != "true") {
45 changes: 45 additions & 0 deletions .github/patches/release/v1.28.x/opentelemetry-java.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
commit 063d3b802112265f64151fb9625d6d6a5b68c7cf
Author: Bryan Aguilar <[email protected]>
Date: Fri Jul 28 10:05:22 2023 -0700

Patch okio and bump version

diff --git a/dependencyManagement/build.gradle.kts b/dependencyManagement/build.gradle.kts
index 917446df7..df564c863 100644
--- a/dependencyManagement/build.gradle.kts
+++ b/dependencyManagement/build.gradle.kts
@@ -17,7 +17,7 @@ val DEPENDENCY_BOMS = listOf(
"com.google.protobuf:protobuf-bom:3.23.4",
"com.linecorp.armeria:armeria-bom:1.24.2",
"com.squareup.okhttp3:okhttp-bom:4.11.0",
- "com.squareup.okio:okio-bom:3.3.0", // applies to transitive dependencies of okhttp
+ "com.squareup.okio:okio-bom:3.4.0", // applies to transitive dependencies of okhttp
"io.grpc:grpc-bom:1.56.1",
"io.netty:netty-bom:4.1.94.Final",
"io.zipkin.brave:brave-bom:5.16.0",
diff --git a/sdk/trace/src/test/java/io/opentelemetry/sdk/trace/SdkSpanBuilderTest.java b/sdk/trace/src/test/java/io/opentelemetry/sdk/trace/SdkSpanBuilderTest.java
index 461ed774c..560706305 100644
--- a/sdk/trace/src/test/java/io/opentelemetry/sdk/trace/SdkSpanBuilderTest.java
+++ b/sdk/trace/src/test/java/io/opentelemetry/sdk/trace/SdkSpanBuilderTest.java
@@ -991,7 +991,7 @@ class SdkSpanBuilderTest {
+ "resource=Resource\\{schemaUrl=null, "
+ "attributes=\\{service.name=\"unknown_service:java\", "
+ "telemetry.sdk.language=\"java\", telemetry.sdk.name=\"opentelemetry\", "
- + "telemetry.sdk.version=\"\\d+.\\d+.\\d+(-rc.\\d+)?(-SNAPSHOT)?\"}}, "
+ + "telemetry.sdk.version=\"\\d+.\\d+.\\d+(-rc.\\d+)?(-[a-zA-Z0-9]+)?\"}}, "
+ "instrumentationScopeInfo=InstrumentationScopeInfo\\{"
+ "name=SpanBuilderSdkTest, version=null, schemaUrl=null, attributes=\\{}}, "
+ "name=span_name, "
diff --git a/version.gradle.kts b/version.gradle.kts
index 1e1986816..32fb83632 100644
--- a/version.gradle.kts
+++ b/version.gradle.kts
@@ -1,7 +1,7 @@
val snapshot = false

allprojects {
- var ver = "1.28.0"
+ var ver = "1.28.0-adot1"
val release = findProperty("otel.release")
if (release != null) {
ver += "-" + release
2 changes: 2 additions & 0 deletions .github/patches/release/v1.28.x/versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
OTEL_JAVA_VERSION=v1.28.0
OTEL_JAVA_INSTRUMENTATION_VERSION=v1.28.0
14 changes: 13 additions & 1 deletion .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,26 @@ permissions:
jobs:
testpatch:
name: Test patches applied to dependencies
runs-on: ubuntu-latest
runs-on: temporary-sizing-testing_ubuntu-latest_64-core
if: ${{ startsWith(github.ref_name, 'release/v') }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
# vaadin 14 tests fail with node 18
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 16

# vaadin tests use pnpm
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-test-cache-pnpm-modules
- uses: gradle/wrapper-validation-action@v1
- uses: ./.github/actions/patch-dependencies
with:
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
jobs:
testpatch:
name: Test patches applied to dependencies
runs-on: ubuntu-latest
runs-on: temporary-sizing-testing_ubuntu-latest_64-core
if: ${{ startsWith(github.event.pull_request.base.ref, 'release/v') }}
steps:
- uses: actions/checkout@v3
Expand All @@ -19,6 +19,18 @@ jobs:
with:
java-version: 17
distribution: temurin
# vaadin 14 tests fail with node 18
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 16

# vaadin tests use pnpm
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-test-cache-pnpm-modules

- uses: gradle/wrapper-validation-action@v1

Expand Down
2 changes: 1 addition & 1 deletion dependencyManagement/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ data class DependencySet(val group: String, val version: String, val modules: Li
val TEST_SNAPSHOTS = rootProject.findProperty("testUpstreamSnapshots") == "true"

// This is the version of the upstream instrumentation BOM
val otelVersion = "1.28.0"
val otelVersion = "1.28.0-adot1"
val otelSnapshotVersion = "1.29.0"

// All versions below are only used in testing and do not affect the released artifact.
Expand Down

0 comments on commit 844a3d1

Please sign in to comment.