Emit unmodified change events for directories#1876
Merged
crosbymichael merged 1 commit intocontainerd:masterfrom Dec 5, 2017
Merged
Emit unmodified change events for directories#1876crosbymichael merged 1 commit intocontainerd:masterfrom
crosbymichael merged 1 commit intocontainerd:masterfrom
Conversation
stevvooe
reviewed
Dec 5, 2017
| return err | ||
| if emit { | ||
| emittedDir, emitParents := commonParents(lastEmittedDir, p, parents) | ||
| if len(emitParents) > 0 { |
501fab9 to
ba10e49
Compare
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 Report
@@ 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
Continue to review full report at Codecov.
|
Member
|
LGTM |
1 similar comment
Member
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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