Skip to content

Add opt-in build phase progress producer - #3095

Open
Saipriya-1144 wants to merge 2 commits into
microsoft:mainfrom
Saipriya-1144:vchintalapat-microsoft-kudu-v1-phase-producer
Open

Saipriya-1144 wants to merge 2 commits into
microsoft:mainfrom
Saipriya-1144:vchintalapat-microsoft-kudu-v1-phase-producer

Conversation

@Saipriya-1144

Copy link
Copy Markdown
Contributor

Summary

Adds a minimal, opt-in Oryx build-phase producer for the Kudu Deployment Progress Tracker V1. Oryx remains independent of Kudu persistence, journal, snapshot, and API models: it only emits bounded machine phase signals while the local build script runs.

This is a new implementation from current main. PR #3092 was used only for test and integration lessons; this PR does not modify, retarget, close, or build on it.

Protocol

  • Opt-in environment: ORYX_PROGRESS_ENDPOINT=file:<absolute-path> and ORYX_PROGRESS_OPERATION_ID=<opaque-safe-id>.
  • Endpoint ownership: the caller must pre-create a regular file outside Oryx source, output, and intermediate cleanup directories. Oryx opens it with FileMode.Open, append-writes, and never creates or deletes it.
  • Record format: UTF-8 JSONL with exactly schemaVersion, eventType, operationId, phase, and timestampUtc.
  • Event: only phase_started, with schemaVersion: 1.
  • Truthful shared phases: pre_build, build.execute, post_build, output.prepare, output.compress, and manifest.write, emitted only when the corresponding existing boundary runs.
  • Bounds: 1,024 bytes per record, 32 KiB total file size, and 256 ASCII-safe bytes for the operation ID.
  • Fail-open behavior: configuration, serialization, file, locking, or writer-process failures permanently disable reporting for that build process. Writer invocations are silent and capped at two seconds.

Example record:

{"schemaVersion":1,"eventType":"phase_started","operationId":"operation-123","phase":"build.execute","timestampUtc":"2026-10-09T01:02:03.4567000Z"}

Scope and non-scope

The implementation is centralized in the shared base build template plus one hidden internal append command. It does not add capability discovery, build_started, build_completed, outcomes, percentages, deployment IDs, step state, attempts, customer-facing text, commands, paths, logs, exceptions, package/project names, or any Kudu-owned model.

Validation

  • dotnet build src\BuildScriptGeneratorCli\BuildScriptGeneratorCli.csproj --configuration Release --no-restore --verbosity minimal — passed; only existing analyzer/obsolete-option warnings.
  • dotnet test tests\BuildScriptGenerator.Tests\BuildScriptGenerator.Tests.csproj --configuration Release --no-restore --logger "console;verbosity=minimal" — 599 passed.
  • dotnet test tests\BuildScriptGeneratorCli.Tests\BuildScriptGeneratorCli.Tests.csproj --configuration Release --no-restore --logger "console;verbosity=minimal" — 112 passed, 5 existing platform skips.
  • Linux WSL self-contained CLI validation — append succeeded with the exact five-field JSONL shape; a missing endpoint was not created. The minimal WSL image lacked ICU, so this validation used DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1.
  • Git Bash integration coverage verifies disabled parity, permanent disable after the first writer failure, unchanged stdout/stderr, xtrace privacy, phase ordering, and generated Bash syntax.
  • The purpose of this PR is explained in this message or in an issue. If an issue please include a reference as #<issue_number>.
  • Tests are included and/or updated for code changes.
  • Proper license headers are included in each file.

Emit bounded, fail-open phase_started JSONL records from shared Oryx build boundaries without depending on Kudu persistence or API models.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@Saipriya-1144
Saipriya-1144 requested a review from a team as a code owner October 8, 2026 21:49
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant