Skip to content

fix extraction of variables#811

Merged
glours merged 1 commit intocompose-spec:mainfrom
krjakbrjak:VNI-fix-variables-extraction
Jul 23, 2025
Merged

fix extraction of variables#811
glours merged 1 commit intocompose-spec:mainfrom
krjakbrjak:VNI-fix-variables-extraction

Conversation

@krjakbrjak
Copy link
Contributor

This fixes the problem of extracting variables from a list of maps. Currently, variables from such an entity would be ignored. A simple way of reproduce this is to execute the following command:

docker compose -f docker-compose.volumes.yml config --variables

The content of docker-compose.volumes.yml is:

services:
    postgres:
        environment:
            POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
            POSTGRES_USER: postgres
        image: postgres
        volumes:
            - ${CERT_FILE}:/certs/server.crt:ro

The output will be:

NAME                REQUIRED            DEFAULT VALUE       ALTERNATE VALUE
POSTGRES_PASSWORD   false               postgres            

CERT_FILE is missing. Internally, the volumes will be represented as volumes:[map[read_only:true source:${CERT_FILE} target:/certs/server.crt type:volume volume:map[]]] .

Signed-off-by: Nikita Vakula <[email protected]>
@krjakbrjak krjakbrjak requested a review from ndeloof as a code owner July 21, 2025 18:58
Copy link
Collaborator

@glours glours left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@glours glours merged commit aa1ee1a into compose-spec:main Jul 23, 2025
8 checks passed
@krjakbrjak krjakbrjak deleted the VNI-fix-variables-extraction branch July 23, 2025 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants