Skip to content

Conversation

@fflewddur
Copy link
Owner

No description provided.

fflewddur added 2 commits May 26, 2025 20:11
- df can exit with an error while still printing
  the filesystem info we need.
- The df command can return a non-zero exit status
  but still contain enough info for us to parse
  local disk sizes.
@fflewddur fflewddur requested a review from Copilot May 27, 2025 20:21
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

A fix to prevent SSHFS mounts from disrupting the disk monitor, plus minor updates for test tracking and changelog.

  • Process filesystem output even if the subprocess exits with a non-zero status.
  • Add a TODO reminding to add unit tests for temperature sensor configurations.
  • Update RELEASES.md to record the SSHFS mount fix.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/helpers.ts Changed exit-status check to process stdout regardless of success, ensuring SSHFS mounts are included.
src/extension.ts Inserted a TODO to add unit tests for known temperature sensors.
RELEASES.md Added a changelog entry for the SSHFS-related disk monitor fix.
Comments suppressed due to low confidence (1)

src/extension.ts:95

  • This TODO highlights missing unit tests for sensor parsing; please add tests covering each supported temperature sensor to ensure correctness.
// TODO: Add unit tests for each known temperature sensor configuration

Comment on lines 140 to +143
Gio.SubprocessFlags.STDOUT_PIPE
);
proc.communicate_utf8_async(null, null).then(([stdout]) => {
if (proc.get_successful()) {
// Try to process the output even if the exit status != 0
Copy link

Copilot AI May 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider also capturing or logging stderr and the exit code when stdout is present but the subprocess failed, to aid debugging of unexpected failures.

Copilot uses AI. Check for mistakes.

## TopHat vNext - Unreleased

- Fixed disk monitor problem with sshfs mounts
Copy link

Copilot AI May 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be helpful to reference the related PR or issue number in this changelog entry for better traceability.

Suggested change
- Fixed disk monitor problem with sshfs mounts
- Fixed disk monitor problem with sshfs mounts (#4567)

Copilot uses AI. Check for mistakes.
@fflewddur fflewddur merged commit 76f1316 into main May 27, 2025
5 checks passed
@fflewddur fflewddur deleted the sshfs-fix branch May 27, 2025 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use of sshfs appears to break disk monitor

2 participants