-
Notifications
You must be signed in to change notification settings - Fork 34
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
Added logging for changed overlayfs dirs #286
Conversation
800df63
to
ab831fb
Compare
a90219f
to
eeed03a
Compare
cache.go
Outdated
} else { | ||
for index, dir := range changedOverlayDirs { | ||
log.Infof(dir) | ||
if index == 1 && len(changedOverlayDirs) > 2 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move the "if c.config.Debug" check here, since you are doing log.Infof(dir) in both cases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified as requested
942d146
to
04e352c
Compare
Adapted test to account for new output format Added bats helper execution branch for stacker without --debug (needed by new formatting) Signed-off-by: Catalin Hofnar <[email protected]>
LGTM |
1 similar comment
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change is good, but I think the challenge was to also show what content of the overlay dir was changed (except we don't store that kind of information as far as I see). @raharper was that the ask?
Maybe it would make sense to enhance the caching logic to cache the hash per file instead of the entire folder?
Signed-off-by: Catalin Hofnar <[email protected]>
The logic already supported something like that, with some small adaptations. Please check the new description for the updated output |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Though I think we don't really need the log messages:
Changed overlay_dir: <folder_path>
Contents that changed:`
The user can figure it out on his own based on the files shown.
This PR implements the suggestions from issue #159.
Without --debug, it will print the first 2 changed dirs:
With --debug, it will print all modifications:
Newest change also lists the files that changed:
With --debug
Without --debug
Signed-off-by: Catalin Hofnar [email protected]