-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup for release v1.19.0 #242
Changes from all commits
2bbf676
f817552
e03aab1
5668985
7d532d2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
} | ||
repositories { | ||
mavenCentral() | ||
gradlePluginPortal() | ||
mavenLocal() | ||
} | ||
|
||
dependencies { | ||
implementation("com.google.cloud.tools:jib-gradle-plugin:3.3.0") | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package software.amazon.adot | ||
|
||
import com.google.cloud.tools.jib.gradle.JibExtension | ||
|
||
/** | ||
* Utilitary extension function used to configure jib according to flags. Used to avoid having branching in each build | ||
* script. | ||
*/ | ||
fun JibExtension.configureImages(sourceImage:String, destinationImage: String, localDocker: Boolean, multiPlatform: Boolean, tags: Set<String> = setOf<String>()) { | ||
to { | ||
image = destinationImage | ||
if (!tags.isEmpty()) { | ||
this.tags = tags; | ||
} | ||
} | ||
|
||
from { | ||
if (localDocker) { | ||
image = "docker://$sourceImage" | ||
} else { | ||
image = sourceImage | ||
} | ||
|
||
if (multiPlatform) { | ||
platforms { | ||
platform { | ||
architecture = "amd64" | ||
os = "linux" | ||
} | ||
platform { | ||
architecture = "arm64" | ||
os = "linux" | ||
} | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ val otelSnapshotVersion = "1.20.0" | |
|
||
val DEPENDENCY_BOMS = listOf( | ||
"com.amazonaws:aws-java-sdk-bom:1.12.322", | ||
"com.fasterxml.jackson:jackson-bom:2.14.0-rc2", | ||
"com.fasterxml.jackson:jackson-bom:2.13.4.20221013", | ||
"com.google.guava:guava-bom:31.1-jre", | ||
"com.google.protobuf:protobuf-bom:3.21.7", | ||
"com.linecorp.armeria:armeria-bom:1.20.1", | ||
|
@@ -60,7 +60,7 @@ val DEPENDENCY_SETS = listOf( | |
), | ||
DependencySet( | ||
"org.slf4j", | ||
"2.0.3", | ||
"1.7.36", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The issue with using the latest SLF4J API Module. just wondering if it might have to do with this : https://www.slf4j.org/faq.html#changesInVersion200 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is not clear what is the issue a this time, but the entry that you pointed in the faq is related to changes that were introduced in version 2.0 that are new features. I was trusting this statement:
|
||
listOf( | ||
"slf4j-api", | ||
"slf4j-simple" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import software.amazon.adot.configureImages | ||
|
||
plugins { | ||
java | ||
|
||
|
@@ -19,27 +21,20 @@ application { | |
} | ||
|
||
jib { | ||
to { | ||
image = "public.ecr.aws/aws-otel-test/aws-otel-java-spark-awssdkv1" | ||
configureImages( | ||
"public.ecr.aws/aws-otel-test/aws-opentelemetry-java-base:alpha", | ||
"public.ecr.aws/aws-otel-test/aws-otel-java-spark-awssdkv1", | ||
localDocker = rootProject.property("localDocker")!!.equals("true"), | ||
multiPlatform = !rootProject.property("localDocker")!!.equals("true"), | ||
tags = setOf("latest", "${System.getenv("COMMIT_HASH")}") | ||
} | ||
from { | ||
image = "public.ecr.aws/aws-otel-test/aws-opentelemetry-java-base:alpha" | ||
platforms { | ||
platform { | ||
architecture = "amd64" | ||
os = "linux" | ||
} | ||
platform { | ||
architecture = "arm64" | ||
os = "linux" | ||
} | ||
} | ||
} | ||
) | ||
} | ||
|
||
tasks { | ||
named("jib") { | ||
dependsOn(":otelagent:jib") | ||
} | ||
named("jibDockerBuild") { | ||
dependsOn(":otelagent:jibDockerBuild") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as we are aware about the limitation for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, docker daemon is still not able to support multi arch. This change is just forcing us to use jibDockerBuild in integration tests so that we don't need to rely on the artifacts that are published in the main-build Github CI. |
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import software.amazon.adot.configureImages | ||
|
||
plugins { | ||
java | ||
id("org.springframework.boot") | ||
|
@@ -14,27 +16,21 @@ dependencies { | |
} | ||
|
||
jib { | ||
to { | ||
image = "public.ecr.aws/aws-otel-test/aws-otel-java-springboot" | ||
configureImages( | ||
"public.ecr.aws/aws-otel-test/aws-opentelemetry-java-base:alpha", | ||
"public.ecr.aws/aws-otel-test/aws-otel-java-springboot", | ||
rootProject.property("localDocker")!!.equals("true"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Excuse my gradle ignorance but is there a reason that these don't match the changes in other gradle build files by explicitly stating the parameter they are targetting?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. localDocker and multiPlatform applies to the source image. However there are cases where the we want to use a remote image but no multiPlatform. E.g.: for generating this image: aws-opentelemetry-java-base:alpha |
||
!rootProject.property("localDocker")!!.equals("true"), | ||
tags = setOf("latest", "${System.getenv("COMMIT_HASH")}") | ||
} | ||
from { | ||
image = "public.ecr.aws/aws-otel-test/aws-opentelemetry-java-base:alpha" | ||
platforms { | ||
platform { | ||
architecture = "amd64" | ||
os = "linux" | ||
} | ||
platform { | ||
architecture = "arm64" | ||
os = "linux" | ||
} | ||
} | ||
} | ||
) | ||
} | ||
|
||
tasks { | ||
named("jib") { | ||
dependsOn(":otelagent:jib") | ||
} | ||
|
||
named("jibDockerBuild") { | ||
dependsOn(":otelagent:jibDockerBuild") | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are macos and windows tests executed with different gradle inputs than an ubuntu runner?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because they don't support docker.
We were skipping the tests for macos and windows silently because of this:
https://github.com/aws-observability/aws-otel-java-instrumentation/blob/main/smoke-tests/runner/src/test/java/io/awsobservability/instrumentation/smoketests/runner/LogInjectionTest.java#L32
Se we are not running smoke tests in windows and macos anyways. Just building and running some unit tets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted, there are ways we could run docker on MacOS runners. See here. This could possibly be a follow on item if we feel the need to expand test coverage to other operating systems.