Skip to content

Add regression test for extends+include inheritance#13623

Open
infraAnchor wants to merge 1 commit intodocker:mainfrom
infraAnchor:13606-fix-extends-include-inheritance
Open

Add regression test for extends+include inheritance#13623
infraAnchor wants to merge 1 commit intodocker:mainfrom
infraAnchor:13606-fix-extends-include-inheritance

Conversation

@infraAnchor
Copy link

Fixes #13606

Add test to verify that services using 'extends' properly inherit environment variables from base services when those base services get attributes from an 'include' directive.

Test Scenario:

  • compose.a.yml defines a web service with environment variable A
  • compose.b.yml includes compose.a.yml and defines a worker service that extends the web service with additional variables B and C

Expected:
The worker service should inherit all three variables (A, B, C), not just the ones defined locally (B, C).

Note:
This test will pass once compose-spec/compose-go processes includes before extends. Related PR pending in compose-go repository.

Fixes docker#13606

Add test to verify that services using 'extends' properly inherit
environment variables from base services when those base services
get attributes from an 'include' directive.

The test creates a scenario where:
- compose.a.yml defines a web service with environment variable A
- compose.b.yml includes compose.a.yml and defines a worker service
  that extends the web service with additional variables B and C

The worker service should inherit all three variables (A, B, C),
not just the ones defined locally (B, C).

This test will pass once compose-go processes includes before extends.

Signed-off-by: infraanchor <olaitanfalolu02@gmail.com>
@infraAnchor infraAnchor requested a review from a team as a code owner March 6, 2026 16:54
@infraAnchor infraAnchor requested review from glours and ndeloof March 6, 2026 16:54
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.

[BUG] service.extends doesn't resolve includes

1 participant