Skip to content

test: combined 797 + 798 + 799 for CI validation - #800

Closed
skevetter wants to merge 7 commits into
mainfrom
test/combined-log-and-git-progress
Closed

test: combined 797 + 798 + 799 for CI validation#800
skevetter wants to merge 7 commits into
mainfrom
test/combined-log-and-git-progress

Conversation

@skevetter

@skevetter skevetter commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Not for merge — combines all three PRs (#797 log fix, #798 async workspace up, #799 git clone progress) into one branch purely to exercise the full CI/e2e integration suite with all three changes applied together in GitHub runners.

#797, #798, and #799 remain open as the actual review/merge units. Close this once CI has run.

@netlify

netlify Bot commented Jul 28, 2026

Copy link
Copy Markdown

Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 1398645
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6a693baa89717b00089b4f87

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c79cbaa2-03be-4fc1-9faa-39407843ca41

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@netlify

netlify Bot commented Jul 28, 2026

Copy link
Copy Markdown

Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit 1398645
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6a693baa8a8c6b0008a79740

@skevetter skevetter changed the title test: combined log-fix + git-clone-progress for CI validation test: combined 797 + 798 + 799 for CI validation Jul 28, 2026
workspace up currently runs synchronously end-to-end, streaming a
single JSON blob to the caller only once the container is ready. That
blocks the CLI/desktop for the whole provisioning window and gives up
all in-progress state on a crash or disconnect.

Adds a submit/poll durable execution model alongside the existing
synchronous flow:

- pkg/task: a JSON-file task store (atomic writes, cross-process
  flock) recording status/PID/result for background-launched work.
- workspace up --detach re-execs itself as a background process and
  returns a task ID immediately.
- workspace task list/get/logs/cancel/rm: standard verb commands
  (kubectl/docker/gh-style) to manage submitted tasks.
- pkg/devcontainer/status: a structured Phase/Event/Reporter model
  threaded through Runner.Up and the devcontainer build/run/setup
  pipeline, replacing ad hoc log lines with typed progress events.
- A StatusUpdate RPC on the agent tunnel streams those events back to
  the CLI host live instead of waiting for the final result.
- Desktop app updated to submit+poll via the new task model instead of
  parsing a single terminal JSON blob.

See docs/rfcs/async-workspace-up.md for the full design.
Fixes the unused status import left over from the intermediate up.go
split, plus cyclop, funcorder, errcheck, forbidigo, goconst, golines,
modernize, and revive findings across the new task/status/detach code.
fmt.Printf is disallowed by the forbidigo rule; fmt.Fprintf(os.Stdout, ...)
is the same output without needing a suppression comment.
workspace_up now submits `up --detach` and polls `workspace task logs
<id> --follow` instead of running `up` to completion. The e2e mock CLI
still implemented the old synchronous `up` only: `--detach` was
silently swallowed by parseArgs's generic flag skip, so mock-devsy
wrote plain progress text instead of a {kind:"task", id} envelope.
cli.run's JSON.parse then threw, the up handler took its catch path,
and the wizard's success check never ran -- so the "Open Workspace"
button never appeared, timing out the three affected e2e specs.

Adds a `task` verb to the mock (list/get/logs/cancel/rm) backed by a
`tasks` map in the persisted mock state, and makes `up --detach` write
the {kind:"task", id} envelope and defer the actual workspace/progress
simulation to `task logs --follow`, mirroring pkg/task and
pkg/devcontainer/config/envelope.go.
…passthrough

git clone already runs with --progress (added in #590), but its
\r-delimited "Receiving objects: NN% (x/y)" frames were logged
verbatim, producing a wall of near-duplicate lines for large clones.

progressWriter splits on \r as well as \n (git overwrites its progress
line with \r rather than emitting a new one), logs percentage updates
thinned to one per 10 points, and passes any other line through
unchanged.
…passthrough

log.Writer() is used as a subprocess's Stdout/Stderr at ~65 call sites
across the codebase (docker build, buildkit, SSH, IDE installers, git
clone, etc). Its levelWriter.Write wrote raw bytes directly to the
stderr sink, bypassing zap's encoder entirely -- contradicting its own
doc comment ("writes each line as a log entry") and producing
unencoded lines in what's supposed to be a uniform JSON/text/logfmt
stream in --log-output json mode.

levelWriter now line-buffers and calls Info/Debug/Error per complete
line, so subprocess output goes through the same encoder as every
other log call. Close flushes any trailing line left without a
newline (previously silently dropped).
Reorder levelWriter's exported Close before the unexported logLine
helper, and hoist the repeated "json" format literal in writer_test.go
into a constant.
@skevetter
skevetter force-pushed the test/combined-log-and-git-progress branch from 3fcdd07 to 1398645 Compare July 28, 2026 23:30
@skevetter skevetter closed this Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant