Skip to content

bake: only validate build property in compose file services #3288

@crazy-max

Description

@crazy-max

relates to:

When new properties are added to the compose spec, Bake might fail to build them as the validation is not yet aware of them unless the compose-go dependency is updated and a new release of Buildx made. We should just validate the build property that is the only part we are using with bake to prevent such issues.

@ndeloof @glours Would it be possible to have an option in the loader to just validate specific properties?:

buildx/bake/compose.go

Lines 44 to 52 in 758ea75

}, func(options *loader.Options) {
projectName := "bake"
if v, ok := envs[consts.ComposeProjectName]; ok && v != "" {
projectName = v
}
options.SetProjectName(projectName, false)
options.SkipNormalization = true
options.Profiles = []string{"*"}
})

Maybe smth like ValidateBuildOnly or SkipUnknown?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions