Errand Log Streaming

Aberta
#715 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
35/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
go
Domínio
cli

Direção de pesquisa

Comece rastreando o comando bosh run-errand e como a saída de sua task se move entre a CLI, Director e agent. Verifique a recuperação existente dos logs do errand e o comportamento do arquivamento final, depois defina como stdout e stderr chegam ao terminal enquanto a execução continua. Está concluído quando a exibição em tempo real funciona e o arquivo final de logs permanece disponível após a conclusão.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Summary
Currently, when executing a BOSH errand via the CLI (bosh run-errand ), operators do not receive any log output until the errand completely finishes (or fails). We are requesting a feature to stream the errand's stdout and stderr logs to the BOSH CLI in real-time as the errand executes.

Current Behavior
When an operator runs an errand, the CLI initiates the task and waits. For long-running errands (like database migrations, heavy smoke tests, or large data cleanups), the operator sits looking at a static screen for minutes or even hours.

There is no visibility into whether the errand is actively progressing, hung, or stuck in a retry loop.

The logs are only fetched and dumped to the console after the errand exits.

Desired Behavior
The bosh run-errand command should stream the logs (both stdout and stderr) from the errand VM directly to the user's terminal in real-time.

As the script running on the VM outputs a line, it should appear in the CLI task output.

If log streaming is too verbose for certain users, it could be hidden behind a flag (e.g., bosh run-errand --stream-logs), though defaulting to streaming (similar to standard CI/CD pipelines) would provide the best operator experience.

Use Cases & Motivation
Improved Operator Experience: Operators won't have to guess if a 20-minute database migration has stalled.

Faster Debugging: If an errand gets stuck in an infinite loop, an operator can see it immediately, cancel the task, and fix the issue, rather than waiting for a hard timeout.

Consistency: Other ecosystem tools (like Kubernetes pods or standard Docker containers) default to real-time log streaming. Bringing this to BOSH errands modernizes the deployment experience.

Acceptance Criteria
[ ] The BOSH Director captures real-time stdout/stderr from the errand execution via the agent.

[ ] The BOSH CLI displays these logs as they are generated during the run-errand task.

[ ] The final log archive is still successfully gathered and stored by the Director upon errand completion, preserving backward compatibility.

Linguagem predominante
Go
Estrelas
186
Forks
169
Merge médio
14d 23h
PRs com merge (30d)
1

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de cloudfoundry/bosh-cli

Todas as issues de cloudfoundry/bosh-cli

Issues semelhantes

Mais issues de Go

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.