Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Stable zip archives - v1 #18

Merged

Conversation

ahlinc
Copy link
Contributor

@ahlinc ahlinc commented Jun 10, 2020

  • Implemented stable reproducible zip archiving. This PR fixes problem with lambda redeployments when
  • Current implementation just sets for all archived files an earliest possible date inside of zip archives like 1980-01-01. This limitation will be addressed by a future PR on this topic.
  • Current implementation doesn't provide python compiled modules (*.pyc files) inside of zip archive due to inability to produce reproducible compilation artifacts by standard pip install facilities. Standard python compilation facilities also lack of needed abstraction level and out of the box provide things that can only write compiled artifacts directly to a filesystem. This issues also will be addressed in future.

ahlinc and others added 22 commits June 9, 2020 12:13
Usage:
  > python package.py zip foo.zip examples/simple examples/fixtures -v -t `date +%s`
  > python package.py zip foo.zip examples/fixtures -v -t `date +%s -d '- 4 days'`
The order will be a dir itself then all dir's files folowed by sub dirs.

It looks like:
  dir1/            - A dir itself
  dir1/file1       - All dir's files
  dir1/file2
  dir1/dir2/       - A dir's sub dir after files
  dir1/dir2/file1
  dir1/dir2/file2

An example may be discovered by:
  > python package.py zip foo.zip examples/fixtures
The cause is that 'pip install' makes wheels unpacking to random
temporary folders and it seems compiles all *.py files also inside of
the temp folders. And each *.pyc file contains a reference
to its original source code file for some reason.
@antonbabenko antonbabenko merged commit dafada2 into terraform-aws-modules:master Jun 10, 2020
@ahlinc ahlinc deleted the feat/stable-zip-archives/v1 branch June 11, 2020 11:23
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 10, 2022
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.

None yet

2 participants