Closed alytle closed 4 years ago
Hi @GlieseRay:
Do you still have that Surface laptop to reproduce this? It may be a bit late but considering adding a test? (and figure out how to run windows tests on CodeBuild)
Kotaimen
@Kotaimen Sure, will take look
Tested on local windows machine. Seems OK now. Close this ticket.
When a template file size is greater than TEMPLATE_BODY_SIZE_LIMIT on Windows, we see this error:
The problem is here:
https://github.com/Kotaimen/awscfncli/blob/42297e66e91ef7f9d204115f0d3c44cd3ee75dad/awscfncli2/runner/runbook/package.py#L112-L130
Referring to a NamedTemporaryFile by name after instantiation is not cross platform, and fails on Windows. From http://docs.python.org/library/tempfile.html#tempfile.NamedTemporaryFile:
See https://github.com/bravoserver/bravo/issues/111 for another example of this issue.
See also https://github.com/bravoserver/bravo/issues/111#issuecomment-826990 for a suggestion on a Windows alternative.
Another suggestion (from https://github.com/deepchem/deepchem/issues/707#issuecomment-556002823) is to stop using NamedTemporaryFile entirely: