Skip to content

Fix non-deterministic NuGet packages by enabling ContinuousIntegrationBuild for OneBranch builds#4251

Merged
apoorvdeshmukh merged 2 commits into
mainfrom
dev/ad/nuget-fix
Apr 30, 2026
Merged

Fix non-deterministic NuGet packages by enabling ContinuousIntegrationBuild for OneBranch builds#4251
apoorvdeshmukh merged 2 commits into
mainfrom
dev/ad/nuget-fix

Conversation

@apoorvdeshmukh
Copy link
Copy Markdown
Contributor

Description

Restore deterministic builds for OneBranch-produced NuGet packages so they pass NuGet Package Explorer's "Deterministic (build)" check.
Introduced a BuildForRelease gate in src/Directory.Build.props that drives ContinuousIntegrationBuild. The two OneBranch pipelines set BuildForRelease: true; PR/CI and local dev builds are unchanged.

Testing

The official and non-official run should validate this change.

Guidelines

Please review the contribution guidelines before submitting a pull request:

Copilot AI review requested due to automatic review settings April 30, 2026 15:03
@apoorvdeshmukh apoorvdeshmukh requested a review from a team as a code owner April 30, 2026 15:03
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board Apr 30, 2026
@paulmedynski paulmedynski added this to the 7.1.0-preview1 milestone Apr 30, 2026
@paulmedynski paulmedynski moved this from To triage to In review in SqlClient Board Apr 30, 2026
@paulmedynski paulmedynski self-assigned this Apr 30, 2026
@paulmedynski paulmedynski added the Area\Engineering Use this for issues that are targeted for changes in the 'eng' folder or build systems. label Apr 30, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR restores deterministic OneBranch-produced NuGet packages by introducing a BuildForRelease MSBuild property (defaulting to false) and using it to drive ContinuousIntegrationBuild for OneBranch builds, enabling portable source paths in embedded PDBs.

Changes:

  • Add BuildForRelease to src/Directory.Build.props and default ContinuousIntegrationBuild to $(BuildForRelease) when not explicitly set.
  • Set BuildForRelease: true in the OneBranch official pipeline.
  • Set BuildForRelease: true in the OneBranch non-official pipeline to exercise the deterministic build path.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/Directory.Build.props Introduces BuildForRelease and gates ContinuousIntegrationBuild defaults to enable deterministic source paths for release builds.
eng/pipelines/onebranch/sqlclient-official.yml Sets BuildForRelease=true for official OneBranch builds.
eng/pipelines/onebranch/sqlclient-non-official.yml Sets BuildForRelease=true for non-official OneBranch builds to validate determinism in pre-release runs.

Comment thread src/Directory.Build.props
Comment thread eng/pipelines/onebranch/sqlclient-official.yml Outdated
Comment thread src/Directory.Build.props Outdated
@github-project-automation github-project-automation Bot moved this from In review to In progress in SqlClient Board Apr 30, 2026
Comment thread eng/pipelines/onebranch/sqlclient-non-official.yml
@paulmedynski paulmedynski moved this from In progress to In review in SqlClient Board Apr 30, 2026
@apoorvdeshmukh apoorvdeshmukh enabled auto-merge (squash) April 30, 2026 16:54
@apoorvdeshmukh apoorvdeshmukh merged commit 7a01dbe into main Apr 30, 2026
301 checks passed
@apoorvdeshmukh apoorvdeshmukh deleted the dev/ad/nuget-fix branch April 30, 2026 17:12
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.29%. Comparing base (061c45b) to head (d26db38).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4251      +/-   ##
==========================================
- Coverage   66.05%   64.29%   -1.76%     
==========================================
  Files         277      272       -5     
  Lines       42988    65783   +22795     
==========================================
+ Hits        28396    42297   +13901     
- Misses      14592    23486    +8894     
Flag Coverage Δ
CI-SqlClient ?
PR-SqlClient-Project 64.29% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-project-automation github-project-automation Bot moved this from In review to Done in SqlClient Board Apr 30, 2026
paulmedynski pushed a commit that referenced this pull request May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area\Engineering Use this for issues that are targeted for changes in the 'eng' folder or build systems.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants