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

fix: remove current time from random.Image history #1678

Merged
merged 1 commit into from
Apr 27, 2023

Conversation

ktarplee
Copy link
Contributor

The history contained the time.Now() which I missed in my prior PR #1675 . Using the current time makes the random images non-reproducible which defeats the purpose of setting the random source. I removed the CreatedBy time since it is optional according to the OCI spec. We could instead use the random source to generate a random time but the time is not used for anything important so I do not see the value in doing that.

I added tests that revealed the issue then fixed the issue.

Related to #1674

This makes the images non-reproducible which defeats the purpose of setting the random source.
Copy link
Collaborator

@jonjohnsonjr jonjohnsonjr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again!

@jonjohnsonjr jonjohnsonjr merged commit d64f9e0 into google:main Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants