Closed jjinno closed 3 months ago
Thx. Ad astra!
This PR is included in version 7.2.4 :tada:
It looks like something wrong:
if not os.exists(self._tmp_filename):
return
It will raise an exception!!!
The correct version is: os.path.exists
I'm going to add python lint checks to CI to catch this sort of mistakes.
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Description
Allow
FileNotFoundError
to be ignored onclose()
to compensate for file already being renamedMotivation and Context
There appear to be some conditions by which the
self._tmp_filename
file has already been renamed/moved toself.filename
prior to (or racing with) the calling ofclose()
.In this case
FileNotFoundError
will be thrown, causing the Terraform to fail. But without changing anything, a subsequent run of the Terraform will succeed because the ZIP file already exists. (aka: it was created correctly on the first pass)Breaking Changes
How Has This Been Tested?
examples/*
to demonstrate and validate my change(s)examples/*
projectspre-commit run -a
on my pull request