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

Pulumi automation does not understand 'output-change' #16126

Closed
Phil1972 opened this issue May 6, 2024 · 1 comment · Fixed by #16131
Closed

Pulumi automation does not understand 'output-change' #16126

Phil1972 opened this issue May 6, 2024 · 1 comment · Fixed by #16131
Assignees
Labels
area/automation-api area/cli UX of using the CLI (args, output, logs) impact/regression Something that used to work, but is now broken kind/bug Some behavior is incorrect or out of spec p1 Bugs severe enough to be the next item assigned to an engineer resolution/fixed This issue was fixed
Milestone

Comments

@Phil1972
Copy link

Phil1972 commented May 6, 2024

What happened?

I am trying to preview a stack with the newest CLI 3.115.0 and for resources that change, the preview shows 'output-change' instead of the proper verb I guess and that crashes the automation module.

image

Example

See report above

and the automation fails with this:
System.InvalidOperationException: 'output-change' is not valid Pulumi.Automation.OperationType at Pulumi.Automation.Serialization.OperationTypeConverter.Convert(String input) at Pulumi.Automation.Serialization.Json.ResourceChangesJsonConverter.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options) at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
at System.Text.Json.Serialization.Metadata.JsonPropertyInfo1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader) at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.Metadata.JsonPropertyInfo1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader)
at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) at System.Text.Json.JsonSerializer.Read[TValue](Utf8JsonReader& reader, JsonTypeInfo jsonTypeInfo) at Pulumi.Automation.Serialization.Json.MapToModelJsonConverter2.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)
at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan1 utf8Json, JsonTypeInfo jsonTypeInfo, Nullable1 actualByteCount)
at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan1 json, JsonTypeInfo jsonTypeInfo) at Pulumi.Automation.Events.EventLogWatcher.ReadEventsOnce() at Pulumi.Automation.Events.EventLogWatcher.ReadEventsOnce() at Pulumi.Automation.Events.EventLogWatcher.PollForEvents(CancellationToken externalCancellationToken) at Pulumi.Automation.Events.EventLogWatcher.AwaitPollingTask() at Pulumi.Automation.Events.EventLogWatcher.Stop() at Pulumi.Automation.Commands.LocalPulumiCommand.RunAsync(IList1 args, String workingDir, IDictionary2 additionalEnv, Action1 onStandardOutput, Action1 onStandardError, Action1 onEngineEvent, CancellationToken cancellationToken)
at Pulumi.Automation.Workspace.RunStackCommandAsync(String stackName, IList1 args, Action1 onStandardOutput, Action1 onStandardError, Action1 onEngineEvent, CancellationToken cancellationToken)
at Pulumi.Automation.WorkspaceStack.RunCommandAsync(IList1 args, Action1 onStandardOutput, Action1 onStandardError, Action1 onEngineEvent, CancellationToken cancellationToken)
at Pulumi.Automation.WorkspaceStack.PreviewAsync(PreviewOptions options, CancellationToken cancellationToken)
at Pulumi.Automation.WorkspaceStack.PreviewAsync(PreviewOptions options, CancellationToken cancellationToken)
at Polly.Retry.AsyncRetryEngine.ImplementationAsync[TResult](Func3 action, Context context, CancellationToken cancellationToken, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates1 shouldRetryResultPredicates, Func5 onRetryAsync, Int32 permittedRetryCount, IEnumerable1 sleepDurationsEnumerable, Func4 sleepDurationProvider, Boolean continueOnCapturedContext) at Polly.AsyncPolicy.ExecuteAsync[TResult](Func3 action, Context context, CancellationToken cancellationToken, Boolean continueOnCapturedContext)
at Program.Preview(WorkspaceStack stack, Int32 attempt) in /home/vsts/work/1/s/src/Infra.Automation/Program.cs:line 230`

Output of pulumi about

CLI
Version      3.115.0
Go Version   go1.22.2
Go Compiler  gc

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

@Phil1972 Phil1972 added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels May 6, 2024
@justinvp
Copy link
Member

justinvp commented May 6, 2024

This looks like a regression due to #15903

Before that, we wouldn't show an output-change/output-changed in the summary.

v3.114.0

$ pulumi up
Previewing update (dev)

View in Browser (Ctrl+O): https://app.pulumi.com/...

     Type                       Name        Plan
 +   pulumi:pulumi:Stack        rndtst-dev  create
 +   └─ random:index:RandomPet  username    create

Outputs:
    name: output<string>

Resources:
    + 2 to create

Do you want to perform this update? yes
Updating (dev)

View in Browser (Ctrl+O): https://app.pulumi.com/...

     Type                       Name        Status
 +   pulumi:pulumi:Stack        rndtst-dev  created (0.70s)
 +   └─ random:index:RandomPet  username    created (0.12s)

Outputs:
    name: "equipped-civet"

Resources:
    + 2 created

Duration: 1s

v3.115.1

$ pulumi up
Previewing update (dev)

View in Browser (Ctrl+O): https://app.pulumi.com/...

     Type                       Name        Plan
 +   pulumi:pulumi:Stack        rndtst-dev  create
 +   └─ random:index:RandomPet  username    create

Outputs:
    name: output<string>

Resources:
    + 2 to create
    ~ 1 to output-change
    3 changes

Do you want to perform this update? yes
Updating (dev)

View in Browser (Ctrl+O): https://app.pulumi.com/...

     Type                       Name        Status
 +   pulumi:pulumi:Stack        rndtst-dev  created (1s)
 +   └─ random:index:RandomPet  username    created (0.13s)

Outputs:
    name: "sharing-robin"

Resources:
    + 2 created
    ~ 1 output-changed
    3 changes

Duration: 2s

@PollRobots, can we elide output-change from the output?

@justinvp justinvp added area/cli UX of using the CLI (args, output, logs) area/automation-api impact/regression Something that used to work, but is now broken p1 Bugs severe enough to be the next item assigned to an engineer and removed needs-triage Needs attention from the triage team area/cli UX of using the CLI (args, output, logs) labels May 6, 2024
@justinvp justinvp added this to the 0.104 milestone May 6, 2024
github-merge-queue bot pushed a commit that referenced this issue May 6, 2024
Reverts #15903

This is implicated in Issue #16126 so reverting to allow time to provide
a proper solution

Fixes #16126
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/automation-api area/cli UX of using the CLI (args, output, logs) impact/regression Something that used to work, but is now broken kind/bug Some behavior is incorrect or out of spec p1 Bugs severe enough to be the next item assigned to an engineer resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants