pulumi / pulumi-az-pipelines-task

Azure Pipelines task extension for running Pulumi apps.
https://marketplace.visualstudio.com/publishers/pulumi
Apache License 2.0
27 stars 19 forks source link

Add logging when PR comment fails to be written in Azure DevOps #135

Open sondr3 opened 1 year ago

sondr3 commented 1 year ago

Describe the bug We're setting up our CI in Azure Pipelines for Pulumi and have gotten it to work, however we have been unable to get it to create comments in the PRs where we change Pulumi code. The CI successfully completes but doesn't create a comment.

To Reproduce

- task: Pulumi@1
  inputs:
    azureSubscription: ${{ parameters.azureSubscription }}
    command: preview
    cwd: .pulumi
    loginArgs: $(PULUMI_BACKEND_URL)
    stack: ${{ parameters.stack }}
    createPrComment: true
  env:
    BUILD_ID: $(Build.BuildId)
    SYSTEM_ACCESSTOKEN: $(System.AccessToken)
    AZURE_STORAGE_ACCOUNT: $(AZURE_STORAGE_ACCOUNT)
    AZURE_STORAGE_KEY: $(AZURE_STORAGE_KEY)
    PULUMI_BACKEND_URL: $(PULUMI_BACKEND_URL)

Expected behavior A comment appearing in the relevant PR.

Additional context We have configured all relevant authorizations in the Users settings in Azure Devops.

dixler commented 1 year ago

Hi, thanks for filing this issue. We'll take a look at this when we can.

dixler commented 1 year ago

It was suggested that it still might be a permissions issue.

At a guess though, I’d say it’s probably a permission issue? Like the token injected doesn’t have perma to write to the PR

I'll re-title this issue to suggest adding more logging in the github action as that may be more actionable for us and could alleviate the pain you're experiencing.