Skip to content

feat(auto): live engine events, forward-compatible decoding, process control - #626

Merged
lbialy merged 3 commits into
mainfrom
feature/improve-event-streaming-in-auto-sdk
Aug 28, 2026
Merged

lbialy merged 3 commits into
mainfrom
feature/improve-event-streaming-in-auto-sdk

Conversation

@lbialy

@lbialy lbialy commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Deliver Pulumi engine events as they happen instead of only after the CLI exits, and stop a successful deployment from being reported as a failure.

  • OnEvent / EventLog / OnProcessStart options on preview/up/refresh/destroy
  • new EventLogs: tails the --event-log file on a daemon thread; parse errors are collected into parseErrors instead of failing the operation
  • Other(String) on DiffKind/ProgressType/OpType for unknown wire values; fix OpTypeFormat.write to emit JsString so it survives as a Map key
  • OperationFailedError keeps diagnostics/failures on the failure path, where the log was previously never parsed
  • ChildProcess exposes the pulumi process; interrupt() sends SIGINT, the only signal pulumi treats as a graceful cancel
  • shell.apply reimplemented as spawn + collect + join (from os-lib's call)
  • results gained resourcePreEvents/resourceOperations/failures/parseErrors

tailf 0.1.0 -> 0.2.0, fixes a lot of tailf issues

…control

Deliver Pulumi engine events as they happen instead of only after the CLI
exits, and stop a successful deployment from being reported as a failure.

- OnEvent / EventLog / OnProcessStart options on preview/up/refresh/destroy
- new EventLogs: tails the --event-log file on a daemon thread; parse errors
  are collected into `parseErrors` instead of failing the operation
- Other(String) on DiffKind/ProgressType/OpType for unknown wire values;
  fix OpTypeFormat.write to emit JsString so it survives as a Map key
- OperationFailedError keeps diagnostics/failures on the failure path,
  where the log was previously never parsed
- ChildProcess exposes the pulumi process; interrupt() sends SIGINT, the
  only signal pulumi treats as a graceful cancel
- shell.apply reimplemented as spawn + collect + join (from os-lib's call)
- results gained resourcePreEvents/resourceOperations/failures/parseErrors

tailf 0.1.0 -> 0.2.0, fixes a lot of tailf issues
@lbialy
lbialy requested a balanced review from Copilot August 28, 2026 13:13
@lbialy lbialy added kind/improvement An improvement with existing workaround area/automation-api The Automation API labels Aug 28, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds live Pulumi engine-event streaming, process cancellation controls, resilient event decoding, and richer lifecycle results.

Changes:

  • Adds event-log streaming and process-start callbacks to lifecycle operations.
  • Preserves unknown wire values and failure diagnostics.
  • Reworks subprocess execution and expands tests.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
auto/project.scala Updates event-tailing and logging dependencies.
auto/src/main/scala/besom/auto/internal/AutoError.scala Adds structured operation failures.
auto/src/main/scala/besom/auto/internal/ChildProcess.scala Exposes process control operations.
auto/src/main/scala/besom/auto/internal/EventLogs.scala Implements event-log parsing and live delivery.
auto/src/main/scala/besom/auto/internal/Events.scala Preserves unknown event enum values.
auto/src/main/scala/besom/auto/internal/shell.scala Adds process-start callbacks and process collection.
auto/src/main/scala/besom/auto/internal/Stack.scala Integrates events, process callbacks, and richer results.
auto/src/test/scala/besom/auto/internal/EventLogsTest.scala Tests parsing and live event delivery.
auto/src/test/scala/besom/auto/internal/LocalWorkspaceTest.scala Tests live events and resource hierarchy.
auto/src/test/scala/besom/auto/internal/OptionsTest.scala Tests new lifecycle options.
auto/src/test/scala/besom/auto/internal/ShellTest.scala Tests output collection and process control.
auto/src/test/scala/besom/auto/internal/StackTest.scala Tests forward-compatible event decoding.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread auto/src/main/scala/besom/auto/internal/EventLogs.scala Outdated
Comment thread auto/src/main/scala/besom/auto/internal/shell.scala Outdated
Comment thread auto/src/main/scala/besom/auto/internal/Stack.scala

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.

@lbialy
lbialy merged commit 42cd351 into main Aug 28, 2026
7 checks passed
@lbialy
lbialy deleted the feature/improve-event-streaming-in-auto-sdk branch August 28, 2026 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/automation-api The Automation API kind/improvement An improvement with existing workaround

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants