Closed thoemmi closed 1 year ago
We are seeing a similar issue after 1.1.0 upgrade. Our deployment pipelines are failing with the error Could not determine the PR ID
.
This version is a breaking change that requires us to edit our pipelines and explicitly add the configuration value: createPrComment: false
am I understanding that PR #113 is defaulting to comment to true
? As shown here:
{
"name": "createPrComment",
"type": "boolean",
"label": "Add the Pulumi log output as a PR comment",
"defaultValue": "true",
"helpMarkDown": "Check this option if you would like this task to add a comment to your PR (when applicable.) **Note**: Your project's build service user must have the `Contribute to pull requests` permission for this to work. Additionally, you must map the `System.AccessToken` variable as an env var for this task: `SYSTEM_ACCESSTOKEN: $(System.AccessToken)`.",
"required": "false"
}
In case this helps others, until the referenced PR is pushed out, one can set the "createPrComment" property in the pipeline code as such:
- task: Pulumi@1
inputs:
azureSubscription: '$(serviceConnection)'
stack: "$(pulumiOrg)/$(pulumiStack)"
command: 'up'
args: '--yes'
createStack: 'true' # create the stack if it does not already exist
# This is not a PR pipeline and so I don't want it to try to add a PR comment.
createPrComment: 'false'
displayName: 'Pulumi Up'
This morning we've updated the Pulumi DevOps Extension to version 1.1. Afterwards, our release pipeline fails with this error:
As it turned out, the option Job access token is required to create/update is enabled by default. However, this doesn't make sense for release pipelines.
As a workaround, I now have to edit all of our release pipelines to disable this option.