Skip to content

CI: PR publish jobs fail with "Could not find the module Az.Accounts" (PSGallery repository also missing on hosted agents) #10331

Closed

Description

Summary

Since 2026-10-05, the AzurePowerShell@5 Upload release to storage account step in the Publish_For_PR jobs fails on Azure DevOps hosted Linux agents before running our script:

Could not find the module Az.Accounts with given version. If the module was recently installed,
retry after restarting the Azure Pipelines task agent.
At .../AzurePowerShell_.../5.279.3/InitializeAz.ps1:41 char:5
##[error]PowerShell exited with code '1'.

This affects both consumers:

  • core pipeline: eng/pipelines/templates/steps/publish-cli.yml (azure-dev - cli (PublishIntegration Publish_For_PR), e.g. build 6920430 job 0a6b4591 log 1226)
  • extension pipelines: eng/pipelines/templates/steps/publish-extension-storage.yml (e.g. build 6920333 job 41244997 log 469)

The same jobs passed earlier: azure-dev - cli (PublishIntegration Publish_For_PR) on #10280 at 2026-10-04T19:16Z, and the evaluations/dataset extension Publish_For_PR jobs on #10277 at 2026-10-01.

Attempted workaround and what it showed

A defensive pre-install step (select the highest valid /usr/share/az_* cache, otherwise Install-Module Az.Accounts -Repository PSGallery) was tried in #10327. On commit ec72469 every extension Publish_For_PR job (18 of 18) failed at that new step instead:

Get-PackageSource: Unable to find repository 'PSGallery'. Use Get-PSRepository to see all available repositories.

(build 6920681 log 444). So the hosted image/agent currently has neither a usable Az.Accounts module nor a registered PSGallery repository, and installing from PSGallery is not a viable workaround from the repository side.

Unrelated shared red

azure-dev - cli (BuildAndTest GenerateReleaseArtifacts) also fails on main itself and on unrelated PRs (builds 6920281, 6920354, 6920084; PR #10192) because pip install jsonschema2md hits Errno 13 Permission denied: /usr/lib/python3.12/site-packages/PyYAML-6.0.1-py3.12.egg-info. That is tracked separately in #10328 / #10327.

Needed

Azure SDK engineering-systems / hosted pool owners need to confirm the agent image change (images observed: azsdk-pool agents on image 60.0.0) or provide a supported way to obtain Az.Accounts for AzurePowerShell@5 in these pipelines.

This is a CI/environment tracking issue; no product behavior is affected.

Activity

  1. added
    engsysEngineering systems
    area/pipelineCI/CD pipeline config (GH Actions, AzDO)
    regressionBroke something that worked before
    on Oct 6, 2026
  2. m7md7sien commented on Oct 6, 2026

    @m7md7sien
    ContributorAuthor

    Additional evidence (2026-10-06): the same failure now reproduces on the core pipeline for #10327 after its Az workaround was withdrawn: build 6920830, job 0a6b4591 (azure-dev - cli (PublishIntegration Publish_For_PR)), log 1226, agent azsdk-pool 47:

    Could not find the module Az.Accounts with given version. ... InitializeAz.ps1:41
    ##[error]PowerShell exited with code '1'.
    

    On that head every other core job passed (BuildCLI Linux/Mac/Windows, GenerateReleaseArtifacts, MergeLinuxPackages, cross builds, SDL), so this is the only remaining red in the aggregate azure-dev - cli check. Agents observed so far: azsdk-pool 11, 286 and 47. A repository-side pre-install via PSGallery is not viable: Unable to find repository 'PSGallery' on 18/18 extension Publish_For_PR jobs (build 6920681, log 444).

  3. m7md7sien commented on Oct 6, 2026

    @m7md7sien
    ContributorAuthor

    Timeline evidence that this is environmental and not caused by any one PR (latest Publish_For_PR result per open PR head, as of 2026-10-06 ~04:30Z):

    These PRs are unrelated to the Foundry evaluation work. The regression window is therefore 2026-10-05 19:45Z - 21:13Z, consistent with a hosted-agent image/repository change (agents observed: azsdk-pool 11, 286, 47). Infra owners can use this window to correlate image rollouts.

  4. JeffreyCA commented on Oct 8, 2026

    @JeffreyCA
    Contributor

    Fixed by EngSys team by reverting image change and #10359

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/pipelineCI/CD pipeline config (GH Actions, AzDO)engineering itemInternal engineering work itemengsysEngineering systemsregressionBroke something that worked before

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions