Skip to content

feat: prefix grouped DAG output with stack and component #3717

Closed

Description

@zack-is-cool

Describe the Feature

Add [stack/component] to every rendered output line in grouped DAG execution.

Use Case

Group headers scroll out of view during long Terraform output, leaving the originating stack and component unclear.

Expected Behavior

  • Prefix both stdout and stderr lines, including a final line without a newline.
  • Keep each completed component's output contiguous and retain existing group boundaries.
  • Preserve masking, stdout/stderr destinations, and --hide=no-changes behavior.
  • Leave captured results and saved per-component log files unchanged.
  • Work without color or a TTY; leave stream mode unchanged.

Describe Ideal Solution

Reuse terraformNodeLabel and pkg/io.NewLinePrefixWriter during terraformOutput.finishNode replay. Stream mode already uses this label and writer in nodeWriters. Flush trailing partial lines; preserve existing output error handling. Avoid a new flag or custom line parser.

Add focused grouped-output tests for multiline stdout/stderr, trailing partial lines, masking, hidden no-change output, and unchanged raw log files. Update grouped-output documentation and relevant output recordings.

Alternatives Considered

  • Stronger headers do not retain context while scrolling.
  • Color-only identification fails in plain logs.
  • A new configurable prefix format adds unnecessary scope.

Additional Context

Implementation: pkg/scheduler/adapters/terraform.go, finishNode and replayGroupedOutput.

Existing coverage: pkg/scheduler/adapters/terraform_test.go, TestTerraformOutputFinishNodeGroupedOutput.

Tradeoff: repeated stack/component names reduce space available for Terraform output.

Activity

  1. added a commit that references this issue on Nov 19, 2026
    ab1a82f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions