You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Got error "Expected to decode Int but found Scalar instead." if i use an env var in an assignment to "replicas" #95
Error: DecodingError.typeMismatch: expected value of type Int. Path: services.<oo.deploy.replicas. Debug description: Expected to decode Int but found Scalar instead.
when running
container-compose up --env-file .env -f compose.yml
Relevant parts of the Docker compose yaml looks like this
deploy:
mode: replicated
replicas: ${CORES}
and in .env is
CORES=1
(not CORES="1")
I assume the Decoder looks at this before the variable is resolved...?
So it seed the string "${CORES}" instead of the "1", as the value, from the .env file?
Can i work around this somehow? (other than hard coding the values in the compose file...)
This is a very confusing parsing issue since it should be able to parse 1 as an Integer. I will look into this in the coming weeks. For now, I am curious if replacing ${CORES}in the compose file fixes the issue.
Similarly, CC also seems to assume volumes list can only consist of string items and not volume objects (which are valid in docker-compose files).
Example:
Activity
Mcrich23 commentedon May 29, 2026
This is a very confusing parsing issue since it should be able to parse
1as an Integer. I will look into this in the coming weeks. For now, I am curious if replacing${CORES}in the compose file fixes the issue.danekszy commentedon Jul 7, 2026
Similarly, CC also seems to assume volumes list can only consist of string items and not volume objects (which are valid in docker-compose files).
Example:
...producing type error...
Not sure whether that info is worthy of creating another issue or not... Let me know if you'd like me to create one for that... ;)
mvanhorn commentedon Jul 10, 2026
Implemented in #129.
fix: tolerate env-var placeholders and quoted scalars in deploy.repli…