libartifact: introduce handling of artifact store events#768
libartifact: introduce handling of artifact store events#768nimdrak wants to merge 4 commits intocontainers:mainfrom
Conversation
4066258 to
0afac95
Compare
|
Packit jobs failed. @containers/packit-build please check. |
0afac95 to
3ee8036
Compare
Signed-off-by: Byounguk Lee <nimdrak@gmail.com>
Signed-off-by: Byounguk Lee <nimdrak@gmail.com>
4f53335 to
6362450
Compare
- Introduced withLockedLayout and copyArtifact helpers to resolve dupl lint issues. - Maintained the original thread-locking scope for as.storePath access. - Fixed a resource leak by ensuring the copier is always closed using defer and capturing the close error. Signed-off-by: Byounguk Lee <nimdrak@gmail.com>
ec94ce0 to
1770e3d
Compare
…annel - TestArtifactStore_EventChannel deals with the cases: AddSuccessAndAddError, RemoveSuccess, PushError, PullError Signed-off-by: Byounguk Lee <nimdrak@gmail.com>
1770e3d to
8afbf4d
Compare
| // EventTypeArtifactPull represents an artifact pull. | ||
| EventTypeArtifactPull | ||
| // EventTypeArtifactPullError represents a failed artifact pull. | ||
| EventTypeArtifactPullError |
There was a problem hiding this comment.
Is this new? Do we report errors as events?
There was a problem hiding this comment.
Yes, some of these are new.
Our podman/libpod and container-libs/common/libimage only handles PullError
I thought it would be beneficial to notify clients about other errors as well, such as AddError, RemoveError, and PushError. And I also add
However, if there's a specific reason why we only track PullError, I am completely open to removing these new additions.
What do you think?
There was a problem hiding this comment.
While I introduced AddEvent, I intentionally left out other events like Extract and Inspect. These are new too, but I only added AddEvent since it's the only one that actually modifies the artifact store.
fixed #465