Loading
Commits on Source 11
-
Cameron Swords authored
-
Cameron Swords authored
-
Cameron Swords authored
The Safe decorator wraps runner.Function with defer/recover, converting panics into internalerr.Error. The service wraps the parsed step with WithPanicRecovery before passing it to job.Run().
-
Cameron Swords authored
Job.Status() now maps j.err to a StatusError with the appropriate ErrorKind: internalerr.Error → internal, context cancellation → cancelled, other → step_failure.
-
Cameron Swords authored
Add ErrorKind type to client.Status and read it from proto StatusError. Create panic-recovery spec and update grpc-api spec to document the structured error model.
-
Cameron Swords authored
The fix from a87db07b was lost during the function.Safe refactor. Read j.err under j.mux.RLock() before logging, preventing a race with Close()'s timer branch which writes j.err under j.mux.Lock(). This also avoids a nil-panic risk where the read checked j.err but the log statement called err.Error() — onRunCompletion can set j.err non-nil while the local err is nil.
-
Cameron Swords authored
Move the domain infrastructure-error type from pkg/internal/internalerr into pkg/runner as `StepRunnerError`. Resolves package/type stutter (`internalerr.Error`) and places the type in the domain layer where the concept belongs (analogous to gl-runner's `BuildError`). - Add `runner.StepRunnerError` and `runner.NewStepRunnerError`. - Update callers in pkg/runner/function/safe.go and pkg/api/internal/jobs/jobs.go. - Delete pkg/internal/internalerr.
-
Cameron Swords authored
Collapse the inline StatusError construction in Job.Status() into a single call site. The helper now takes the error and returns the full proto.StatusError, classifying the kind as part of the construction. No change to the wire format: StatusError.kind is populated identically, so Runner-side alerting on kind is preserved.
-
Cameron Swords authored
Mark `Status.message` with `[deprecated = true]` in proto/step.proto to match the intent already expressed in docs/spec/grpc-api.md. The server still populates the field for backwards compatibility, with a targeted //nolint to acknowledge the deprecated write. - Migrate basic/client.go to populate client.Status.Message from `st.Error.Message` when present. - Migrate tests to assert against `Error.Message` / `Error == nil`, removing reads of the deprecated field.
-
Cameron Swords authored
Add an explicit comment noting that client.ErrorKind values must match proto.StatusError_ErrorKind, so future maintainers do not have to trace through the cast in basic/client.go to find the contract.
-
Cameron Swords authored
Add panic recovery and structured error reporting to job status See merge request !469