Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Aug 14, 2020. It is now read-only.

Conversation

@vishvananda
Copy link
Contributor

This also switches to the new OCI media types.

type FileBackend struct {
file *os.File
file *os.File
fname string
Copy link
Contributor

Choose a reason for hiding this comment

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

does file.Name() work for this?

@jonboulle
Copy link
Contributor

Cool!
@dgonyeo do you have any bandwidth for a review?

@vishvananda
Copy link
Contributor Author

ah good call. I didn't realize the go file object stored the name. Changed it to use that.

@cgonyeo
Copy link
Member

cgonyeo commented Sep 26, 2016

I could take a look on Wednesday, scrambling to do a project for school currently

On Sep 26, 2016, at 10:02, Jonathan Boulle [email protected] wrote:

Cool!
@dgonyeo do you have any bandwidth for a review?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@philips
Copy link
Contributor

philips commented Oct 13, 2016

ping @dgonyeo

@cgonyeo
Copy link
Member

cgonyeo commented Oct 17, 2016

Wow, so sorry about dropping this. Reviewing now.

Copy link
Member

@cgonyeo cgonyeo left a comment

Choose a reason for hiding this comment

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

This is a little silly of a situation to be in, but rkt's tests of docker2aci flex more parts of this codebase than docker2aci's tests. Would you be willing to update docker2aci in rkt, run the tests, and see if they pass? If you don't have the bandwidth I can take care of it.

Also since I took so long to get around to reviewing this, it looks like a rebase is needed.

func getImageID(file *os.File, dockerURL *types.ParsedDockerURL) (string, *types.ParsedDockerURL, error) {
func (lb *FileBackend) BuildACIV22(layerIDs []string, dockerURL *types.ParsedDockerURL, outputDir string, tmpBaseDir string, compression common.Compression) ([]string, []*schema.ImageManifest, error) {
if len(layerIDs) < 2 {
return nil, nil, fmt.Errorf("insufficient layers for oci image")
Copy link
Member

Choose a reason for hiding this comment

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

Could you explain this a little? Are single layer OCI images not possible?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

see the above comment "// for oci the first image is the config"

To build an oci we need the sha of the image config object as well as the sha of the layers since it isn't in a known location like it is with v1 docker images. The sha of the image.json is being passed as the first item in the layers slice. It is pulled out below. This was the easiest way to get the data here without modifying the signature of a bunch of methods.

Copy link
Member

Choose a reason for hiding this comment

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

Ah gotcha, makes sense.

Sometimes aciPath doesn't have a leading directory when writing with
--nosquash. Instead of failing because we can't create the directory, it
makes sesnse to just write the files locally.
@vishvananda
Copy link
Contributor Author

rebased. Will try rkt tests

glide.lock Outdated
imports:
- name: github.com/appc/spec
version: fd5e3d8f5d596c6fbd506e80b5e13ba8a97b704c
version: f329150233aa3ac6c83ab5ba02a2b5a8bd03d365
Copy link
Contributor

Choose a reason for hiding this comment

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

I see we are using tilde-versions in glide.yaml, so everything is getting bumped to latest patch release, but with a major-version of 0 this doesn't make sense. Do we perhaps want to pin down to exact versions instead?

/cc @s-urbaniak @jonboulle

Copy link
Contributor Author

Choose a reason for hiding this comment

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

glide doesn't seem to offer the ability to just update a single package. If there is a way to do this, I'm happy to just add the new package without touching anything else.

Choose a reason for hiding this comment

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

I am also not aware of a functionality to update just a single package in glide, unfortunately. That is why we pin versions in rkt to avoid general bumps like this. I suggest to pin versions and bump just the single package, or make a local test-run with unchecked tilde-versions in glide.yaml to check if there are note-worthy updates in other packages too.

@vishvananda
Copy link
Contributor Author

vishvananda commented Oct 17, 2016

The unit tests pass fine with the new version. The functional tests are getting a lot of failures but i suspect they fail without my changes as well. It looks like they are failing because i don't have overlayfs enabled on my build machine

Note that the oci layout doesn't have a name associated with the image,
so this uses the filename of the tar file if --image=IMAGE_NAME isn't
explicitly passed in.
@vishvananda
Copy link
Contributor Author

Ok I manually updated the glide.yaml and glide.lock and used glide install. The hash on the lock file doesn't match anymore, but this means that the update can be done separately after the merge.

@cgonyeo
Copy link
Member

cgonyeo commented Oct 19, 2016

Sorry about the couple day delay, was fighting with my setup over something dumb.

LGTM

@jonboulle jonboulle merged commit 044f2e0 into appc:master Oct 20, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants