I'm trying to run Automation API + inline program,...
# dotnet
b
I'm trying to run Automation API + inline program, and previews work fine, but things fall over disastrously whenever I attempt to run
UpAsync
with the following error:
Copy code
stderr: panic: fatal: An assertion has failed: cannot complete a resource 'urn:pulumi:staging::crezco::pulumi:pulumi:Stack::crezco-staging' whose registration isn't pending

goroutine 92 [running]:
<http://github.com/pulumi/pulumi/sdk/v3/go/common/util/contract.failfast(...)|github.com/pulumi/pulumi/sdk/v3/go/common/util/contract.failfast(...)>
        /home/runner/work/pulumi/pulumi/sdk/go/common/util/contract/failfast.go:23
<http://github.com/pulumi/pulumi/sdk/v3/go/common/util/contract.Assertf|github.com/pulumi/pulumi/sdk/v3/go/common/util/contract.Assertf>(0xc0?, {0x233c766?, 0xc0015458e8?}, {0xc0015458f8?, 0xc000580000?, 0xc000dd6780?})
        /home/runner/work/pulumi/pulumi/sdk/go/common/util/contract/assert.go:35 +0xed
<http://github.com/pulumi/pulumi/pkg/v3/resource/deploy.(*stepExecutor).ExecuteRegisterResourceOutputs(0xc0010802a0|github.com/pulumi/pulumi/pkg/v3/resource/deploy.(*stepExecutor).ExecuteRegisterResourceOutputs(0xc0010802a0>, {0x25c57215458, 0xc000b03920})
        /home/runner/work/pulumi/pulumi/pkg/resource/deploy/step_executor.go:153 +0x105
<http://github.com/pulumi/pulumi/pkg/v3/resource/deploy.(*deploymentExecutor).handleSingleEvent(0xc001152480|github.com/pulumi/pulumi/pkg/v3/resource/deploy.(*deploymentExecutor).handleSingleEvent(0xc001152480>, {0x283b8c0?, 0xc000b03920})
        /home/runner/work/pulumi/pulumi/pkg/resource/deploy/deployment_executor.go:405 +0x20d
<http://github.com/pulumi/pulumi/pkg/v3/resource/deploy.(*deploymentExecutor).Execute.func3(0xc0000bb1a0|github.com/pulumi/pulumi/pkg/v3/resource/deploy.(*deploymentExecutor).Execute.func3(0xc0000bb1a0>, 0xc001152480, 0xc0003ae9e0, {{0x25c575733e0, 0xc000a08f20}, 0x7fffffff, 0x0, 0x0, {{0x3a53d48, 0x0, ...}, ...}, ...}, ...)   
        /home/runner/work/pulumi/pulumi/pkg/resource/deploy/deployment_executor.go:250 +0x21e
<http://github.com/pulumi/pulumi/pkg/v3/resource/deploy.(*deploymentExecutor).Execute(0xc001152480|github.com/pulumi/pulumi/pkg/v3/resource/deploy.(*deploymentExecutor).Execute(0xc001152480>, {0x28569b0?, 0xc000f7f230}, {{0x25c575733e0, 0xc000a08f20}, 0x7fffffff, 0x0, 0x0, {{0x3a53d48, 0x0, ...}, ...}, ...}, ...)
        /home/runner/work/pulumi/pulumi/pkg/resource/deploy/deployment_executor.go:266 +0x839
<http://github.com/pulumi/pulumi/pkg/v3/resource/deploy.(*Deployment).Execute(0xc00115a0b0|github.com/pulumi/pulumi/pkg/v3/resource/deploy.(*Deployment).Execute(0xc00115a0b0>, {0x28569b0, 0xc000f7f230}, {{0x25c575733e0, 0xc000a08f20}, 0x7fffffff, 0x0, 0x0, {{0x3a53d48, 0x0, ...}, ...}, ...}, ...)
        /home/runner/work/pulumi/pulumi/pkg/resource/deploy/deployment.go:564 +0xd0
<http://github.com/pulumi/pulumi/pkg/v3/engine.(*deployment).run.func1()|github.com/pulumi/pulumi/pkg/v3/engine.(*deployment).run.func1()>
        /home/runner/work/pulumi/pulumi/pkg/engine/deployment.go:298 +0x214
created by <http://github.com/pulumi/pulumi/pkg/v3/engine.(*deployment).run|github.com/pulumi/pulumi/pkg/v3/engine.(*deployment).run>
        /home/runner/work/pulumi/pulumi/pkg/engine/deployment.go:283 +0x365


   at Pulumi.Automation.Commands.LocalPulumiCmd.RunAsyncInner(IList`1 args, String workingDir, IDictionary`2 additionalEnv, Action`1 onStandardOutput, Action`1 onStandardError, EventLogFile eventLogFile, CancellationToken cancellationToken)
   at Pulumi.Automation.Commands.LocalPulumiCmd.RunAsync(IList`1 args, String workingDir, IDictionary`2 additionalEnv, Action`1 onStandardOutput, Action`1 onStandardError, Action`1 onEngineEvent, CancellationToken cancellationToken)
   at Pulumi.Automation.Workspace.RunStackCommandAsync(String stackName, IList`1 args, Action`1 onStandardOutput, Action`1 onStandardError, Action`1 onEngineEvent, CancellationToken cancellationToken)
   at Pulumi.Automation.WorkspaceStack.RunCommandAsync(IList`1 args, Action`1 onStandardOutput, Action`1 onStandardError, Action`1 onEngineEvent, CancellationToken cancellationToken)
   at Pulumi.Automation.WorkspaceStack.UpAsync(UpOptions options, CancellationToken cancellationToken)
   at Pulumi.Automation.WorkspaceStack.UpAsync(UpOptions options, CancellationToken cancellationToken)
   at Program.<Main>$(String[] args) in C:\dev\Crezco-App\infrastructure\<http://Automation.App|Automation.App>\Program.cs:line 120
   at Program.<Main>(String[] args)
I've confirmed the stack is fine by running the inline program through a normal CLI driven program. Any ideas? 😖
b
Can you open an issue with a repro? Any panic like this is likely a bug
b
Sorry @billowy-army-68599 I got to the bottom of it. I was using the
PulumiFn.Create(IServiceProvider, Type)
overload and was setting stuff up incorrectly. Have got things working now with
PulumiFn.Create<>()
🙂