Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: PULUMI_ACCESS_TOKEN must be set for login during non-interactive CLI sessions #1014

Closed
hisuwh opened this issue Sep 1, 2023 · 6 comments
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Milestone

Comments

@hisuwh
Copy link

hisuwh commented Sep 1, 2023

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).

@hisuwh hisuwh added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Sep 1, 2023
@Frassle
Copy link
Member

Frassle commented Sep 1, 2023

Looks like the same as #1010.

@hisuwh
Copy link
Author

hisuwh commented Sep 1, 2023

No because I'm using the Pulumi cloud backend not an Azure blob

@Frassle
Copy link
Member

Frassle commented Sep 1, 2023

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.

@justinvp justinvp removed the needs-triage Needs attention from the triage team label Sep 7, 2023
@justinvp justinvp added this to the 0.94 milestone Sep 7, 2023
@justinvp justinvp self-assigned this Sep 7, 2023
@justinvp justinvp modified the milestones: 0.94, 0.95 Oct 3, 2023
@justinvp justinvp modified the milestones: 0.95, 0.96 Oct 24, 2023
@mikhailshilkov mikhailshilkov modified the milestones: 0.96, 0.97 Nov 23, 2023
@justinvp justinvp modified the milestones: 0.97, 0.98 Dec 18, 2023
@tgummerer tgummerer assigned tgummerer and unassigned justinvp Jan 5, 2024
@tgummerer
Copy link
Contributor

@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?

@justinvp justinvp modified the milestones: 0.98, 0.99 Jan 8, 2024
@hisuwh
Copy link
Author

hisuwh commented Jan 9, 2024

@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?

@tgummerer tgummerer added the resolution/fixed This issue was fixed label Jan 9, 2024
@tgummerer
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

No branches or pull requests

5 participants