You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by Graeme-Miller <gi...@git.apache.org> on 2017/04/07 11:24:02 UTC

[GitHub] brooklyn-server pull request #623: BundleMaker copy fix

GitHub user Graeme-Miller opened a pull request:

    https://github.com/apache/brooklyn-server/pull/623

    BundleMaker copy fix

    When cloning a zip, we were using the ZipEntry from the input zip.
    This causes issues, as the info in the input ZipEntry is not necessarily correct for the output zip.
    Specifically, compressed size can be different. This causes exceptions when the wrong amount of bytes are written.
    
    This change means that a new ZipEntry is created, and the info from the input ZipEntry is ignored.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/Graeme-Miller/brooklyn-server zip_copy_fix

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/brooklyn-server/pull/623.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #623
    
----
commit d7908ddf303fefa7f334c3b67380a77dab96824c
Author: graeme.miller <gr...@cloudsoftcorp.com>
Date:   2017-04-07T11:21:04Z

    BundleMaker copy fix

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-server issue #623: BundleMaker copy fix

Posted by m4rkmckenna <gi...@git.apache.org>.
Github user m4rkmckenna commented on the issue:

    https://github.com/apache/brooklyn-server/pull/623
  
    @Graeme-Miller Can you provide steps to re-produce ... does this happen for every uploaded zip?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-server pull request #623: BundleMaker copy fix

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/brooklyn-server/pull/623


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-server issue #623: BundleMaker copy fix

Posted by Graeme-Miller <gi...@git.apache.org>.
Github user Graeme-Miller commented on the issue:

    https://github.com/apache/brooklyn-server/pull/623
  
    Can you provide steps to re-produce
    @m4rkmckenna quickest way to replicate is to use the brooklyn cli from here: https://github.com/apache/brooklyn-client/pull/44. Using that CLI, zip up a folder and send it to a standard brooklyn.
    
    Even though go creates the zip correctly, brooklyn is unable to copy it due to a mismatch between the amount of compressed bytes the zipfile created by go is reporting, and the zipfile created by java is reporting. This is likely due a difference between the algorithms go and java use.
    --------------
    
    does this happen for every uploaded zip
    No, as long as the same algorithm and compression level is used this should not happen. I have yet to be able to recreate this with anything other than the zip created by go (which leads me to believe google are using a different, smarter algorithm)
    
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-server issue #623: BundleMaker copy fix

Posted by Graeme-Miller <gi...@git.apache.org>.
Github user Graeme-Miller commented on the issue:

    https://github.com/apache/brooklyn-server/pull/623
  
    @drigodwin no, it doesn't. If we were creating a zip from scratch we would do what I have done here, and create a zip entry with only the name. The zip code would then figure out the rest.
    
    We should be doing exactly the same thing for copying a zip, i.e. we should not pre-set what we think the compressed size, and other info are going to be.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-server issue #623: BundleMaker copy fix

Posted by drigodwin <gi...@git.apache.org>.
Github user drigodwin commented on the issue:

    https://github.com/apache/brooklyn-server/pull/623
  
    Does it matter that we will lose all the information from ZipEntry apart from the file name?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---