Skip to content

collect built image IDs#10372

Merged
ndeloof merged 1 commit intodocker:v2from
ndeloof:builder
Mar 15, 2023
Merged

collect built image IDs#10372
ndeloof merged 1 commit intodocker:v2from
ndeloof:builder

Conversation

@ndeloof
Copy link
Contributor

@ndeloof ndeloof commented Mar 14, 2023

What I did
Fix collection of built image IDs.

We used a map[string]string to be overridden by subsequent calls to s.doBuild, so loosing earlier results (wonder this didn't resulted in some bugs...).

Replaced by a pre-allocated []string using service index from project.Services to record IDs collected by goroutines at a known position.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@ndeloof
Copy link
Contributor Author

ndeloof commented Mar 14, 2023

I assume this used to work because buildx does not only return the built IDs for last call, but all the built IDs for the active session.

Copy link
Contributor

@milas milas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix!

@ndeloof ndeloof merged commit e492330 into docker:v2 Mar 15, 2023
@ndeloof ndeloof deleted the builder branch March 15, 2023 08:47
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