Skip to content

refactor(satellite): move shutdownTimeout to SatelliteOptions - #618

Draft
ahsan-zamil wants to merge 1 commit into
container-registry:mainfrom
ahsan-zamil:fix/satellite-shutdown-timeout
Draft

refactor(satellite): move shutdownTimeout to SatelliteOptions#618
ahsan-zamil wants to merge 1 commit into
container-registry:mainfrom
ahsan-zamil:fix/satellite-shutdown-timeout

Conversation

@ahsan-zamil

@ahsan-zamil ahsan-zamil commented Aug 12, 2026

Copy link
Copy Markdown

This PR resolves #604 by moving the ShutdownTimeout configuration value into the central SatelliteOptions struct.

Changes:

  • Added ShutdownTimeout to SatelliteOptions in cmd/satellite/main.go.
  • Updated initialization and command-line flag parsing to bind directly to opts.ShutdownTimeout.
  • Refactored run() to accept (opts SatelliteOptions, pathConfig *config.PathConfig) (reducing it to two parameters).
  • Ensured all other 15 configuration fields and ShutdownTimeout are handled consistently.

Closes #604

Review in cubic

Summary by CodeRabbit

  • New Features
    • Added a configurable shutdown timeout for graceful application shutdown.
    • The timeout can be set using the --shutdown-timeout command-line option or environment defaults.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@ahsan-zamil, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 46 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f05c73f0-9d85-4de5-88c0-6f25452c4b59

📥 Commits

Reviewing files that changed from the base of the PR and between 5b01ba4 and ec04797.

📒 Files selected for processing (1)
  • cmd/satellite/main.go

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4055d704-a577-4e3b-8e92-a8e42d98bb1f

📥 Commits

Reviewing files that changed from the base of the PR and between 341cb42 and 5b01ba4.

📒 Files selected for processing (1)
  • cmd/satellite/main.go

📝 Walkthrough

Walkthrough

The shutdown timeout is added to SatelliteOptions. Environment and CLI values populate this field. run uses the consolidated options and passes the timeout to gracefulShutdown.

Changes

Satellite shutdown timeout

Layer / File(s) Summary
Consolidate timeout configuration and shutdown flow
cmd/satellite/main.go
SatelliteOptions stores the environment and CLI shutdown timeout. run reads the option and passes it to gracefulShutdown without a separate timeout parameter.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: vg006

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes moving shutdown timeout handling into SatelliteOptions.
Description check ✅ Passed The description explains the changes, references issue #604, and provides sufficient implementation context despite minor template differences.
Linked Issues check ✅ Passed The changes satisfy all coding objectives in issue #604, including SatelliteOptions integration and the two-parameter run function.
Out of Scope Changes check ✅ Passed The changes are limited to shutdown timeout configuration and related parameter refactoring within the satellite command.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@gitar-bot

gitar-bot Bot commented Aug 12, 2026

Copy link
Copy Markdown

Gitar is working

Gitar

@codacy-production

codacy-production Bot commented Aug 12, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 12 complexity · 0 duplication

Metric Results
Complexity 12
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 1 file

Re-trigger cubic

@ahsan-zamil
ahsan-zamil force-pushed the fix/satellite-shutdown-timeout branch from 5b01ba4 to 5205265 Compare August 12, 2026 13:59
Signed-off-by: Ahsan Zamil <ahsanzamil76@gmail.com>
@ahsan-zamil
ahsan-zamil force-pushed the fix/satellite-shutdown-timeout branch from 5205265 to ec04797 Compare August 12, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(satellite): move shutdownTimeout to SatelliteOptions for consistency

1 participant