Skip to content

Add pid, namespace, age, health, restarts to services ls#2782

Merged
Lagoja merged 3 commits intojetify-com:mainfrom
elliotthilaire-ca:add-age-health-restarts-to-services-ls
Feb 26, 2026
Merged

Add pid, namespace, age, health, restarts to services ls#2782
Lagoja merged 3 commits intojetify-com:mainfrom
elliotthilaire-ca:add-age-health-restarts-to-services-ls

Conversation

@elliotthilaire-ca
Copy link
Contributor

@elliotthilaire-ca elliotthilaire-ca commented Feb 19, 2026

Summary

This PR adds additional output to the devbox services ls command to see specifically to see the status of the readiness checks.

Without the HEALTH information in the output it's impossible to tell if a service is still booting up or if it is fully up and running based on the readiness check.

Before:

NAME                   STATUS           EXIT CODE
failed-server          Completed        -1
good-server            Launching        0
starting-server        Launching        0

After:

Services running in process-compose:
PID          NAME                   NAMESPACE        STATUS           AGE        HEALTH           RESTARTS        EXIT CODE
19996        good-server            default          Launching        5s         Ready            0               0
19995        starting-server        default          Launching        5s         Not Ready        0               0
19997        failed-server          default          Completed        2s         -                0               -1

Additional consideration

This PR brings the output of devbox services ls closer to that of process-compose list -o wide.

The output of process-compose list -o wide for comparison:

PID     NAME              NAMESPACE   STATUS      AGE   HEALTH      RESTARTS   EXITCODE
11518   failed-server     default     Completed   2s    -           0          -1
11520   good-server       default     Launching   3s    Ready       0          0
11519   starting-server   default     Launching   3s    Not Ready   0          0

(The only differences I see is the spacing between columns and no space in the title EXITCODE)

How was it tested?

With a sample process-compose.yaml file and running:

devbox run build
dist/devbox shell
devbox services start
devbox services ls 

The sample process-compose.yaml file used for testing.

processes:
 
  good-server:
    command: python -m http.server 8081
    is_daemon: true
    readiness_probe:
      exec:
        command: curl -f http://localhost:8081
      initial_delay_seconds: 1
      period_seconds: 1

  starting-server:
    command: python -m http.server 8082
    is_daemon: true
    readiness_probe:
      exec:
        command: curl -f http://localhost:8082/wait
      initial_delay_seconds: 1
      period_seconds: 100

  failed-server:
    command: python -m http.server 8083
    is_daemon: true
    readiness_probe:
      exec:
        command: curl -f http://localhost:8083/not_there
      initial_delay_seconds: 1
      period_seconds: 1    

Community Contribution License

All community contributions in this pull request are licensed to the project
maintainers under the terms of the
Apache 2 License.

By creating this pull request, I represent that I have the right to license the
contributions to the project maintainers under the Apache 2 License as stated in
the
Community Contribution License.

@elliotthilaire-ca
Copy link
Contributor Author

I'm happy to add PID and/or NAMESPACE to this as well.

@Lagoja
Copy link
Collaborator

Lagoja commented Feb 25, 2026

@elliotthilaire-ca Tested this and it looks good! PID and Namespace would definitely be useful to add if you have the time.

I think checks are blocked on linting/formatting errors. If you can quickly run devbox run fmt to clean those up, I can rerun the failing tests and land this.

@elliotthilaire-ca
Copy link
Contributor Author

@Lagoja thanks for taking a look.

I've run devbox run fmt to fix the build and added PID and NAMESPACE in this PR.

I tested the newest changes in the same way as before and updated the PR description to reflect the newest changes.

@elliotthilaire-ca elliotthilaire-ca changed the title Add age, health, restarts to services ls Add pid, namespace, age, health, restarts to services ls Feb 26, 2026
@Lagoja
Copy link
Collaborator

Lagoja commented Feb 26, 2026

Thanks again! Will land once checks pass.

@Lagoja Lagoja merged commit d45ee4f into jetify-com:main Feb 26, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants