Skip to content

Increase mounts reload timeout to 5 minutes#652

Merged
frenck merged 1 commit into
masterfrom
increase-mounts-reload-timeout
May 13, 2026
Merged

Increase mounts reload timeout to 5 minutes#652
frenck merged 1 commit into
masterfrom
increase-mounts-reload-timeout

Conversation

@agners
Copy link
Copy Markdown
Member

@agners agners commented May 13, 2026

Reloading a mount can take longer than the default 30s timeout, especially for network shares that are slow to (un)mount. Introduce a dedicated MountTimeout constant and use it for the mounts reload command.

Summary by CodeRabbit

Release Notes

  • Improvements
    • Added a 5-minute timeout to the mounts reload operation to enhance reliability and prevent indefinite hangs.

Reloading a mount can take longer than the default 30s timeout, especially
for network shares that are slow to (un)mount. Introduce a dedicated
MountTimeout constant and use it for the mounts reload command.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@agners agners requested a review from sairon May 13, 2026 12:28
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 13, 2026

📝 Walkthrough

Walkthrough

A new timeout constant MountTimeout (5 minutes) is defined in the client helper package and immediately applied to the mounts reload command's HTTP request builder, replacing the non-timeout variant.

Changes

Timeout Configuration for Mounts Reload

Layer / File(s) Summary
Timeout constant and request integration
client/helper.go, cmd/mounts_reload.go
A new exported timeout constant MountTimeout is defined and used by the mounts reload command's HTTP request builder via helper.GetJSONRequestTimeout().

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: increasing the mounts reload timeout to 5 minutes, which is the core objective of this pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch increase-mounts-reload-timeout

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
cmd/mounts_reload.go (1)

36-36: ⚡ Quick win

Consider applying the same timeout to other mount operations that interact with network shares.

The PR updates only the reload command to use the 5-minute MountTimeout. However, the add, update, and delete commands currently use the default timeout. Since network shares can be slow to mount, unmount, or modify (as mentioned in the PR description), these operations should also use MountTimeout instead of the default timeout to avoid connection timeouts.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cmd/mounts_reload.go` at line 36, The reload command now uses
helper.GetJSONRequestTimeout(helper.MountTimeout) but the add, update, and
delete mount handlers still use the default request timeout; update the add,
update, and delete command handlers to call
helper.GetJSONRequestTimeout(helper.MountTimeout) (instead of the default
request helper) so all network-share operations use the 5-minute MountTimeout,
ensuring the same helper.MountTimeout constant and helper.GetJSONRequestTimeout
call are used in those handlers.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@cmd/mounts_reload.go`:
- Line 36: The reload command now uses
helper.GetJSONRequestTimeout(helper.MountTimeout) but the add, update, and
delete mount handlers still use the default request timeout; update the add,
update, and delete command handlers to call
helper.GetJSONRequestTimeout(helper.MountTimeout) (instead of the default
request helper) so all network-share operations use the 5-minute MountTimeout,
ensuring the same helper.MountTimeout constant and helper.GetJSONRequestTimeout
call are used in those handlers.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 72ff3b47-5765-49be-9769-f1bc136adc9b

📥 Commits

Reviewing files that changed from the base of the PR and between 1934233 and d66e776.

📒 Files selected for processing (2)
  • client/helper.go
  • cmd/mounts_reload.go

@frenck frenck merged commit 47f1d08 into master May 13, 2026
6 checks passed
@frenck frenck deleted the increase-mounts-reload-timeout branch May 13, 2026 12:32
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.

2 participants