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

Improve documentation around usage of LocalWorkspace.CreateAsync #391

Open
smithrobs opened this issue Nov 16, 2024 · 0 comments
Open

Improve documentation around usage of LocalWorkspace.CreateAsync #391

smithrobs opened this issue Nov 16, 2024 · 0 comments
Labels
area/docs kind/enhancement Improvements or new features

Comments

@smithrobs
Copy link

Hello!

  • Vote on this issue by adding a 👍 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

Slightly related to the tests for #382 - it seems LocalWorkspace.CreateAsync requires either WorkDir or ProjectSettings to be set. Otherwise, when attempting to delete the stack an unhelpful error is given as (I assume) there's no project to infer:

  Error Message:
   Pulumi.Automation.Commands.Exceptions.CommandException : code: 255
stdout: 
stderr: error: if you're using the --stack flag, pass the fully qualified name (organization/project/stack)


  Stack Trace:
     at Pulumi.Automation.Commands.LocalPulumiCommand.RunAsyncInner(IList`1 args, String workingDir, IDictionary`2 additionalEnv, Action`1 onStandardOutput, Action`1 onStandardError, String stdIn, EventLogFile eventLogFile, CancellationToken cancellationToken) in /_/sdk/Pulumi.Automation/Commands/LocalPulumiCommand.cs:line 356
   at Pulumi.Automation.Commands.LocalPulumiCommand.RunInputAsync(IList`1 args, String workingDir, IDictionary`2 additionalEnv, Action`1 onStandardOutput, Action`1 onStandardError, String stdIn, Action`1 onEngineEvent, CancellationToken cancellationToken) in /_/sdk/Pulumi.Automation/Commands/LocalPulumiCommand.cs:line 302 
  • Is there an opportunity to better document this behavior?
  • Is the expectation that the usage of LocalWorkspace.CreateAsync include project data outside of the ctor at some point?
  • For this scenario, could the error message be made clearer?

Affected area/feature

Automation API

@smithrobs smithrobs added kind/enhancement Improvements or new features needs-triage Needs attention from the triage team labels Nov 16, 2024
@justinvp justinvp added area/docs and removed needs-triage Needs attention from the triage team labels Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs kind/enhancement Improvements or new features
Projects
None yet
Development

No branches or pull requests

2 participants