Skip to content

Commit 2844c00

Browse files
Merge branch 'master' into alexeyk/debug-ci-timeout
2 parents 892be19 + 6c38611 commit 2844c00

File tree

5 files changed

+47
-34
lines changed

5 files changed

+47
-34
lines changed

.github/workflows/update-docker-build-image.yaml

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,7 @@ jobs:
2626

2727
- name: Checkout the repository
2828
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29-
- name: Download ghcommit CLI
30-
run: |
31-
curl https://github.com/planetscale/ghcommit/releases/download/v0.1.48/ghcommit_linux_amd64 -o /usr/local/bin/ghcommit -L
32-
chmod +x /usr/local/bin/ghcommit
33-
- name: Pick a branch name
34-
id: define-branch
35-
run: echo "branch=ci/update-docker-build-image-$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
36-
- name: Create branch
37-
run: |
38-
git checkout -b ${{ steps.define-branch.outputs.branch }}
39-
git push -u origin ${{ steps.define-branch.outputs.branch }} --force
40-
- name: Define the Docker build image tage to use
29+
- name: Define the Docker build image tag to use
4130
id: define-tag
4231
run: |
4332
if [ -n "${{ github.event.inputs.tag }}" ]; then
@@ -59,12 +48,38 @@ jobs:
5948
- name: Update the Docker build image in GitLab CI config
6049
run: |
6150
sed -i -E 's|(BUILDER_IMAGE_VERSION_PREFIX:)[^#]*([#].*)|\1 "${{ steps.define-tag.outputs.tag }}-" \2|' .gitlab-ci.yml
51+
- name: Check if changes should be committed
52+
id: check-changes
53+
run: |
54+
if [[ -z "$(git status -s)" ]]; then
55+
echo "No changes to commit, exiting."
56+
echo "commit_changes=false" >> "$GITHUB_OUTPUT"
57+
exit 0
58+
else
59+
echo "commit_changes=true" >> "$GITHUB_OUTPUT"
60+
fi
61+
- name: Download ghcommit CLI
62+
if: steps.check-changes.outputs.commit_changes == 'true'
63+
run: |
64+
curl https://github.com/planetscale/ghcommit/releases/download/v0.1.48/ghcommit_linux_amd64 -o /usr/local/bin/ghcommit -L
65+
chmod +x /usr/local/bin/ghcommit
66+
- name: Pick a branch name
67+
if: steps.check-changes.outputs.commit_changes == 'true'
68+
id: define-branch
69+
run: echo "branch=ci/update-docker-build-image-$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
70+
- name: Create branch
71+
if: steps.check-changes.outputs.commit_changes == 'true'
72+
run: |
73+
git checkout -b ${{ steps.define-branch.outputs.branch }}
74+
git push -u origin ${{ steps.define-branch.outputs.branch }} --force
6275
- name: Commit and push changes
76+
if: steps.check-changes.outputs.commit_changes == 'true'
6377
env:
6478
GITHUB_TOKEN: ${{ steps.octo-sts.outputs.token }}
6579
run: |
6680
ghcommit --repository ${{ github.repository }} --branch ${{ steps.define-branch.outputs.branch }} --add .gitlab-ci.yml --message "feat(ci): Update Docker build image"
6781
- name: Create pull request
82+
if: steps.check-changes.outputs.commit_changes == 'true'
6883
env:
6984
GH_TOKEN: ${{ steps.octo-sts.outputs.token }}
7085
run: |

.github/workflows/update-jmxfetch-submodule.yaml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,37 @@ jobs:
2424
- name: Update Submodule
2525
run: |
2626
git submodule update --remote -- dd-java-agent/agent-jmxfetch/integrations-core
27+
- name: Check if changes should be committed
28+
id: check-changes
29+
run: |
30+
if [[ -z "$(git status -s)" ]]; then
31+
echo "No changes to commit, exiting."
32+
echo "commit_changes=false" >> "$GITHUB_OUTPUT"
33+
exit 0
34+
else
35+
echo "commit_changes=true" >> "$GITHUB_OUTPUT"
36+
fi
2737
- name: Pick a branch name
38+
if: steps.check-changes.outputs.commit_changes == 'true'
2839
id: define-branch
2940
run: echo "branch=ci/update-jmxfetch-submodule-$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
3041
- name: Create branch
42+
if: steps.check-changes.outputs.commit_changes == 'true'
3143
run: |
3244
git checkout -b ${{ steps.define-branch.outputs.branch }}
3345
git push -u origin ${{ steps.define-branch.outputs.branch }} --force
3446
- name: Commit and push changes
47+
if: steps.check-changes.outputs.commit_changes == 'true'
3548
env:
3649
GITHUB_TOKEN: ${{ steps.octo-sts.outputs.token }}
3750
run: |
3851
git config user.name "github-actions[bot]"
3952
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
40-
if [[ -z "$(git status -s)" ]]; then
41-
echo "No changes to commit, exiting."
42-
exit 0;
43-
fi
44-
git checkout -b ${{ steps.define-branch.outputs.branch }}
4553
git add dd-java-agent/agent-jmxfetch/integrations-core
4654
git commit -m "Update agent-jmxfetch submodule"
4755
git push origin ${{ steps.define-branch.outputs.branch }}
4856
- name: Create pull request
57+
if: steps.check-changes.outputs.commit_changes == 'true'
4958
env:
5059
GH_TOKEN: ${{ steps.octo-sts.outputs.token }}
5160
run: |

dd-smoke-tests/log-injection/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ plugins {
44
id 'com.gradleup.shadow'
55
}
66

7-
ext {
8-
// TODO: Fix for Java 25. Gradle Test Executor failed. Update givenGradleVersionIsCompatibleWithCurrentJvm() when Gradle releases Java 25 support: https://docs.gradle.org/current/userguide/compatibility.html#java_runtime
9-
maxJavaVersionForTests = JavaVersion.VERSION_24
10-
}
11-
127
apply from: "$rootDir/gradle/java.gradle"
138
description = 'Log injection Smoke Tests.'
149

@@ -357,6 +352,11 @@ generateTestingJar('Flogger', 'Slf4jToLogbackLatest',
357352

358353
tasks.withType(Test).configureEach {
359354
dependsOn tasks.withType(ShadowJar)
355+
356+
// Runtime.getRuntime().availableProcessors() is used to scale the parallelism by default,
357+
// but it returns weird values in Gitlab/kubernetes, so fix to a specific value when available
358+
def override = System.getenv("RUNTIME_AVAILABLE_PROCESSORS_OVERRIDE")
359+
maxParallelForks = override?.toInteger() ?: Math.max(1, (Runtime.runtime.availableProcessors() / 2).toInteger())
360360
}
361361

362362

dd-smoke-tests/log-injection/src/test/resources/SpockConfig.groovy

Lines changed: 0 additions & 11 deletions
This file was deleted.

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ spock = "2.3-groovy-3.0"
1010
spock24 = "2.4-M6-groovy-3.0"
1111
groovy = "3.0.24"
1212
junit5 = "5.9.2"
13-
logback = "1.2.9"
13+
logback = "1.2.13"
1414
bytebuddy = "1.17.5"
1515
scala = "2.11.12" # Last version to support Java 7 (2.12+ require Java 8+)
1616
scala211 = "2.11.12"

0 commit comments

Comments
 (0)