Skip to content

Enable deterministic pack timestamps for source-only builds - #10037

Merged
mthalman merged 1 commit into
dotnet:mainfrom
mthalman:dev/mthalman/manual-deterministic-pack
Oct 8, 2026
Merged

mthalman merged 1 commit into
dotnet:mainfrom
mthalman:dev/mthalman/manual-deterministic-pack

Conversation

@mthalman

@mthalman mthalman commented Oct 7, 2026

Copy link
Copy Markdown
Member

NuGet now requires an explicit DeterministicTimestamp opt-in for deterministic packing; SOURCE_DATE_EPOCH alone is no longer sufficient following NuGet/NuGet.Client#7652. The VMR needs to preserve reproducibility for source-only builds without opting Microsoft builds into this behavior.

Source-only builds with a nonempty SOURCE_DATE_EPOCH now pass that epoch value as DeterministicTimestamp through the shared inner-command environment, covering local, CI, and custom build commands. Passing the epoch rather than true is important because true uses the current time. Builds without an epoch remain unchanged.

The reproducibility pipeline now runs only source-only build and comparison legs. Epoch computation and injection are gated to source-only builds, signing environments are preserved, and the unused Microsoft container and vertical-stage trigger are removed. Standalone Microsoft artifact-comparison tests and baselines remain available.

Validation

  • Passed eight MSBuild evaluation and child-process propagation cases covering source-only and Microsoft modes, with and without an epoch supplied through environment variables or MSBuild properties.
  • Checked YAML/XML parsing, artifact and comparison wiring, clock shifting, and epoch/signing condition truth tables.
  • Reproducibility pipeline run 20261007.3 succeeded with no reported failures or issues.

Pass the source date epoch as DeterministicTimestamp to inner source-only commands and restrict reproducibility validation to source-only builds.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: a537e84d-ee09-4276-8c1a-f2cc962eed37
Copilot AI balanced review requested due to automatic review settings October 7, 2026 20:25
@mthalman
mthalman requested review from a team as code owners October 7, 2026 20:25
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The changes consistently scope deterministic timestamps and reproducibility validation to source-only builds without identified regressions.

0 open findings

What changed in this PR

Preserves deterministic NuGet packing for source-only VMR builds while leaving Microsoft builds unchanged.

Changes:

  • Propagates SOURCE_DATE_EPOCH as DeterministicTimestamp.
  • Restricts epoch setup to source-only builds.
  • Simplifies reproducibility CI to source-built SDK and artifact comparisons.
File Description
repo-projects/​Directory.Build.props Adds deterministic timestamp propagation.
eng/​pipelines/​unified-build-reproducibility-tests.yml Removes Microsoft-build resources and trigger.
eng/​pipelines/​templates/​stages/​reproducibility-tests.yml Removes Microsoft build and comparison legs.
eng/​pipelines/​templates/​jobs/​vmr-build.yml Gates epoch computation and injection.
eng/​pipelines/​templates/​jobs/​reproducibility-test.yml Specializes comparison for source-built artifacts.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

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.

3 participants