Skip to content

Devbox does not propagate errors process-compose encounters in validating process-compose.yaml #2579

@t-monaghan

Description

@t-monaghan

What happened?

Problem

If process-compose is configured with is_strict: true and there is an issue in the process-compose.yaml file, devbox services up will fail to run, returning "exit status 1". However if you run the same file with process-compose up you will get a helpful error message on why process-compose is refusing to run.

Suggestion

Devbox should propagate this helpful error message from process-compose to the user.

Steps to reproduce

  1. devbox init
echo 'version: "0.5"
is_strict: true

processes:
  foo:
    commnad: echo "Hello, world!"
' > process-compose.yaml
  1. devbox services up
  2. Here we can see the error message is not propagated
  3. devbox add process-compose@1.24.2 # the version currently used by devbox
  4. devbox run process-compose up
  5. Here we can see a helpful output from process-compose containing FTL Failed to load project error="unknown key 'commnad' found in process 'foo'"

Command

services

devbox.json

{
  "$schema":  "https://raw.githubusercontent.com/jetify-com/devbox/0.14.0/.schema/devbox.schema.json",
  "packages": ["process-compose@1.24.2"],
  "shell": {
    "init_hook": [
      "echo 'Welcome to devbox!' > /dev/null"
    ],
    "scripts": {
      "test": [
        "echo \"Error: no test specified\" && exit 1"
      ]
    }
  }
}

Devbox version

0.14.0

Nix version

nix (Nix) 2.24.10

What system does this bug occur on?

macOS (Apple Silicon)

Debug logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageIssue needs triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions