Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions loader/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,10 @@ func loadYamlFile(ctx context.Context,

fixEmptyNotNull(cfg)

if !opts.SkipExtends {
err = ApplyExtends(ctx, cfg, opts, ct, processor)
// Process includes first so that extended services have all merged attributes
if !opts.SkipInclude {
included = append(included, file.Filename)
err = ApplyInclude(ctx, workingDir, environment, cfg, opts, included, processor)
if err != nil {
return err
}
Expand All @@ -457,12 +459,13 @@ func loadYamlFile(ctx context.Context,
return err
}

if !opts.SkipInclude {
included = append(included, file.Filename)
err = ApplyInclude(ctx, workingDir, environment, cfg, opts, included, processor)
// Process extends after includes so base services are fully merged
if !opts.SkipExtends {
err = ApplyExtends(ctx, cfg, opts, ct, processor)
if err != nil {
return err
}

}

dict, err = override.Merge(dict, cfg)
Expand Down