error: PULUMI_ACCESS_TOKEN must be set for login during non-interactive CLI sessions
hisuwh opened this issue · comments
What happened?
Preview pulumi build in GitHub actions on pull requests have started failing apparently for no reason. I have tried refreshing the PULUMI_ACCESS_TOKEN
Error: code: -2
stdout:
stderr: Command failed with exit code 255: pulumi stack select --stack org-name/stack-name --non-interactive
error: PULUMI_ACCESS_TOKEN must be set for login during non-interactive CLI sessions
err?: Error: Command failed with exit code 255: pulumi stack select --stack org-name/stack-name --non-interactive
error: PULUMI_ACCESS_TOKEN must be set for login during non-interactive CLI sessions
Expected Behavior
Preview build runs
Steps to reproduce
- uses: pulumi/actions@v3
with:
command: preview
stack-name: org-name/stack-name
work-dir: ./infrastructure/packages/project
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
ARM_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
ARM_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
ARM_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
Output of pulumi about
$ pulumi about
CLI
Version 3.79.0
Go Version go1.21.0
Go Compiler gc
Plugins
NAME VERSION
nodejs unknown
Host
OS Microsoft Windows 11 Pro
Version 10.0.22621 Build 22621
Arch x86_64
This project is written in nodejs: executable='C:\Program Files\nodejs\node.exe' version='v18.12.1'
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
Looks like the same as #1010.
No because I'm using the Pulumi cloud backend not an Azure blob
Yes but I suspect they might have common cause in backend information being lost somehow. I won't close this as a duplicate though, just in case it is actually unique.
@hisuwh I'm currently trying to reproduce and fix this issue, but am so far failing to reproduce this consistently (I thought I did once, but then never managed to again). A few questions that might help me track this down:
- Does this error happen consistently for you, or is it flaky?
- Would you be willing to share the GitHub actions logs with me (can be privately via email)?
- Is the same happening with pulumi/actions@v5?
@tgummerer this is working again now. I'm not sure what's changed - we didn't make any changes to our setup so may have been on the pulumi service side?
Ok great! I think what happened is that pulumi login
failed, and we silently ignored the failure. It's probably hard to figure out what exactly happened at this point, but I just merged #1062, which should at least give a better error message if this happens again.
I'm gonna close this issue out since it's no longer happening, but feel free to reopen if you'd like anything else to happen here.