c8d: Add image events#46405
Conversation
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
| }).Debug("export image without name") | ||
| } | ||
|
|
||
| i.LogImageEvent(target.Digest.String(), target.Digest.String(), events.ActionSave) |
There was a problem hiding this comment.
SO confusing that it's "image expert", but actually "image save" 😞
There was a problem hiding this comment.
I had to check 3 times to make sure it's the right one...
There was a problem hiding this comment.
The image is not exported at this point yet. We should log the events after Export returns a nil error.
There was a problem hiding this comment.
This is the way graph drivers work too. Also you could export multiple images…
so it’s more “ready to export this image” rather than “this image was exported”
There was a problem hiding this comment.
Oh, right. That's weird though.. but if that's how it worked with the graphdrivers then it should stay that way. Sorry!
There was a problem hiding this comment.
It is weird. I’ll give you that. I even did what you said at one point but reverted. It would be too big of a change. Maybe we can fix this in a followup, fix both implementations if we think it’s useful
There was a problem hiding this comment.
Yes, we should map what events we trigger "where" and with what information. Many of them where just added "willy-nilly" in the code, but not all were properly defined.
Should be slightly easier to find all locations now that we have the consts defined, but it could use some tweaking (and documenting) overall
| }).Debug("export image without name") | ||
| } | ||
|
|
||
| i.LogImageEvent(target.Digest.String(), target.Digest.String(), events.ActionSave) |
There was a problem hiding this comment.
The image is not exported at this point yet. We should log the events after Export returns a nil error.
- What I did
Added image events for
- How I did it
With my hands
- How to verify it
Change line 84 in
hack/make/.integration-test-helpersto sayand run:
$ make DOCKER_GRAPHDRIVER=overlayfs TEST_FILTER=DockerCLIEventSuite TEST_INTEGRATION_USE_SNAPSHOTTER=1 test-integrationAll the tests should pass.
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)
Signed-off-by: Djordje Lukic djordje.lukic@docker.com