-
-
Notifications
You must be signed in to change notification settings - Fork 289
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
Add new --no-use-system-time
flag to use a deterministic timestamp in built PEX
#722
Merged
Merged
Changes from 16 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
8b2fd37
Add deterministic_datetime() function
Eric-Arellano b440fbf
Proof of concept #1: monkey patch approach that works on 3.7
Eric-Arellano 4b53a9e
Add new CLI flag --use-system-time
Eric-Arellano 226c3bc
Approach #2: use writestr()
Eric-Arellano baa20c4
Add test for deterministic timestamp
Eric-Arellano a27122c
Unksip 6/7 of the acceptance tests!
Eric-Arellano e9a067a
Explain reproducibility
Eric-Arellano 0295ddc
Setup integration tests to use --no-use-system-time
Eric-Arellano 80adeff
Fix regression to normal case
Eric-Arellano 5fe4a59
Set default to true to ensure we arent breaking anything
Eric-Arellano 829d12d
Test deterministic timestamp against all CI
Eric-Arellano fdc1dc0
Skip acceptance tests still failing
Eric-Arellano 80b5008
Fix typo in link
Eric-Arellano 794084e
Fix bug with permissions not copying
Eric-Arellano 952cf9e
Revert "Test deterministic timestamp against all CI"
Eric-Arellano a7b8558
Ensure env gets cleaned up, even if test fails
Eric-Arellano fda9a16
Merge branch 'master' of github.com:pantsbuild/pex into timestamps
Eric-Arellano f7364de
Convert deterministic_datetime from a function to a constant
Eric-Arellano 0835f60
Revert making deterministic_datetime a constant
Eric-Arellano 0c9bd41
No longer respect SOURCE_DATE_EPOCH
Eric-Arellano 9774c2a
Improve comments
Eric-Arellano 477e2eb
Change rationale for not respecting SOURCE_DATE_EPOCH
Eric-Arellano 631b3ed
Drop overly verbose comment about SOURCE_DATE_EPOCH
Eric-Arellano 69106c0
Create new zip_info_from_file() function as part of PermPreservingZip…
Eric-Arellano d82cd99
Always use zf.writestr()
Eric-Arellano b9d36e8
Remove bad extra whitespace
Eric-Arellano ebe15c2
Store DETERMINISTIC_DATETIME as a 6-tuple rather than datetime
Eric-Arellano 099f146
Invert ternary expression
Eric-Arellano 23c5a6f
Oops, typo in constant
Eric-Arellano 8bb8ed4
Deduplicate slicing the time.struct_time
Eric-Arellano a528eb4
Don't lie about expected input
Eric-Arellano adf2726
Fix typo that was causing failures
Eric-Arellano File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Open to suggestions for a better name.
The main use case I want to optimize for is when deterministic time will be the default. For example, atm
--use-deterministic-time
would probably be a good name, but once we make the switch then--no-use-deterministic-time
wouldn't be very descriptive for what the behavior would end up being.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In pantsbuild/pants#6094 we made a flag
-jar-creation-time
which, if not set, defaulted to the current time. Not sure whether this is a good or bad default for pex, but it's some prior art :)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@illicitonion : I think that we agreed on the other issue that we want this enabled by default, so the default would need to be stable.
@Eric-Arellano : This name looks good I think?