Skip to content
This repository was archived by the owner on Jun 4, 2021. It is now read-only.

Conversation

@ash2k
Copy link

@ash2k ash2k commented Jul 5, 2018

@ash2k
Copy link
Author

ash2k commented Jul 9, 2018

@mattmoor could you take a look please?

@ittaiz
Copy link

ittaiz commented Jul 16, 2018

@matmoor any news? (just noticed the misspell)

@ixdy
Copy link

ixdy commented Jul 16, 2018

@dekkagaijin can you take a look?

@ittaiz
Copy link

ittaiz commented Jul 18, 2018

@mattmoor any news?

@ittaiz
Copy link

ittaiz commented Jul 18, 2018

@ash2k the build is failing btw

@dekkagaijin
Copy link
Contributor

@deft-code @KaylaNguyen PTAL

@ash2k
Copy link
Author

ash2k commented Jul 19, 2018

@ittaiz the build got stuck because of docker login it seems. I cannot do anything about it, someone needs to push a button to restart it.

@ittaiz
Copy link

ittaiz commented Jul 19, 2018 via email

Copy link
Contributor

@KaylaNguyen KaylaNguyen left a comment

Choose a reason for hiding this comment

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

Sorry for the long delay! Thanks for being patient with us.

parser = argparse.ArgumentParser(
description='Calculate digest for a container image.')

parser.add_argument(
Copy link
Contributor

Choose a reason for hiding this comment

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

Please specify types and whether is required for these flag values.

Copy link
Author

Choose a reason for hiding this comment

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

They are all strings, except for the --oci which is boolean and action='store_true' ensures it is either true or false. Is that ok or I need to explicitly put all types there? Please note that I've just copied fast_pusher_.py and removed what is not needed, following the style as close as possible. It does not have types or required markers.

Copy link
Contributor

Choose a reason for hiding this comment

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

It's up to you at this point. I'm happy with what you have now. You don't have to follow fast_pusher_.py code style.

logging.info('Reading config from tarball %r', args.tarball)
with v2_2_image.FromTarball(args.tarball) as base:
config = base.config_file()

Copy link
Contributor

Choose a reason for hiding this comment

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

Is tarball guaranteed to exists? What would happen if neither config and tarball exists?

Copy link
Author

Choose a reason for hiding this comment

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

There is/was a check above that terminated the program if neither config nor tarball parameters are provided. I moved it here into an else branch. Reads better now. (this is originally copied from another file too).

@ash2k
Copy link
Author

ash2k commented Jul 19, 2018

Travis blocks on docker login each time. 🤷‍♂️

@KaylaNguyen
Copy link
Contributor

Can you try what @ittaiz mentioned to see if that fixes the docker login problem?
Restarting travis build didn't help.

@dekkagaijin
Copy link
Contributor

The root cause of the docker login hang is that travis won't divulge the credentials unless the change lives in a branch of github.com/google/containerregistry. @KaylaNguyen if you want to test it on github, you can clone this PR's repo (atlassian/containerregistry:image_digest) and push it to a new branch of google/containerregistry, which will allow the tests to run.

@KaylaNguyen
Copy link
Contributor

I'm reluctant to test and merge this PR on github, as internal google code is currently the source of truth and changing code externally would make internal and external container registry code diverge.
As @jonjohnsonjr suggested, one way we can make this work is to check this code into our internal code base, go through the review process and integration tests, then manually export and create a release to github.
What do you think @ash2k?

@ash2k
Copy link
Author

ash2k commented Jul 26, 2018

@KaylaNguyen I'm happy with anything as long as this code will get into this repo.

@KaylaNguyen
Copy link
Contributor

Resolving :)

@ash2k
Copy link
Author

ash2k commented Aug 5, 2018

@KaylaNguyen any updates?

@KaylaNguyen
Copy link
Contributor

I'm working on it. Out for review, pending adding test.

@KaylaNguyen
Copy link
Contributor

The change was rolled out. I'm closing this PR :)

@ash2k ash2k deleted the image_digest branch August 23, 2018 05:37
@ash2k
Copy link
Author

ash2k commented Aug 23, 2018

@KaylaNguyen thanks a lot!

@ittaiz
Copy link

ittaiz commented Aug 23, 2018 via email

@ash2k
Copy link
Author

ash2k commented Aug 24, 2018

Would it be possible to cut a release so that I can use it in my rules_docker PR bazelbuild/rules_docker#445 ? Thanks!

@jonjohnsonjr
Copy link
Contributor

@ash2k Ack. There are two small changes I want to land before this release, but I'll try to cut it today 👍

@jonjohnsonjr
Copy link
Contributor

@ash2k done now (thanks @KaylaNguyen!)

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