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

Getting Unexpected input warning when 'plan' is mentioned #1016

Open
smushtaqshell opened this issue Sep 11, 2023 · 11 comments
Open

Getting Unexpected input warning when 'plan' is mentioned #1016

smushtaqshell opened this issue Sep 11, 2023 · 11 comments
Labels
awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). kind/bug Some behavior is incorrect or out of spec

Comments

@smushtaqshell
Copy link

smushtaqshell commented Sep 11, 2023

What happened?

I am trying to save Pulumi preview output and publish it as an artifact, so that i can reuse it later. But i am getting below error. Even setting PULUMI_EXPERIMENTAL: true didnt work.

Unexpected input(s) 'plan', valid inputs are ['command', 'stack-name', 'pulumi-version', 'work-dir', 'comment-on-pr', 'comment-on-pr-number', 'github-token', 'cloud-url', 'secrets-provider', 'parallel', 'message', 'config-map', 'expect-no-changes', 'diff', 'replace', 'target', 'target-dependents', 'policyPacks', 'policyPackConfigs', 'refresh', 'upsert', 'remove', 'edit-pr-comment', 'color', 'exclude-protected']

Expected Behavior

It should not give the above warning and should store the Pulumi Preview command output in the given filename. Also, warning should include 'plan' in the list of valid inputs

Steps to reproduce

add plan: filename.json to the inputs of github action pulumi/actions@v4

Output of pulumi about

Logged in to fv-az1233-687 as runner (azblob://state)
running 'dotnet build -nologo .'
Determining projects to restore...

All projects are up-to-date for restore.

proj -> /home/runner/work/xx/xx/bin/Debug/net6.0/x.dll

Build succeeded.
0 Warning(s)
0 Error(s)

Time Elapsed 00:00:01.96

'dotnet build -nologo .' completed successfully
CLI
warning: Failed to get information about the current stack: No current snapshot
Version 3.80.0
Go Version go1.21.0
Go Compiler gc

Plugins
NAME VERSION
azure-native 2.6.0
dotnet unknown

Host
OS ubuntu
Version 22.04
Arch x86_64

This project is written in dotnet: executable='/usr/bin/dotnet' version='7.0.400'

Backend
Name fv-az12xx-6xx
URL azblob://state
User runner
Organizations

Dependencies:
NAME VERSION
Pulumi 3.56.2
Pulumi.AzureNative 2.6.0

Pulumi locates its logs in /tmp by default
Previewing update (stackname):
running 'dotnet build -nologo .'
Determining projects to restore...

All projects are up-to-date for restore.

proj -> /home/runner/work/xx/xx/bin/Debug/net6.0/x.dll

Build succeeded.

0 Warning(s)
0 Error(s)

Time Elapsed 00:00:01.93

'dotnet build -nologo .' completed successfully

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

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

Frassle commented Sep 11, 2023

Are you sure your referencing the latest version of the action. "plan" is listed in the inputs (

plan:
) and there's a test that runs with plan (
plan: update-plan.json
).

I see no reason why this wouldn't just work.

@justinvp justinvp added awaiting-feedback Blocked on input from the author and removed needs-triage Needs attention from the triage team labels Sep 12, 2023
@smushtaqshell
Copy link
Author

smushtaqshell commented Sep 12, 2023

Are you sure your referencing the latest version of the action. "plan" is listed in the inputs (

plan:

) and there's a test that runs with plan (

plan: update-plan.json

).
I see no reason why this wouldn't just work.

Yes, I am using v4 as below. I also looked at the code and was unsure why it doesnt work and seeing the warning

- name: Pulumi Preview
  uses: pulumi/actions@v4
  with:
    command: preview
    stack-name: ${{ inputs.PL_STACK_NAME }}
    upsert: true
    cloud-url: azblob://${{ inputs.PL_STATE_CONTAINER_NAME }}
    diff: true
    color: always
    plan: pulumi-plan.json

@Frassle
Copy link
Member

Frassle commented Sep 12, 2023

🤦‍♂️ It hasn't been in an actual release yet.

I'll get a v4.5 release organised, should fix this.

@smushtaqshell
Copy link
Author

🤦‍♂️ It hasn't been in an actual release yet.

I'll get a v4.5 release organised, should fix this.

I noticed the new release was available and thought of giving it a try. It saved the plan OK in pulumi preview but failed with the below error when using the download plan file. It works fine when NOT using the created plan file in the previous step.

I am using azblob backend and all environment variables are set correctly.

/home/runner/work/_actions/pulumi/actions/v4/webpack:/pulumi-github-action/node_modules/@pulumi/pulumi/automation/errors.js:77 : new CommandError(result); ^ CommandError: code: -2 stdout: stderr: Command failed with exit code 255: pulumi stack select --stack sbx --non-interactive error: PULUMI_ACCESS_TOKEN must be set for login during non-interactive CLI sessions

@Frassle
Copy link
Member

Frassle commented Sep 18, 2023

That looks like #1010.

@smushtaqshell
Copy link
Author

Although the error message is the same but the cause is different in this case.

It only fails when i try to reuse the saved plan. If i dont use the saved plan in Pulumi up, it works fine. I am using azblob as pulumi backend

@smushtaqshell
Copy link
Author

smushtaqshell commented Sep 20, 2023

That looks like #1010.

🤦‍♂️ It hasn't been in an actual release yet.

I'll get a v4.5 release organised, should fix this.

I am now getting below error when running Pulumi Update command using the saved plan. Pulumi preview works fine and saves the plan correctly. I am using pulumi/actions@v4 however strangely the command getting executed contains this '--exec-agent pulumi/actions@v3'. Not sure if its relevant

  /home/runner/work/_actions/pulumi/actions/v4/webpack:/pulumi-github-action/node_modules/@pulumi/pulumi/automation/errors.js:77
                      : new CommandError(result);
  ^
  CommandError: code: -2
   stdout: 
   stderr: Command failed with exit code 255: pulumi up --yes --skip-preview --diff --exec-agent pulumi/actions@v3 --plan pulumi-plan-SBX.json --color always --exec-kind auto.local --stack sbx --non-interactive
  error: error decrypting secret value: cipher: message authentication failed
   err?: Error: Command failed with exit code 255: pulumi up --yes --skip-preview --diff --exec-agent pulumi/actions@v3 --plan pulumi-plan-SBX.json --color always --exec-kind auto.local --stack sbx --non-interactive
  error: error decrypting secret value: cipher: message authentication failed

@wSedlacek
Copy link

wSedlacek commented Jan 23, 2024

I have noticed the error decrypting secret value: cipher: message authentication failed Error when running up with a saved plan using the automation API.

stderr: Command failed with exit code 255: pulumi up --yes --skip-preview --parallel 3 --plan dist/plan2.json --color always --verbose 4 --client=127.0.0.1:55499 --exec-kind auto.inline --stack development --non-interactive
error: error decrypting secret value: cipher: message authentication failed
CLI          
Version      3.102.0
Go Version   go1.21.5
Go Compiler  gc

Plugins
NAME        VERSION
aws         6.18.1
docker      4.5.1
kubernetes  4.7.1
nodejs      unknown

Host     
OS       darwin
Version  14.1.2
Arch     arm64

This project is written in nodejs: executable='/Users/wsedlacek/.local/share/nvm/v20.10.0/bin/node' version='v20.10.0'

Backend        
URL            file://~
User           wsedlacek
Organizations  
Token type     personal

@mikhailshilkov mikhailshilkov added needs-triage Needs attention from the triage team and removed awaiting-feedback Blocked on input from the author labels Jun 5, 2024
@tgummerer
Copy link
Contributor

@wSedlacek sorry for the delayed response here. It looks like pulumi is unable to decrypt the secrets in the plan here. I also notice you are using the local backend, so I'm wondering if the secret manager is set up correctly, and in the same way for both where the plan is created, and when the plan is consumed?

@tgummerer tgummerer added awaiting-feedback Blocked on input from the author and removed needs-triage Needs attention from the triage team labels Jun 11, 2024
@ruben-janssens
Copy link

@tgummerer I am facing the same issue currently and can confirm that I have this issue even when using the same secret manager when generating the plan and when consuming it.
In my use case we use a Azure blob storage as the backend with passphrase as the secret manager.

@pulumi-bot pulumi-bot added needs-triage Needs attention from the triage team and removed awaiting-feedback Blocked on input from the author labels Jun 17, 2024
@ruben-janssens
Copy link

I have opened an issue on the pulumi repository as this is not really a part of pulumi actions #16412

@justinvp justinvp added awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). and removed needs-triage Needs attention from the triage team labels Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

8 participants