Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Add note about CodeDeployToECS-incompatible ZIP files #44

Merged
merged 1 commit into from
Dec 1, 2020

Conversation

sveniu
Copy link

@sveniu sveniu commented Oct 13, 2020

Reviewer notes:

  • It's probably a good idea to run this by the CodePipeline/CD/ECS team.
  • Rather than documenting this behaviour, it would be greatly preferred if it was fixed in CodePipeline instead.
  • In addition to documenting this behaviour, it would be good to improve the error messages so that they contain clearer and more actionable information.
  • More details on the issue can be found in [ECS/CodeDeploy] [request]: Support uncompressed streaming zip aws/containers-roadmap#1112
ZIP files that use the combination of streaming input and the store
(uncompressed) archiving method, will make the CodeDeployToECS action
return an error:

  Exception while trying to read the task definition artifact file from: <source artifact name>

This error is identical to the one prompted by exceeding the maximum
compressed artifact size limit of 3 MB.

ZIP files that use streaming input will put file entry metadata after
writing the file body (compressed or not, depending on method). When
using the store archiving method, there may be ambiguity around whether
the complete body is present. The deflate method does not have this
problem, since this information is encoded into the deflate format. Some
ZIP implementations, notably java.util.zip, do not support this
combination, and will throw an exception. For example:

  java.util.zip.ZipException: only DEFLATED entries can have EXT descriptor
    at java.base/java.util.zip.ZipInputStream.readLOC(ZipInputStream.java:311)
    at java.base/java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:123)

Related links:
  https://github.com/aws/containers-roadmap/issues/1112
  https://bugs.openjdk.java.net/browse/JDK-8143613
  https://stackoverflow.com/questions/47208272/android-zipinputstream-only-deflated-entries-can-have-ext-descriptor

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

ZIP files that use the combination of streaming input and the store
(uncompressed) archiving method, will make the CodeDeployToECS action
return an error:

  Exception while trying to read the task definition artifact file from: <source artifact name>

This error is identical to the one prompted by exceeding the maximum
compressed artifact size limit of 3 MB.

ZIP files that use streaming input will put file entry metadata after
writing the file body (compressed or not, depending on method). When
using the store archiving method, there may be ambiguity around whether
the complete body is present. The deflate method does not have this
problem, since this information is encoded into the deflate format. Some
ZIP implementations, notably java.util.zip, do not support this
combination, and will throw an exception. For example:

  java.util.zip.ZipException: only DEFLATED entries can have EXT descriptor
    at java.base/java.util.zip.ZipInputStream.readLOC(ZipInputStream.java:311)
    at java.base/java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:123)

Related links:
  aws/containers-roadmap#1112
  https://bugs.openjdk.java.net/browse/JDK-8143613
  https://stackoverflow.com/questions/47208272/android-zipinputstream-only-deflated-entries-can-have-ext-descriptor
@darlaker
Copy link
Contributor

darlaker commented Dec 1, 2020

Hello, Thank you so much for your input and for the additional information related to this issue. I am sharing your feedback with the service teams, and in the meantime, the updated note will certainly help to make sure we have this documented more fully. Thank you again for your detailed input and for helping us to make the docs better!

@darlaker darlaker merged commit 9dc8767 into awsdocs:main Dec 1, 2020
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.

2 participants