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

feat(log): add context fields to lifecycle events #1007

Merged
merged 2 commits into from
Sep 19, 2021
Merged

Conversation

piksel
Copy link
Member

@piksel piksel commented Jun 30, 2021

This just adds some context (container name, when available, or id) to some of the log messages that are emitted during lifecycle events.
Basically going from:

DEBU[0064] Executing pre-update command.
DEBU[0064] Awaiting timeout or completion                exec-id= exit-code=127 running=false
ERRO[0064] Command exited with code 127
INFO[0064] Skipping container as the pre-update command failed
DEBU[0065] No post-check command supplied. Skipping
DEBU[0065] No post-check command supplied. Skipping
DEBU[0065] No post-check command supplied. Skipping
DEBU[0065] No post-check command supplied. Skipping

to

DEBU[0064] Executing pre-update command.                 container=/testcontainer2
DEBU[0064] Awaiting timeout or completion                exec-id= exit-code=127 running=false
ERRO[0064] Command exited with code 127
INFO[0064] Skipping container as the pre-update command failed
DEBU[0065] No post-check command supplied. Skipping      container=/testcontainer4
DEBU[0065] No post-check command supplied. Skipping      container=/testcontainer3
DEBU[0065] No post-check command supplied. Skipping      container=/testcontainer2
DEBU[0065] No post-check command supplied. Skipping      container=/testcontainer1

@piksel piksel requested a review from simskij as a code owner June 30, 2021 10:26
@piksel piksel changed the title feat(log): add context fields to logs feat(log): add context fields to lifecycle events Jun 30, 2021
@codecov
Copy link

codecov bot commented Jun 30, 2021

Codecov Report

Merging #1007 (34237cc) into main (ea300b7) will increase coverage by 2.30%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1007      +/-   ##
==========================================
+ Coverage   59.63%   61.93%   +2.30%     
==========================================
  Files          22       22              
  Lines        1412     1416       +4     
==========================================
+ Hits          842      877      +35     
+ Misses        500      459      -41     
- Partials       70       80      +10     
Impacted Files Coverage Δ
pkg/container/client.go 27.91% <85.71%> (+13.63%) ⬆️
pkg/registry/digest/digest.go 44.26% <0.00%> (+1.88%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ea300b7...34237cc. Read the comment docs.

@piksel piksel merged commit 697397f into main Sep 19, 2021
@piksel piksel deleted the feature/context-logging branch September 19, 2021 16:07
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.

1 participant