azure-quantum-python icon indicating copy to clipboard operation
azure-quantum-python copied to clipboard

PR CI Build from a Fork fails when attempting to add build tag

Open vxfield opened this issue 10 months ago • 0 comments

Summary

When the microsoft.azure-quantum-python.ci ADO Build Pipeline is triggered from a Fork PR, for example #596, the Build "azure-quantum" package Pipeline Job fails at step Set "azure-quantum" package version with error

Access denied. AzureQuantum Build Service (ms-azurequantum) needs Edit build quality permissions for vstfs:///Build/Build/51475 in team project AzureQuantum to perform the action.

Pipeline run

Run #20240405.4 (retained for investigation)

Initial investigation

  1. Running /azp run or Rerun failed jobs using a Microsoft employee account (vxfield) did not solve the problem (tried multiple times, before and after the step below).
  2. I checked the Permissions for microsoft.azure-quantum-python.ci and confirmed that the AzureQuantum Build Service (ms-azurequantum) has Edit build quality = Allow, which should give access to add build tags.
  3. When manually triggering a New Run for the same PR branch/tag (refs/pull/596/merge) the build succeeds (Run #20240405.3 (retained for investigation))

Full log

Starting: Set "azure-quantum" package version
==============================================================================
Task         : Command line
Description  : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
Version      : 2.237.1
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
==============================================================================
Generating script.
Script contents: shell
python set_version.py
========================== Starting Command Output ===========================
"C:\Windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "D:\a\_temp\4a45de20-5f57-45ef-8a6f-bbb2c675fe2e.cmd""
Package version: 2.0.1.dev0
Async Command Start: Add Build Tag
Async Command End: Add Build Tag
##[error]Access denied. AzureQuantum Build Service (ms-azurequantum) needs Edit build quality permissions for vstfs:///Build/Build/51475 in team project AzureQuantum to perform the action.
Async Command Start: Add Build Tag
Async Command End: Add Build Tag
##[error]Access denied. AzureQuantum Build Service (ms-azurequantum) needs Edit build quality permissions for vstfs:///Build/Build/51475 in team project AzureQuantum to perform the action.
Finishing: Set "azure-quantum" package version

vxfield avatar Apr 06 '24 05:04 vxfield