Skip to content

Let graphdrivers declare diff stream fidelity#32092

Merged
vieux merged 1 commit intomoby:masterfrom
alfred-landrum:gdcaps
Apr 11, 2017
Merged

Let graphdrivers declare diff stream fidelity#32092
vieux merged 1 commit intomoby:masterfrom
alfred-landrum:gdcaps

Conversation

@alfred-landrum
Copy link
Copy Markdown
Contributor

This allows graphdrivers to declare that they can reproduce the original
diff stream for a layer. If they do so, the layer store will not use
tar-split processing, but will still verify the digest on layer export.
This makes it easier to experiment with non-default diff formats.

Signed-off-by: Alfred Landrum [email protected]

@cpuguy83
Copy link
Copy Markdown
Member

Design ok for me.

Comment thread daemon/graphdriver/driver.go Outdated
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.

Maybe add an extra doc comment like

In practice when true, relies on the graphdriver to provide consistent tar streams for a layer rather than the generic algorithm the layer store provides

I don't usually like stuff like this that refers to "parent" packages, but is helpful for readers at least.

@icecrime
Copy link
Copy Markdown
Contributor

Design LGTM.

@alfred-landrum
Copy link
Copy Markdown
Contributor Author

alfred-landrum commented Mar 24, 2017

updated the doc comment; see if that reads ok for you @cpuguy83

@cpuguy83
Copy link
Copy Markdown
Member

Perfect!

@alfred-landrum
Copy link
Copy Markdown
Contributor Author

The single test failure looks unrelated, and I see other PR's that have it as well.

Copy link
Copy Markdown
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

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

I wonder if we can refactor this a bit to hide the complexity behind an interface rather than storing graphdriver caps in the layer store.

@alfred-landrum
Copy link
Copy Markdown
Contributor Author

how about if the layer store just has a useTarSplit bool (instead of driverCaps Capabilities) that it initializes to the appropriate setting based on a call to driver.Capabilities() at init time?

@alfred-landrum
Copy link
Copy Markdown
Contributor Author

I made that change, and I think that reads a little better: at init time, the layer store initializes itself based on the driver's capabilities.

Copy link
Copy Markdown
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

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

LGTM

@alfred-landrum
Copy link
Copy Markdown
Contributor Author

from offline conversation with @cpuguy83 : should also update the graphdriver plugin docs

This allows graphdrivers to declare that they can reproduce the original
diff stream for a layer. If they do so, the layer store will not use
tar-split processing, but will still verify the digest on layer export.
This makes it easier to experiment with non-default diff formats.

Signed-off-by: Alfred Landrum <[email protected]>
@alfred-landrum
Copy link
Copy Markdown
Contributor Author

ping @tiborvass - @cpuguy83 suggested you for a second code review

@alfred-landrum
Copy link
Copy Markdown
Contributor Author

ping @thaJeztah - anything else I can do to push this over the line?

@tonistiigi
Copy link
Copy Markdown
Member

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants