Skip to content

Conversation

@dmage
Copy link
Contributor

@dmage dmage commented Oct 16, 2017

@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 16, 2017
@dmage dmage changed the title Verify layer sizes in the integrated registry [WIP] Verify layer sizes in the integrated registry Oct 16, 2017
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 16, 2017
@bparees
Copy link
Contributor

bparees commented Oct 17, 2017

@dmage is this prepared for a review?

@dmage
Copy link
Contributor Author

dmage commented Oct 17, 2017

@bparees I’m going to add some code to test this fix. Now it has a bug.

@openshift-ci-robot openshift-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 20, 2017
@dmage dmage force-pushed the layers-metadata branch 2 times, most recently from cd8e7dd to 4f98282 Compare October 23, 2017 16:41
@dmage dmage changed the title [WIP] Verify layer sizes in the integrated registry Verify layer sizes in the integrated registry Oct 23, 2017
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 23, 2017
@dmage
Copy link
Contributor Author

dmage commented Oct 23, 2017

/retest

@miminar
Copy link

miminar commented Oct 24, 2017

/test extended_image_registry

Copy link

@miminar miminar left a comment

Choose a reason for hiding this comment

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

LGTM otherwise.

_, err = repo.Blobs(ctx).Stat(ctx, fsLayer.Digest)
desc, err = repo.Blobs(ctx).Stat(ctx, fsLayer.Digest)
if err == nil && fsLayer.Size != desc.Size {
errs = append(errs, ErrManifestBlobBadSize{
Copy link

Choose a reason for hiding this comment

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

The err is appended twice.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Which err?

Copy link

Choose a reason for hiding this comment

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

🤦‍♂️ sorry, I guess I wasn't reading.


target := h.manifest.Target()
_, err := repo.Blobs(ctx).Stat(ctx, target.Digest)
desc, err := repo.Blobs(ctx).Stat(ctx, target.Digest)
Copy link

Choose a reason for hiding this comment

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

The Target() is already verified within .References() loop.

Copy link
Contributor

Choose a reason for hiding this comment

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

sounds like we can delete this whole block since .References() will include the digest.

}
}

// Start runs the Docker registry. Start always returns a non-nil error.
Copy link
Contributor

Choose a reason for hiding this comment

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

this comment makes it sounds like Start will never return nil, but i don't think that's what you mean, is it?

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 will never return nil. It acts like http.ListenAndServe.

Copy link
Contributor

Choose a reason for hiding this comment

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

got it.


switch manifest.SchemaVersion {
case 0:
// legacy config object
Copy link
Contributor

Choose a reason for hiding this comment

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

on what basis are we confident/safe to remove this?

Copy link
Contributor Author

@dmage dmage Oct 24, 2017

Choose a reason for hiding this comment

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

This is for Docker before v1.3.0. Our code relies on DockerImageMetadata and this function for will leave it unfilled for schema 0 without any errors. We need to fix our code if we still want to have support for schema 0.

Copy link
Contributor

Choose a reason for hiding this comment

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

got it.

@bparees
Copy link
Contributor

bparees commented Oct 24, 2017

@dmage sounds like a couple minor nits and we can get this on the merge queue today.

@openshift-ci-robot
Copy link

@michojel: changing LGTM is restricted to assignees, and only openshift org members may be assigned issues.

Details

In response to this:

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@miminar
Copy link

miminar commented Oct 24, 2017

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 24, 2017
@miminar
Copy link

miminar commented Oct 24, 2017

/test extended_image_registry
/assign @bparees
for the final approval

@legionus
Copy link
Contributor

/lgtm

@bparees
Copy link
Contributor

bparees commented Oct 24, 2017

/lgtm

@openshift-merge-robot openshift-merge-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 24, 2017
@bparees bparees added the kind/bug Categorizes issue or PR as related to a bug. label Oct 24, 2017
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot removed the lgtm Indicates that a PR is ready to be merged. label Oct 25, 2017
@legionus
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 25, 2017
@openshift-merge-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bparees, dmage, legionus, miminar

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue.

@openshift-merge-robot openshift-merge-robot merged commit f1f5221 into openshift:master Oct 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants