Skip to content

fix ctr image export not found error#2622

Merged
estesp merged 1 commit intocontainerd:masterfrom
kadisi:export_bug
Jan 16, 2019
Merged

fix ctr image export not found error#2622
estesp merged 1 commit intocontainerd:masterfrom
kadisi:export_bug

Conversation

@kadisi
Copy link
Copy Markdown
Contributor

@kadisi kadisi commented Sep 8, 2018

Signed-off-by: Jie Zhang [email protected]

fix #2590

may be need some test case

@AkihiroSuda
Copy link
Copy Markdown
Member

Thanks, but I think we should also support ctr images export --all-platforms

@AkihiroSuda
Copy link
Copy Markdown
Member

And please sign the commit with your full name

@kadisi
Copy link
Copy Markdown
Contributor Author

kadisi commented Sep 10, 2018

@AkihiroSuda ok, thank you, if use --all-platforms options, and a specific layer not exist, we will download this layer, but Do you think is it necessary to show the download progress like ctr image pull?

@AkihiroSuda
Copy link
Copy Markdown
Member

no need to download, it should just fail when blob is not locally available

@kadisi kadisi force-pushed the export_bug branch 2 times, most recently from d9cad03 to 1af6379 Compare September 10, 2018 09:08
@estesp
Copy link
Copy Markdown
Member

estesp commented Sep 10, 2018

requires rebase after export functions moved

@kadisi kadisi force-pushed the export_bug branch 2 times, most recently from 093ada2 to 8c5316b Compare September 11, 2018 09:26
@codecov-io
Copy link
Copy Markdown

codecov-io commented Sep 12, 2018

Codecov Report

Merging #2622 into master will decrease coverage by 3.6%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2622      +/-   ##
==========================================
- Coverage    47.5%   43.89%   -3.61%     
==========================================
  Files          91      101      +10     
  Lines        8460    10800    +2340     
==========================================
+ Hits         4019     4741     +722     
- Misses       3717     5328    +1611     
- Partials      724      731       +7
Flag Coverage Δ
#linux 47.5% <ø> (ø) ⬆️
#windows 41.07% <ø> (?)
Impacted Files Coverage Δ
snapshots/native/native.go 43.3% <0%> (-10%) ⬇️
metadata/snapshot.go 45.8% <0%> (-8.96%) ⬇️
archive/tar.go 43.79% <0%> (-7.07%) ⬇️
metadata/containers.go 47.97% <0%> (-6.62%) ⬇️
content/local/writer.go 57.84% <0%> (-6.36%) ⬇️
content/local/store.go 48.51% <0%> (-5.03%) ⬇️
archive/tar_opts.go 28.57% <0%> (-4.77%) ⬇️
archive/compression/compression.go 58.69% <0%> (-4.7%) ⬇️
metadata/images.go 58.46% <0%> (-4.7%) ⬇️
metadata/buckets.go 56.33% <0%> (-4.6%) ⬇️
... and 57 more

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 c7e31f1...4026738. Read the comment docs.

Comment thread export.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.

@dmcgowan

Do we want to keep Export() decoupled from oci.V1Exporter?

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.

I don't think we need to. I have been thinking about your other comment related to the importer and it might just make sense to unify them. The only real formats right now are OCI and Docker v1.1+, and we don't really expect those to change in a significant way to justify having a complex set of interfaces.

Comment thread cmd/ctr/commands/run/run_unix.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.

Can you remove this change from this PR since it is unrelated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ok

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.

@kadisi could you rollback this file? as the @dmcgowan said, it is unrelated change

Comment thread images/oci/exporter.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.

Just use platforms.DefaultSpec()

Comment thread import.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.

Can you also remove this import change, it is not related and causes an unnecessary conflict with the import PR

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ok

Comment thread export.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.

I think it would be more consistent to just add the all platforms option here, then it can use that to create the V1 exporter. I kind of think we need to do some deeper cleaner, so we can focus on the refactoring and interfaces in one change and just focus on the platform feature and bug fix here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@dmcgowan i have changed exportOpts struct to type V1ExporterOpt func(c *V1Exporter) error . and use ResolveV1ExportOpt function to create the V1Exporter . if i add AllPlatforms feild to exportOpts struct, i must use exportOpts to create V1Exporter. Suppose if we need to add new fields to V1Exporter struct in the future, we also need add same field to exportOpts struct. Is this more cumbersome?

@estesp
Copy link
Copy Markdown
Member

estesp commented Sep 19, 2018

Sorry we just merged the import re-write and there is a conflict/requires rebase again

@AkihiroSuda
Copy link
Copy Markdown
Member

ping ^^ @kadisi

1 similar comment
@AkihiroSuda
Copy link
Copy Markdown
Member

ping ^^ @kadisi

@AkihiroSuda
Copy link
Copy Markdown
Member

@fuweid PTAL?

Copy link
Copy Markdown
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

ping @kadisi request to update the code according to @dmcgowan 's comment. :)

Comment thread cmd/ctr/commands/run/run_unix.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.

@kadisi could you rollback this file? as the @dmcgowan said, it is unrelated change

@estesp
Copy link
Copy Markdown
Member

estesp commented Jan 2, 2019

@dmcgowan want to take a final look at this? I think all feedback is handled

@AkihiroSuda
Copy link
Copy Markdown
Member

ping @dmcgowan

@AkihiroSuda
Copy link
Copy Markdown
Member

@fuweid @estesp @dmcgowan LGTY?

Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

The comment has more space and the platforms.DefaultSpec() is better than platforms.Parse because we don't need to do marshal/unmarshal things here.

Comment thread images/oci/exporter.go
AllPlatforms bool
}

// V1ExporterOpt allows to set additional options to a newly V1Exporter
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.

nit. more space in the comment.

Copy link
Copy Markdown
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM

@estesp
Copy link
Copy Markdown
Member

estesp commented Jan 16, 2019

Going to merge based on 2 LGTMs; will create a PR to handle the 2 minor cleanup suggestions

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.

OCI exporter should support partial blob exportation of multi-arch images

6 participants