Pin otel/opentelemetry-collector-contrib:latest to versioned image (#2347)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: trask <218610+trask@users.noreply.github.com>
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
This commit is contained in:
Copilot 2025-10-13 09:52:25 -07:00 committed by GitHub
parent c89ef28005
commit 7aebc1b1e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 1 deletions

View File

@ -4,6 +4,8 @@
'config:best-practices',
'helpers:pinGitHubActionDigestsToSemver',
],
ignorePaths: [], // overwrite default ignore which includes **/test/**
// used to update docker image versions used in Java test files
ignorePresets: [
':ignoreModulesAndTests', // needed to keep maven-extension test pom files up-to-date
'workarounds:javaLTSVersions', // Allow all Java major versions, not just LTS
@ -243,5 +245,17 @@
'"https://github.com/(?<depName>[^/]+/[^/]+)/zipball/(?<currentValue>.+?)"',
],
},
{
customType: 'regex',
datasourceTemplate: 'docker',
managerFilePatterns: [
'**/*.java',
],
matchStrings: [
'"(?<depName>otel/opentelemetry-collector-contrib):(?<currentValue>[^@"]+)(?:@(?<currentDigest>sha256:[a-f0-9]+))?"',
],
autoReplaceStringTemplate: '"{{depName}}:{{newValue}}{{#if newDigest}}@{{newDigest}}{{/if}}"',
versioningTemplate: 'docker',
},
],
}

View File

@ -39,7 +39,7 @@ class AwsXrayRemoteSamplerIntegrationTest {
@Container
private static final GenericContainer<?> otelCollector =
new GenericContainer<>(DockerImageName.parse("otel/opentelemetry-collector-contrib:latest"))
new GenericContainer<>(DockerImageName.parse("otel/opentelemetry-collector-contrib:0.136.0"))
.withExposedPorts(13133, 2000)
.waitingFor(Wait.forHttp("/").forPort(13133))
.withLogConsumer(new Slf4jLogConsumer(LoggerFactory.getLogger("otel-collector")))