Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,15 @@ if [[ "$BUILDKITE_COMMAND" =~ .*"upload".* ]]; then
exit 0
fi

# Run always
source .buildkite/hooks/prepare-common.sh
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since I changed when to install things, I ran the snapshot workflow manually:

In addition, I'm also validating these changes in the Buildkite pipeline:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was the snapshot actually run on this branch?
According to the logs it still ran on Java 17 and I can't see how this would be the case with this PR:

Java version: 17.0.2, vendor: Oracle Corporation, runtime: /usr/java/openjdk17

We will need to stick to Java 17 for building the agent for Java 7 support.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change won't affect snapshot/releases Buildkite pipelines but the opentelemetry benchmark only:

image

the it failed with


> Task :smoke-tests-otel-starter:spring-smoke-testing:bootJar FAILED
--
  |  
  | FAILURE: Build failed with an exception.
  |  
  | * What went wrong:
  | Execution failed for task ':smoke-tests-otel-starter:spring-smoke-testing:bootJar'.
  | > Error while evaluating property 'mainClass' of task ':smoke-tests-otel-starter:spring-smoke-testing:bootJar'.
  | > Failed to calculate the value of task ':smoke-tests-otel-starter:spring-smoke-testing:bootJar' property 'mainClass'.
  | > Main class name has not been configured and it could not be resolved


when running

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok then I don't see a reason why this shouldn't work, if this only affects the benchmark. @jackshirazi ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, let's go ahead


if [ "$BUILDKITE_PIPELINE_SLUG" == "apm-agent-java-opentelemetry-benchmark" ]; then
source .buildkite/hooks/prepare-benchmark.sh
# NOTE: https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/11323 might
# support .java-version, if so then it might be worthy to read the file.
JAVA_VERSION=21
source .buildkite/hooks/prepare-common.sh
fi

if [ "$BUILDKITE_PIPELINE_SLUG" == "apm-agent-java-snapshot" ]; then
Expand All @@ -25,6 +32,3 @@ fi
if [ "$BUILDKITE_PIPELINE_SLUG" == "apm-agent-java-release" ]; then
source .buildkite/hooks/prepare-release.sh
fi

# Run always
source .buildkite/hooks/prepare-common.sh
4 changes: 3 additions & 1 deletion .buildkite/hooks/prepare-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
set -eo pipefail

# Configure the java version
JAVA_VERSION=$(cat .java-version | xargs | tr -dc '[:print:]')
if [ -z "$JAVA_VERSION" ] ; then
JAVA_VERSION=$(cat .java-version | xargs | tr -dc '[:print:]')
fi
set +u
# In case the HOME is not available in the context of the runner.
if [ -z "${HOME}" ] ; then
Expand Down