Repository navigation
fix: elastic-otel jq filter fails on jq 1.6 (cflinuxfs4) - #1489
Merged
Merged
Conversation
`label` is a reserved keyword in jq 1.6, so `.key as $label` is a syntax error there. jq 1.7 (cflinuxfs5) accepts it. On cflinuxfs4 the profile.d script could not resolve OTEL_EXPORTER_OTLP_HEADERS from VCAP_SERVICES. Rename the variable to $service_label.
kiril-keranov
approved these changes
Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
specs-unitfails on main since #1360 was merged (build 230):The runtime jq filter in
elastic_otel_java_agent.shuses.key as $label.labelis a reserved keyword in jq 1.6, so the filter does not compile:jq 1.7 accepts keywords as variable names, which is why the spec passes locally and on cflinuxfs5. The CI image (
cfbuildpacks/ci) and cflinuxfs4 ship jq 1.6, so on cflinuxfs4 appsOTEL_EXPORTER_OTLP_HEADERSis never resolved fromVCAP_SERVICES(only a warning is printed).Fix
Rename
$labelto$service_label. No other jq variables in the buildpack use reserved keywords.Testing
go test ./src/java/frameworks/insidecfbuildpacks/ci(jq 1.6): failed before, passes after.docker run cloudfoundry/cflinuxfs4 jq --versionshowsjq-1.6; cflinuxfs5 showsjq-1.7.