-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Too many recursive expansions; Cannot load file by ENV #11679
Comments
@Pwalne Thanks for filing this, it's unclear to me what environment variable you are setting to what value. Could you list the (I think) two configuration files and one environment variable that are involved here? |
If you were to a exporter/processor value to # These are defined inline; You can add it to the block
# processors:
# custom_exporter: ${file:config.yaml}
redis_addr: ${env:REDIS_ADDR}
redis_user: ${env:REDIS_USER}
redis_pass: ${env:REDIS_PASS} it complains about too my recursions, which worked fine prior. I cannot share the exact files we use, but in our specific condition we were setting the ENV via dockerfile with I would think |
@Pwalne Thanks for the additional details. I was not able to reproduce this on my first attempt: My failed attempt at reproducing this (click to expand)File receivers:
otlp: ${env:CONFIG_OTLP_RECEIVER_FILE}
exporters:
nop:
service:
pipelines:
traces:
receivers: [otlp]
exporters: [nop] File protocols:
grpc: Command that I used and logs:
Am I doing something different from your setup? It seems like the problem is not in the "pass a filename through an environment variable and recursively expand" (or at least you would need some extra condition to trigger this). I would need your help to get a minimal working example. One way to go about this is to remove parts of your configuration until you stop getting the error. |
@mx-psi turns out this had todo with the comment we had in our yaml file.
I can't seem to replicate it outside of our configuration, which is wierd or there is something I'm missing that also triggered it. |
Thanks! That's interesting, I think there may be an actual bug here. I suspect the issue is somewhere else but the error message is confusing, some of our recent work made the errors a bit confusing at the edges. Would love to have a minimal example for this, if you are able to share a configuration that reproduces the error after removing any sensitive details that would be great. |
Here is our additional file; For clarity, all env were set other than # These are defined inline; You can add it to the block
# processors:
# workflow: ${file:config.yaml}
redis_addr: ${env:REDIS_ADDR}
redis_user: ${env:REDIS_USER}
redis_pass: ${env:REDIS_PASS}
metrics:
enabled: ${env:METRICS_ENABLED}
addr: ${env:STATSD_ADDR}
system_name: ${env:METRICS_SYSTEM_NAME}
app_name: ${env:METRICS_APP_NAME} it was being used as processors:
workflow: ${env:OTEL_WORKFLOW_CONFIG} I tried to confirm it wasnt just a docker issue, as i changed the line to Our Dockerfile looked something like this FROM alpine:3.20
ARG VERSION=0.0.0
# Apparently alpine uses musl. So we need to symlink it. Blame golang deciding to put a dependency on resolve...
RUN apk add --no-cache gcompat libc6-compat curl
COPY otel-collector /
COPY collector-config.yaml /config.yaml
COPY exporters/workflow/config.yaml /workflow_config.yaml
ENV VERSION=${VERSION}
ENV OTEL_WORKFLOW_CONFIG='${file:/workflow_config.yaml}' Like I said, after removing the comments the issue resolved itself and our integration tests ran fine. This was ran with the |
Describe the bug
Upto, but not limited to v0.98.0, I was able to use a ENV var in the yaml to point to a configuration file to load. It is no longer possible, and gives the error
cannot resolve the configuration: too many recursive expansions
It seems to not play nice with{file:/file.ayml}
at allSteps to reproduce
Use the given configuration, with a ENV pointing to a yaml configuration file for enrichment.
An example was for our own custom exporter, we had additional properties.
What did you expect to see?
Loads the configuration fine
What did you see instead?
cannot resolve the configuration: too many recursive expansions
What version did you use?
v 0.113.0
What config did you use?
Environment
alpine docker image
Additional context
The text was updated successfully, but these errors were encountered: