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

ci: set constant $SOURCE_DATE_EPOCH #1900

Merged
merged 2 commits into from
Nov 19, 2022

Conversation

agoose77
Copy link
Collaborator

@agoose77 agoose77 commented Nov 19, 2022

The CI currently tries to figure out the last modification time of the source code for reproducibility. We use this value in the following ways:

  • setting a timestamp for the generated test files
  • setting the PAX headers for the built sdist

We really need this figure to be exact; when we check whether awkward-cpp has been released, we do this as safely as possible by building an sdist and comparing the SHA256. Of course, if any generated timestamps are different, the checksums will not agree.

There is no single notion of what the "last modified" time of the source should be; really, the generated C++ tests should use the modification time of the kernel specification/data, whereas the awkward-cpp package should use the last commit of anything inside the subdirectory. Needless to say, to properly support all of this, we would

  1. need to add a new env var / config option for the test generation and download more comprehensive git history in the CI workflows.
  2. exclusively use SOURCE_DATE_EPOCH, and set it to a constant value.

This PR started with option (2) to make SOURCE_DATE_EPOCH constant in every workflow. However, (1) is feasible, and the fix is to just download the entire repository history in a single job. We do not need to do this for the build-test workflow, which doesn't need an accurate value for SOURCE_DATE_EPOCH; the build cache just needs a stable timestamp.


📚 The documentation for this PR will be available at https://awkward-array.readthedocs.io/en/agoose77-ci-simplify-source-date-epoch/ once Read the Docs has finished building 🔨

@codecov
Copy link

codecov bot commented Nov 19, 2022

Codecov Report

Merging #1900 (8105b29) into main (73f8e34) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

@agoose77 agoose77 enabled auto-merge (squash) November 19, 2022 18:15
@agoose77 agoose77 changed the title ci: set constant $SOURCE_DATE_EPOCH ci: fix compution of SOURCE_DATE_EPOCH Nov 19, 2022
@agoose77 agoose77 disabled auto-merge November 19, 2022 18:15
@agoose77 agoose77 changed the title ci: fix compution of SOURCE_DATE_EPOCH ci: set constant $SOURCE_DATE_EPOCH Nov 19, 2022
@agoose77 agoose77 enabled auto-merge (squash) November 19, 2022 18:17
@agoose77 agoose77 merged commit c0fe334 into main Nov 19, 2022
@agoose77 agoose77 deleted the agoose77/ci-simplify-source-date-epoch branch November 19, 2022 18:19
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.

1 participant