Increase timeout for operations requiring reboot to 90s#556
Conversation
Users are sometimes confused when they try to reboot or switch slots and the operation fails with the generic error, while it's been already submitted and is performed shortly after. Allow more time for the operation to finish gracefully, as terminating it while it's been posted usually wouldn't cancel it anyway.
📝 WalkthroughWalkthroughThis pull request introduces a new constant, Changes
Sequence Diagram(s)sequenceDiagram
participant Cmd as Command Module
participant Helper as Helper Module
participant Endpoint as JSON Endpoint
Cmd->>Helper: Call GenericJSONPostTimeout(section, command, options, RebootTimeout)
Helper->>Endpoint: Send JSON POST request with timeout
Endpoint-->>Helper: Return response (or error on timeout)
Helper-->>Cmd: Return response/error
Cmd->>Cmd: Process response and handle errors
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (1.64.8)Error: you are using a configuration file for golangci-lint v2 with golangci-lint v1: please use golangci-lint v2 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
🧰 Additional context used📓 Path-based instructions (6)`*/**(html|markdown|md)`: - For instructional content in documentation, use a direct and authoritative tone. Avoid expressions of politeness such as 'may' or 'please', and ensure t...
`*/**(html|markdown|md)`: - Use bold to mark UI strings. - If "" are used to mark UI strings, replace them by bold.
`*/**(html|markdown|md)`: - Be brief in your replies and don't add fluff like "thank you for..." and "Please let me know if"
`*/**(html|markdown|md)`: - Use sentence-style capitalization also in headings.
`*/**(html|markdown|md)`: do not comment on HTML used for icons
`*/**(html|markdown|md)`: Avoid flagging inline HTML for embedding videos in future reviews for this repository.
🧬 Code Definitions (3)cmd/host_shutdown.go (2)
cmd/host_reboot.go (2)
cmd/os_boot_slot.go (2)
🔇 Additional comments (4)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Users are sometimes confused when they try to reboot or switch slots and the operation fails with the generic error, while it's been already submitted and is performed shortly after. Allow more time for the operation to finish gracefully, as terminating it while it's been posted usually wouldn't cancel it anyway.
Summary by CodeRabbit