Visitar URL original
Validate localized authentication resources in Abstractions builds by paulmedynski · Pull Request #4942 · dotnet/SqlClient · GitHub
Skip to content

Validate localized authentication resources in Abstractions builds - #4942

Open
paulmedynski wants to merge 6 commits into
mainfrom
dev/paul/aot/phase-1.5
Open

paulmedynski wants to merge 6 commits into
mainfrom
dev/paul/aot/phase-1.5

Conversation

@paulmedynski

@paulmedynski paulmedynski commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Description

Validate Abstractions' localized authentication resources in the build pipeline. Authenticate NuGet feeds before building PackageValidator so its restore can use the build identity's Azure Artifacts credentials. No public API or runtime behavior changes.

Why?

Authentication resources need the same localization checks as driver resources, with independent exception lists so an allowance for one assembly cannot hide a problem in another.

How

  • Parameterize the shared validation step with an explicit resource directory and allowlist section.
  • Add an independent AbstractionsAllowedEnglishValueMatches section and run the Abstractions gate before analysis and compilation.
  • Preserve the driver's default allowlist section for direct script callers and retain existing validation gating and strict defaults.
  • Cover independent section selection, missing-section rejection, and isolation of allowlisted exceptions.
  • Document resource ownership and per-assembly allowlists.
  • Run NuGetAuthenticate@1 immediately before BuildPackageValidator in the shared package-validation step.

Issues

Part of #4193.

Testing

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.

🟡 Changes recommended

The new validation gate rejects eight missing neutral-resource keys in all 13 Abstractions satellite files, blocking official and default non-official builds before compilation.

1 open issue
What changed in this PR

Extends OneBranch localization validation to Abstractions-owned authentication resources, following their move from the driver in #4852. This supports the broader authentication AOT work without changing runtime behavior.

Changes:

  • Parameterizes resource directories and allowlist sections while preserving the driver’s script default.
  • Adds the Abstractions pre-build gate with an independent allowlist and existing validation controls.
  • Adds section-isolation tests and documents per-assembly validation.
File Description
eng/​pipelines/​onebranch/​steps/​validate-localization-step.yml Accepts explicit resource-directory and allowlist-section parameters.
eng/​pipelines/​onebranch/​scripts/​validate-localization.ps1 Selects the requested allowlist section, defaulting to the driver’s.
eng/​pipelines/​onebranch/​scripts/​tests/​validate-localization.Tests.ps1 Tests section selection, missing sections, and exception isolation.
eng/​pipelines/​onebranch/​jobs/​build-buildproj-job.yml Adds Abstractions validation and explicit driver settings.
BUILDGUIDE.md Documents localization gates and validation behavior.
.github/​instructions/​onebranch-pipeline-design.instructions.md Updates guidance for both resource-owning assemblies.
.config/​LocalizationValidationAllowlist.json Adds an independent, empty Abstractions allowlist.

Review effort: Balanced

@paulmedynski
paulmedynski added this pull request to stack #4943 October 29, 2026 14:13
@paulmedynski paulmedynski added this to the 8.0.0-preview1 milestone Oct 29, 2026
@paulmedynski paulmedynski moved this from To triage to In progress in SqlClient Board Oct 29, 2026
@paulmedynski paulmedynski added the Area\Engineering Use this for issues that are targeted for changes in the 'eng' folder or build systems. label Oct 29, 2026
@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.28%. Comparing base (dfa1967) to head (609b0cd).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4942      +/-   ##
==========================================
- Coverage   73.95%   69.28%   -4.67%     
==========================================
  Files         314      314              
  Lines       45849    69742   +23893     
==========================================
+ Hits        33907    48320   +14413     
- Misses      11942    21422    +9480     
Flag Coverage Δ
CI-SqlClient ?
sqlclient-pr 69.28% <ø> (?)

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

☔ View full report in Codecov by Harness.
📢 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.

Copilot AI balanced review requested due to automatic review settings October 29, 2026 16:27

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.

🔵 Needs a closer look

The Azure Artifacts authentication change still needs a successful OneBranch restore using the job identity, and the localization gate blocks official builds until translations arrive.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

cheenamalhotra commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Looks good overall!

Note: I would not call this AOT or use this term in this PR to avoid confusions btw, since its unrelated to AOT support. Therefore, this is not a blocker for 8.0.0-preview1 release.

Two additional optional review suggestions:

  • Allowlist naming: AllowedEnglishValueMatches and AbstractionsAllowedEnglishValueMatches are asymmetric and may scale poorly as more assemblies are added. A nested shape such as { "SqlClient": {...}, "Abstractions": {...} } could be cleaner.
  • Test coverage: The first test verifies that the Abstractions section does not borrow the driver allowlist, but not the reverse. Consider asserting that the same resources fail when run with the driver section containing UnrelatedDriverKey.

@paulmedynski paulmedynski modified the milestones: 8.0.0-preview1, 8.0.0 Nov 3, 2026
@paulmedynski
paulmedynski force-pushed the dev/paul/aot/phase-1.5 branch from b306348 to cea0807 Compare November 6, 2026 14:13
Copilot AI balanced review requested due to automatic review settings November 6, 2026 14:13
@paulmedynski paulmedynski changed the title AOT 5: Validate localized authentication resources in Abstractions builds Validate localized authentication resources in Abstractions builds Nov 6, 2026

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.

🔵 Needs a closer look

Required review-policy checks could not be completed because no trusted immutable source for the referenced policies was supplied.

No open issues 🎉

Review effort: Balanced

paulmedynski added a commit that referenced this pull request Nov 6, 2026
Use symmetric resource-owner sections in a commented JSONC allowlist. Update pipeline references and documentation, explain the schema and exception rules, and cover JSON comments and bidirectional section isolation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 6, 2026 14:25

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.

🔵 Needs a closer look

Required policy-specific checks remain unverified because no trusted immutable copies of the review policies and references were supplied.

No open issues 🎉

Review effort: Balanced

@paulmedynski
paulmedynski marked this pull request as ready for review November 6, 2026 17:56
@paulmedynski paulmedynski modified the milestones: 8.0.0, 8.1.0-preview1 Nov 10, 2026
@paulmedynski paulmedynski removed the Localization Needed PRs that contain changes that would need localization label Nov 11, 2026
Base automatically changed from dev/automation/aot-authentication-localization to main November 12, 2026 13:45
paulmedynski and others added 3 commits November 12, 2026 09:45
Include explicit resource-directory inputs, isolated allowlist selection, and all three behavioral tests in this layer; retain existing validation policy.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use symmetric resource-owner sections in a commented JSONC allowlist. Update pipeline references and documentation, explain the schema and exception rules, and cover JSON comments and bidirectional section isolation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@paulmedynski
paulmedynski force-pushed the dev/paul/aot/phase-1.5 branch from 9d33a25 to 99ad8eb Compare November 12, 2026 13:45
Copilot AI balanced review requested due to automatic review settings November 12, 2026 13:45

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.

🔵 Needs a closer look

Trusted immutable-base review references were unavailable, leaving supplemental review guidance unverified despite completed source inspection.

No open issues 🎉

3 resolved since last review

Review effort: Balanced

Preserve the complete Azure package identifier in Korean and Traditional Chinese authentication guidance, and the exact EventSource provider name in Portuguese.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 12, 2026 18:24
@paulmedynski

Copy link
Copy Markdown
Contributor Author

Review-body feedback

  • Fixed — Korean package identifier: Restored Microsoft.Data.SqlClient.Extensions.Azure and repaired the surrounding sentence in src/Microsoft.Data.SqlClient/src/Resources/Strings.ko.resx:598.
  • Fixed — Traditional Chinese package identifier: Restored Microsoft.Data.SqlClient.Extensions.Azure and repaired the surrounding sentence in src/Microsoft.Data.SqlClient/src/Resources/Strings.zh-Hant.resx:598.
  • Fixed — Portuguese tracing identifier: Restored the exact case-sensitive Microsoft.Data.SqlClient.EventSource name in src/Microsoft.Data.SqlClient/src/Resources/Strings.pt-BR.resx:598.

These three corrections are pushed in f096358. Their earlier resolved thread state did not establish that the current head contained the fixes.

  • Already Addressed — Czech, German, and Italian WAM package references: The WAM upgrade messages cited in the older reviews are no longer present in the current Abstractions resource set. No further edit was made for those three superseded findings.
  • Blocked — missing Abstractions translations: Strict validation still fails: each of the 13 satellite files lacks the same nine neutral-resource keys. All 14 Abstractions resource files are unchanged from the PR base. The strict gate was retained; translations remain pending. Report-only mode correctly reports SucceededWithIssues, not a localization pass.
  • Already Addressed — OneBranch restore evidence: Historical build 187118 successfully ran Authenticate NuGet feeds, restored and built PackageValidator, and validated packages. The build log explicitly records the restore and successful build. This is historical evidence, not a OneBranch run of the current head.
  • Informational — trusted review-policy references: For this feedback-resolution run, the author explicitly authorized immutable base dfa196743b3601e9c30d345728201da2d76dd44c as the policy source. Applicable guidance was read from that revision. This does not claim that earlier automated reviews completed their missing policy checks or that a new full-PR compliance review was performed.

Discussion-comment feedback

The three suggestions in #4942 (comment) were already addressed before this run:

  • Already Addressed — AOT framing: The current PR title and description describe localization validation rather than an AOT support feature.
  • Already Addressed — allowlist naming: Commit 99ad8eb783341721deb435ae1cf901c8152bbe3a provides symmetric SqlClient and Abstractions owner sections in .config/LocalizationValidationAllowlist.jsonc.
  • Already Addressed — reverse isolation coverage: The existing independent-allowlist test explicitly asserts that selecting SqlClient rejects UnrelatedDriverKey while selecting Abstractions succeeds.

Validation

  • Localization and pipeline-invocation Pester suites: 44 passed, 0 failed, 0 skipped.
  • Exact technical identifiers and format-placeholder checks: passed for all three corrected messages; the same checks detect the original defects.
  • Driver localization: passed, 13 satellites, 704 neutral keys, 76 approved English matches.
  • Abstractions strict localization: failed, pending translations as described above; report-only behavior verified.
  • git diff --check: passed.

All review bodies and discussion comments were inspected. No suppressed-findings block was present in any of the seven Copilot reviews. The author’s schema explanation was left open and unchanged; the Codecov status post required no reply.

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

No active review issues are recorded for the expanded localization validation and related pipeline updates.

No open issues 🎉

Review effort: Balanced

Preserve per-owner localization validation guidance alongside the shared XML documentation validation template.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 12, 2026 18:28

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

No active review issues remain for the owner-specific localization validation, authenticated package restores, and localized diagnostic-text corrections.

No open issues 🎉

Review effort: Balanced

@paulmedynski
paulmedynski enabled stacked auto-merge (squash) November 12, 2026 18:57

@mdaigle mdaigle 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.

Pipeline changes look good, but I'm hesitant to directly edit the translations.

@github-project-automation github-project-automation Bot moved this from In review to Waiting for customer in SqlClient Board Nov 12, 2026
Undo the Korean, Traditional Chinese, and Portuguese resource changes from f096358 while preserving the merge from main.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 13, 2026 13:28

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

No active review issues remain for the changes extending localization validation to Abstractions’ authentication resources.

No open issues 🎉

Review effort: Balanced

@paulmedynski paulmedynski moved this from Waiting for customer to In review in SqlClient Board Nov 13, 2026

This branch has not been deployed

No deployments
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. Hotfix 8.0.0 PRs that must be backported to release/8.0

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

6 participants