Skip to content

Emit unmodified change events for directories#1876

Merged
crosbymichael merged 1 commit intocontainerd:masterfrom
dmcgowan:fs-include-parent-directories
Dec 5, 2017
Merged

Emit unmodified change events for directories#1876
crosbymichael merged 1 commit intocontainerd:masterfrom
dmcgowan:fs-include-parent-directories

Conversation

@dmcgowan
Copy link
Copy Markdown
Member

@dmcgowan dmcgowan commented Dec 5, 2017

When a file changes, emit events for the seen parent directories to ensure that those parents are included in change streams such as archives. The parents are needed accurately recreate diff representation apart from a parent (such as overlay and aufs graph driversin Docker).

I didn't want to include it in this PR but this can be verified using a diff subcommand on containers dmcgowan@d6105cb

Note:
The tests cannot hit the original issue associated with this image due to tar application always occurring on top of the parent rather than in isolation.

Fixes #1723

@stevvooe stevvooe added this to the 1.0.0 milestone Dec 5, 2017
Comment thread fs/diff.go Outdated
return err
if emit {
emittedDir, emitParents := commonParents(lastEmittedDir, p, parents)
if len(emitParents) > 0 {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty branch.

@dmcgowan dmcgowan force-pushed the fs-include-parent-directories branch from 501fab9 to ba10e49 Compare December 5, 2017 02:36
When a file changes, emit events for the seen parent
directories to ensure that those parents are included
in change streams such as archives. The parents are
needed accurately recreate diff representation apart
from a parent (such as overlay and aufs graph drivers
in Docker).

Signed-off-by: Derek McGowan <[email protected]>
@codecov-io
Copy link
Copy Markdown

codecov-io commented Dec 5, 2017

Codecov Report

Merging #1876 into master will increase coverage by 0.27%.
The diff coverage is 83.87%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1876      +/-   ##
==========================================
+ Coverage   48.87%   49.14%   +0.27%     
==========================================
  Files          86       86              
  Lines        8332     8389      +57     
==========================================
+ Hits         4072     4123      +51     
- Misses       3586     3591       +5     
- Partials      674      675       +1
Flag Coverage Δ
#linux 52.67% <89.28%> (+0.33%) ⬆️
#windows 44.09% <45.16%> (-0.01%) ⬇️
Impacted Files Coverage Δ
fs/diff.go 52.1% <83.87%> (+10.66%) ⬆️
archive/tar.go 43.98% <0%> (+0.51%) ⬆️

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 b77fa49...ba10e49. Read the comment docs.

@stevvooe
Copy link
Copy Markdown
Member

stevvooe commented Dec 5, 2017

LGTM

1 similar comment
@crosbymichael
Copy link
Copy Markdown
Member

LGTM

@crosbymichael crosbymichael merged commit 6a1ef90 into containerd:master Dec 5, 2017
@dmcgowan dmcgowan deleted the fs-include-parent-directories branch September 10, 2019 17:46
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.

4 participants