Skip to content

fix: parse supervisor uptime with optional days segment#12713

Open
bin64 wants to merge 1 commit into
1Panel-dev:dev-v2from
bin64:fix-supervisor-uptime
Open

fix: parse supervisor uptime with optional days segment#12713
bin64 wants to merge 1 commit into
1Panel-dev:dev-v2from
bin64:fix-supervisor-uptime

Conversation

@bin64
Copy link
Copy Markdown

@bin64 bin64 commented May 12, 2026

What this PR does / why we need it?

supervisorctl status reports running process uptime as part of the process description, for example:

  pid 123, uptime 0:12:34
  pid 123, uptime 103 days, 0:12:34

  The previous parser used a fixed field index (fields[5]), which only worked for uptime values without the optional days segment. When the uptime contains days, only the day count was kept and the remaining time part was lost.

Summary of your change

  • Parse RUNNING status details by locating the pid and uptime fields instead of relying on fixed indexes.
  • Preserve the full uptime value by joining all fields after uptime.
  • Add tests for standard Supervisor uptime formats with and without the optional days segment.

Please indicate you've done the following:

  • Made sure tests are passing and test coverage is added if needed.
  • Made sure commit message follow the rule of Conventional Commits specification.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed.
Fix supervisor uptime parsing when `supervisorctl status` reports an uptime with days.

@f2c-ci-robot
Copy link
Copy Markdown

f2c-ci-robot Bot commented May 12, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign zhengkunwang223 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant