Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bake(compose): fix unskipped services without build context #1277

Merged
merged 3 commits into from
Aug 18, 2022

Conversation

crazy-max
Copy link
Member

@crazy-max crazy-max commented Aug 17, 2022

fixes #1276

while fixing compose consistency check in #1181 a regression was introduced where services without build context were taken into account.

it was not detected because our test TestNoBuildOutOfTreeService was not checking the targets length:

func TestNoBuildOutOfTreeService(t *testing.T) {
var dt = []byte(`
services:
external:
image: "verycooldb:1337"
webapp:
build: ./db
`)
c, err := ParseCompose(dt, nil)
require.NoError(t, err)
require.Equal(t, 1, len(c.Groups))
}

by fixing this issue we now remove the ability to merge compose files without a build context #1172. To fix this we now parse compose files all together so the compose-go library can handle a proper sanity check on its side.

Signed-off-by: CrazyMax [email protected]

bake/hcl.go Outdated Show resolved Hide resolved
bake/bake.go Outdated Show resolved Hide resolved
@crazy-max crazy-max force-pushed the fix-compose-merge branch 2 times, most recently from 1d43a00 to dcd5bc0 Compare August 17, 2022 13:27
@jedevc jedevc self-requested a review August 17, 2022 14:08
@crazy-max crazy-max force-pushed the fix-compose-merge branch 2 times, most recently from 46abd53 to bdbc53a Compare August 17, 2022 20:41
bake/bake.go Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bake Error: "Failed to read Dockerfile" since 0.9.0 update
3 participants