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

patch: build.go access custom labels directly cause panic #9810

Merged
merged 1 commit into from
Sep 6, 2022

Conversation

RiskyFeryansyahP
Copy link
Contributor

This change fixes the panic: assignment to entry in nil map error when want to assigning value to CustomLabel. I think this related to this PR that forgot to change this line code too.

What I did

Related issue
Error that got me here:

panic: assignment to entry in nil map

goroutine 10 [running]:
github.com/docker/compose/v2/pkg/compose.(*composeService).ensureImagesExists(0x1400003d0c0?, {0x1030de670, 0x1400045be90}, 0x1400044e3c0, 0x0)
        /Users/ruangguru/Go/pkg/mod/github.com/docker/compose/[email protected]/pkg/compose/build.go:141 +0x3a4
github.com/docker/compose/v2/pkg/compose.(*composeService).create(0x1400003d0c0?, {0x1030de670, 0x1400045be90}, 0x1400044e3c0, {{0x1400003d100, 0x1, 0x1}, 0x0, 0x0, {0x102c2558c, ...}, ...})
        /Users/ruangguru/Go/pkg/mod/github.com/docker/compose/[email protected]/pkg/compose/create.go:67 +0x114
github.com/docker/compose/v2/pkg/compose.(*composeService).Create.func1({0x1030de670?, 0x1400045be90?})
        /Users/ruangguru/Go/pkg/mod/github.com/docker/compose/[email protected]/pkg/compose/create.go:52 +0x6c
github.com/docker/compose/v2/pkg/progress.Run.func1({0x1030de670?, 0x1400045be90?})
        /Users/ruangguru/Go/pkg/mod/github.com/docker/compose/[email protected]/pkg/progress/writer.go:61 +0x30
github.com/docker/compose/v2/pkg/progress.RunWithStatus.func2()
        /Users/ruangguru/Go/pkg/mod/github.com/docker/compose/[email protected]/pkg/progress/writer.go:82 +0x7c
golang.org/x/sync/errgroup.(*Group).Go.func1()
        /Users/ruangguru/Go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x60
created by golang.org/x/sync/errgroup.(*Group).Go
        /Users/ruangguru/Go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:72 +0xa8

(not mandatory) A picture of a cute animal, if possible in relation with what you did
gopher

@RiskyFeryansyahP
Copy link
Contributor Author

Hello guys, this is my first PR in here. so, any feedback is welcome 😄

@glours
Copy link
Contributor

glours commented Sep 6, 2022

Hey 👋
Can you sign-off your work? Just follow the instructions

@RiskyFeryansyahP
Copy link
Contributor Author

Done, thank you for reminding @glours

Copy link
Contributor

@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.

Thanks for catching this 👍

@glours glours merged commit e7b488b into docker:v2 Sep 6, 2022
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