Support artifacts emitting events#28662
Conversation
|
@nimdrak (not a review) rebase on main to get past Mac OS arm64 issue. |
37bb976 to
e3766d1
Compare
e3766d1 to
fab2171
Compare
fab2171 to
44a5293
Compare
|
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
- libpod/events/config.go: Added the `Artifact` event type. - libpod/events/events.go: Added the `Artifact` event type and mapped `artStore.EventType` to standard libpod event statuses. - libpod/runtime.go: Spawned a `libartifactEvents` goroutine in `makeRuntime` to poll the event channel and write to the eventer, and implemented graceful shutdown for the event channel in `Runtime.Shutdown()`. Signed-off-by: Byounguk Lee <nimdrak@gmail.com>
- cmd/podman/common/completion.go: Added shell auto-completion for the `artifact=` and `type=artifact` event filters. - libpod/events/events.go: Added `Artifact` to `ToHumanReadable` formatting, mirroring the `Image` output formatting. - libpod/events/filters.go: Implemented event filtering logic for the `ARTIFACT` type by name and ID. - libpod/events/journal_linux.go: Updated journald reader and writer functions to accurately parse and log artifact events. - libpod/events/logfile.go: Allowed the `Artifact` event type to pass through the file logger reader without throwing an unknown type error. Signed-off-by: Byounguk Lee <nimdrak@gmail.com>
47ec1f1 to
a43532c
Compare
|
I checked it works properly in Ubuntu 24.04.4 LTS. Detailsartifact events logging by journald
artifact events logging by file
|
|
I think the failed remote tests are unrelated to this PR. |
This is your new test so they cannot be unrelated. I think is the main problem via this "broken" multiple channel event architecture and why we need the interface... |
- docs/source/markdown/podman-events.1.md: Documented the `artifact` event type, its associated statuses (`create`, `pull`, `push`, `remove`), the `artifact=` filter, and updated the Journald Identifiers table. - test/e2e/events_test.go: Added an end-to-end test to verify that `podman artifact` operations properly emit the expected events in chronological order. Signed-off-by: Byounguk Lee <nimdrak@gmail.com>
a43532c to
1c97af3
Compare
You're right, the timing issue between the service and the remote command was the culprit. I've applied Regarding the 'broken' event architecture, I agree that a proper interface is the right way to go. I’d like to be part of that refactoring process. If you have a specific design in mind or an existing issue for it, please let me know. |
Checklist
Ensure you have completed the following checklist for your pull request to be reviewed:
commits. (
git commit -s). (If needed, usegit commit -s --amend). The author email must matchthe sign-off email address. See CONTRIBUTING.md
for more information.
Fixes: #00000in commit message (if applicable)make validatepr(format/lint checks)Noneif no user-facing changes)Does this PR introduce a user-facing change?
fix #27260