Docker ProgressUpdateEvent may report file sizes larger than 2GB, but int has been used as the target type on parsing the according json output. If we attempt to push an image with a total size of >2GB, this will result in a build failure (although the image will still be pushed correctly).

This Pull Request fixes that by changing the affected types from int to long.

Comment From: wilkinsona

@kgb-financial-com Thanks for the PR. Unfortunately, this doesn't qualify as an obvious fix as it changes functionality. Please sign the CLA.

Comment From: kgb-financial-com

Thanks. Please give me a few days to get approval from our top brass.

Comment From: pivotal-cla

@kgb-financial-com Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

Comment From: pivotal-cla

@kgb-financial-com Thank you for signing the Contributor License Agreement!

Comment From: kgb-financial-com

I have removed the tag as obvious fix from the original pull request description, and signed the CLA. Please proceed. :)

Comment From: wilkinsona

Thanks for signing the CLA.

Technically speaking, this is a breaking change as the constructor of ProgressDetail and the two getter methods are public API. In reality, I think it's likely that the API isn't used publicly so I'd be comfortable applying the change in 3.5 but I'm slightly wary of applying it in 3.3.x and 3.4.x. We'll discuss it as a team to figure out the next steps.

Comment From: philwebb

Looking at our own code, we only have one place that we call those methods which we can replace with a new asPercentage() method. I've polished the contribution to do that, and to restore the int returns in a deprecated form.

I agree with @wilkinsona that this class is mostly internal so I think we can be aggressive about removing the deprecated methods in 3.5.

Thanks for the contribution @kgb-financial-com