Skip to content

Fix APIScan pipeline token and registered version - #4498

Merged
paulmedynski merged 2 commits into
mainfrom
dev/paul/official-fix-apiscan-system-token
Aug 4, 2026
Merged

Fix APIScan pipeline token and registered version#4498
paulmedynski merged 2 commits into
mainfrom
dev/paul/official-fix-apiscan-system-token

Conversation

@paulmedynski

@paulmedynski paulmedynski commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Description

Fix APIScan configuration in the official and non-official OneBranch pipelines:

  • Expose $(System.AccessToken) as SYSTEM_ACCESSTOKEN in the shared package-build job, following the Guardian APIScan YAML guidance. This covers all six package build jobs that receive the auto-injected APIScan task.
  • Rename the global APIScan softwareVersion setting to OneBranch's documented versionNumber setting so the registered version 6.10 is passed instead of falling back to the Azure Pipelines build ID.

In sqlclient-official run 26212.1, all six APIScan tasks reported the missing SYSTEM_ACCESSTOKEN. APIScan then received version 163917 and failed release registration validation because that version was not registered.

This is an engineering pipeline-only change. It introduces no product or public API changes.

Issues

No linked issue.

Related pipeline run: sqlclient-official run 26212.1

Testing

  • break-on-SDL-error Enabled: sqlclient-non-official: 26216.1
  • break-on-SDL-error Disabled: sqlclient-non-official: 26216.2

Copilot AI review requested due to automatic review settings August 4, 2026 10:24
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board Aug 4, 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.

Pull request overview

Updates the OneBranch official and non-official pipelines to align APIScan configuration with Guardian/OneBranch expectations so APIScan can authenticate and uses the intended registered version value during release registration.

Changes:

  • Replaces the APIScan config key softwareVersion with versionNumber (set to '6.10') in both OneBranch entry pipelines.
  • Exposes $(System.AccessToken) as SYSTEM_ACCESSTOKEN at the shared package build job level so the auto-injected APIScan task can access it.

Reviewed changes

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

File Description
eng/pipelines/onebranch/sqlclient-official.yml Switches APIScan registered version setting to versionNumber: '6.10' for official runs.
eng/pipelines/onebranch/sqlclient-non-official.yml Switches APIScan registered version setting to versionNumber: '6.10' for non-official runs.
eng/pipelines/onebranch/jobs/build-buildproj-job.yml Exposes the OAuth token as SYSTEM_ACCESSTOKEN for the auto-injected APIScan task across all package build jobs.

@paulmedynski paulmedynski moved this from To triage to Backlog in SqlClient Board Aug 4, 2026
@paulmedynski paulmedynski added this to the 7.1.0-preview3 milestone Aug 4, 2026
@paulmedynski paulmedynski added the Area\Engineering Use this for issues that are targeted for changes in the 'eng' folder or build systems. label Aug 4, 2026
Copilot AI review requested due to automatic review settings August 4, 2026 11:36

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.

Pull request overview

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

Suppressed comments (1)

eng/pipelines/onebranch/sqlclient-official.yml:203

  • PR description says it fixes APIScan by exposing $(System.AccessToken) as SYSTEM_ACCESSTOKEN in the shared OneBranch package build job, but this PR’s diff only updates the registered versionNumber. A repo search under eng/pipelines/onebranch shows no occurrences of SYSTEM_ACCESSTOKEN, so the missing-token failure described in run 26212.1 would likely still reproduce.

Please include the token plumbing change as well (e.g., set a job variable like SYSTEM_ACCESSTOKEN: $(System.AccessToken) in the shared package build job template so the auto-injected APIScan task can authenticate).

        softwareName: Microsoft.Data.SqlClient

        # Similar to the software name, we have a single version registered as well.  This has
        # nothing to do with the NuGet package version.  It is purely an APIScan registration
        # value that points to our backend configuration.
        versionNumber: $(ApiScanSoftwareVersion)

@paulmedynski
paulmedynski marked this pull request as ready for review August 4, 2026 13:34
@paulmedynski
paulmedynski requested a review from a team as a code owner August 4, 2026 13:34
@paulmedynski
paulmedynski enabled auto-merge (squash) August 4, 2026 13:35
@paulmedynski paulmedynski moved this from Backlog to In review in SqlClient Board Aug 4, 2026

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

This change looks fine. Did we not end up needing the token changes?

@paulmedynski

Copy link
Copy Markdown
Contributor Author

@mdaigle - Correct, OneBranch injects the APIScan task, and it uses a certificate-based auth model. The message about a missing token in the logs is benign.

Comment thread eng/pipelines/onebranch/variables/onebranch-variables.yml
@paulmedynski
paulmedynski merged commit 1faf935 into main Aug 4, 2026
11 checks passed
@paulmedynski
paulmedynski deleted the dev/paul/official-fix-apiscan-system-token branch August 4, 2026 18:57
@github-project-automation github-project-automation Bot moved this from In review to Done in SqlClient Board Aug 4, 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.

6 participants