Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump up runtime-spec/image-spec to the latest version #69

Merged
merged 1 commit into from
Nov 17, 2016

Conversation

hustcat
Copy link
Contributor

@hustcat hustcat commented Nov 2, 2016

v1.MediaTypeImageLayer in latest image-spec has changed, need to be bumped up to the latest version.

This commit is only focused on bumping the vendored image-spec and runtime-spec to v1.0.0-rc2. cobra and pflag doesn't tag releases, so I'm pinning this at our currently-vendored commit. I'm not aware of any reason we can't advance this to a later pflag commit, but haven't done enough research to say for sure.

Signed-off-by: Ye Yin eyniy@qq.com

@@ -12,3 +12,6 @@ import:
- package: github.com/pkg/errors
version: ~0.7.1
- package: github.com/spf13/cobra
version: 9c28e4bbd74e5c3ed7aacbc552b2cab7cfdfe744
- package: github.com/spf13/pflag
version: 7b17cc4658ef5ca157b986ea5c0b43af7938532b
Copy link
Contributor

Choose a reason for hiding this comment

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

It doesn't look like pflag tags releases. Is there a particular reason you're pinning here instead of at the current tip (spf13/pflag@5ccb023)? Just because that's the currently-vendored commit? I'm fine with that, but would like a note to that effect in the commit message. Something like:

pflag doesn't tag releases, so I'm pinning this at our currently-vendored commit. I'm not aware of any reason we can't advance this to a later pflag commit, but haven't done enough research to say for sure. This commit is only focused on bumping the vendored image-spec.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK,It's fine to add some notes.

Copy link
Contributor

Choose a reason for hiding this comment

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

Did you add a note like this somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I add it in comment:
image
Do you mean add this note in git commit message?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, in Git somewhere, in case we leave GitHub or something ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a good idea.Updated it:)

@wking
Copy link
Contributor

wking commented Nov 2, 2016

Bumping image-spec to a tagged release sounds great to me.

On Wed, Nov 02, 2016 at 02:37:44AM -0700, Ye Yin wrote:

M vendor/github.com/opencontainers/runtime-spec/specs-go/config.go (44)
M vendor/github.com/opencontainers/runtime-spec/specs-go/state.go (2)
M vendor/github.com/opencontainers/runtime-spec/specs-go/version.go (2)

I still think we should be pinning runtime-spec 1.

@hustcat
Copy link
Contributor Author

hustcat commented Nov 3, 2016

@wking Updated, PTAL.

@@ -1,27 +0,0 @@
// Copyright 2016 The Linux Foundation
Copy link
Member

Choose a reason for hiding this comment

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

why this file has been removed? This make the build failed

2.03s$ make test
go test -race -cover github.com/opencontainers/image-tools/cmd/oci-create-runtime-bundle github.com/opencontainers/image-tools/cmd/oci-image-validate github.com/opencontainers/image-tools/cmd/oci-unpack github.com/opencontainers/image-tools/image
# github.com/opencontainers/image-tools/vendor/github.com/opencontainers/image-spec/specs-go/v1
vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go:25: undefined: Descriptor
vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go:28: undefined: Descriptor
make: *** [test] Error 2
The command "make test" exited with 2.
1.61s$ make tools
go build -ldflags "-X main.gitCommit=c8f837309b85f9ef9d039beb3fcb6e09a9ce88f1" ./cmd/oci-create-runtime-bundle
# github.com/opencontainers/image-tools/vendor/github.com/opencontainers/image-spec/specs-go/v1
vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go:25: undefined: Descriptor
vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go:28: undefined: Descriptor

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Has moved to opencontainers/image-spec/blob/master/specs-go/v1/descriptor.go

Copy link
Contributor Author

Choose a reason for hiding this comment

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

# make test
go test -race -cover github.com/opencontainers/image-tools/cmd/oci-create-runtime-bundle github.com/opencontainers/image-tools/cmd/oci-image-validate github.com/opencontainers/image-tools/cmd/oci-unpack github.com/opencontainers/image-tools/image
?       github.com/opencontainers/image-tools/cmd/oci-create-runtime-bundle     [no test files]
?       github.com/opencontainers/image-tools/cmd/oci-image-validate    [no test files]
?       github.com/opencontainers/image-tools/cmd/oci-unpack    [no test files]
ok      github.com/opencontainers/image-tools/image     1.074s  coverage: 32.9% of statements

It's OK for me.

Copy link
Member

@coolljt0725 coolljt0725 Nov 3, 2016

Choose a reason for hiding this comment

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

I think it's because your run make update-deps and forget to git add vendor/github.com/opencontainers/image-spec/specs-go/v1/descriptor.go,
descriptor.go was in vendor/github.com/opencontainers/image-spec/specs-go before bumping.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I have fixed it:)

@hustcat hustcat force-pushed the bump-up branch 2 times, most recently from bb6e16d to 0bb57af Compare November 3, 2016 03:41
@@ -108,7 +108,7 @@ func TestUnpackLayer(t *testing.T) {

testManifest := manifest{
Layers: []descriptor{descriptor{
MediaType: "application/vnd.oci.image.layer.tar+gzip",
MediaType: "application/vnd.oci.image.layer.v1.tar+gzip",
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you're missing another one of these on line 172:

$ git grep -n vnd.oci.image.layer.tar origin/pr/69
origin/pr/69:image/manifest_test.go:172:                        MediaType: "application/vnd.oci.image.layer.tar+gzip",

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, Updated:)

@wking
Copy link
Contributor

wking commented Nov 3, 2016 via email

@coolljt0725
Copy link
Member

Look good to me

@runcom
Copy link
Member

runcom commented Nov 3, 2016

lgtm :)

@cyphar
Copy link
Member

cyphar commented Nov 4, 2016

Can we merge it then? Everything is broken at the moment with this PR not merged (namely umoci and all of the OCI tooling in this repo).

@coolljt0725
Copy link
Member

LGTM we could merge this.

@xiekeyang
Copy link
Contributor

LGTM

@cyphar
Copy link
Member

cyphar commented Nov 9, 2016

Aren't @coolljt0725 and @xiekeyang maintainers?

@caniszczyk PullApprove is broken (again).

@Sn0rt
Copy link
Contributor

Sn0rt commented Nov 10, 2016

@xiekeyang @coolljt0725 hi, can you merge this pr ?

@wking
Copy link
Contributor

wking commented Nov 10, 2016

On Thu, Nov 10, 2016 at 12:41:54AM -0800, Sn0rt wrote:

@xiekeyang @coolljt0725 hi, can you merge this pr ?

Neither were maintainers when this PR was last bumped [1,2], so I
suspect someone needs to kick PullApprove or @hustcat needs to
force-push with a new hash (e.g. after rebasing on master).

@coolljt0725
Copy link
Member

@hustcat try with @wking 's suggesntion

needs to
force-push with a new hash (e.g. after rebasing on master).

`v1.MediaTypeImageLayer` in latest image-spec has changed, need to be bumped up to the latest version.

This commit is only focused on bumping the vendored image-spec and runtime-spec to v1.0.0-rc2. `cobra` and `pflag` doesn't tag releases, so I'm pinning this at our currently-vendored commit. I'm not aware of any reason we can't advance this to a later pflag commit, but haven't done enough research to say for sure.

Signed-off-by: Ye Yin <eyniy@qq.com>
@hustcat
Copy link
Contributor Author

hustcat commented Nov 11, 2016

@coolljt0725 rebased and force-pushed, PTAL.

@wking
Copy link
Contributor

wking commented Nov 11, 2016

Doesn't seem to have helped. Maybe PullApprove freezes the approver set at PR creation? @caniszczyk?

@cyphar
Copy link
Member

cyphar commented Nov 11, 2016

Screw this.

@coolljt0725 @xiekeyang Can one of you please just manually merge it and push it? Just do:

% git fetch origin pull/69/head:pr-69
% git merge --no-ff pr-69
% git push origin master

@coolljt0725
Copy link
Member

@cyphar manually merge failed

Delta compression using up to 8 threads.
Compressing objects: 100% (24/24), done.
Writing objects: 100% (27/27), 4.83 KiB | 0 bytes/s, done.
Total 27 (delta 18), reused 5 (delta 3)
remote: Resolving deltas: 100% (18/18), completed with 16 local objects.
remote: error: GH006: Protected branch update failed for refs/heads/master.
remote: error: Required status check "code-review/pullapprove" is pending.
To https://github.com/opencontainers/image-tools
 ! [remote rejected] master -> master (protected branch hook declined)
error: failed to push some refs to 'https://github.com/opencontainers/image-tools'

it still need pullapprove

@cyphar
Copy link
Member

cyphar commented Nov 11, 2016

Dammit. Yeah, it looks like GitHub only lets you do manual merges if the PR has all protection checks passing. This is just getting silly now...

@wking
Copy link
Contributor

wking commented Nov 11, 2016

Maybe an admin can kick PullApprove as described in dropseed/pullapprove-support#33.

@coolljt0725
Copy link
Member

coolljt0725 commented Nov 17, 2016

LGTM

Approved with PullApprove

@coolljt0725
Copy link
Member

PullApprove works :)

@xiekeyang
Copy link
Contributor

xiekeyang commented Nov 17, 2016

LGTM

Approved with PullApprove

@xiekeyang xiekeyang merged commit 66832e7 into opencontainers:master Nov 17, 2016
@caniszczyk
Copy link
Contributor

@coolljt0725 @xiekeyang sorry for the delay on looking at this, was busy with KubeCon :)

@coolljt0725
Copy link
Member

@caniszczyk thank you :)

@glestaris
Copy link
Contributor

glestaris commented Nov 22, 2016

Yay!

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.

9 participants