Conversation
3 tasks done
Guard the transition from actual ready-log output to project readiness, and document when callers can consider the project ready. Refs F1bonacc1#557
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



project is-readycan exit successfully while a running process has not yet printed itsready_log_line. With this change, a process with aready_log_linecounts as ready only once that line appears, so the project stays not ready until then. The same applies to--detach-on-success.Fixes #557
Implementation
NewProcessStatenow setsHasHealthProbewhenready_log_lineis configured, as it already does for readiness and liveness probes.No new check is needed. The existing readiness checks already require a process with
HasHealthProbeto be healthy, and they report a process that is still waiting for its line with the existinghealth is Unknownreason. Processes with neither a probe nor aready_log_linebehave as before.Tests and documentation
TestProcessStateLogReadinessbuilds a process state from a config withready_log_line. It checks that the state is not ready before the ready line is observed, and ready afterward.TestSystem_TestReadyLineProjectReadinessstarts a real process. It checks that the project is not ready before the process prints the ready line, and ready afterward.www/docs/launcher.mdnow says that a process with aready_log_lineis not ready until the line is printed. It namesproject is-readyand--detach-on-successas examples.Validation
Initial fix
Recorded earlier, on Linux with Go 1.26.8:
go test ./src/types -count=1,make build,make testrace(full suite), andmake lintpassed.project is-readyfails before the ready line appears and succeeds afterward.Latest changes
Run on macOS with Go 1.26.8, in a temporary detached worktree that contained exactly the staged changes:
make buildpassed.golangci-lint run --show-stats -c .golangci.yamlpassed with zero issues. This used version 2.11.3, the version pinned in the Makefile.The full race-enabled suite was not rerun for these changes.
Nix package build (optional)
Built from commit
3d09b371a68dac0764cc3bd34398a70e75d99514in a nativeaarch64-linuxDocker container, with Nix 2.35.2 and Go 1.26.1 (the version pinned by the flake):checkPhase), install, and fixup phases all passed (exit status 0). This includes the tests insrc/appandsrc/types.x86_64-linuxtarget that the Nix workflow builds. A first attempt atx86_64-linuxunder emulation failed before compilation withunable to load seccomp BPF program: Invalid argument.