Skip to content

feat: replace host ticker with host monitor#332

Merged
jason-lynch merged 1 commit intomainfrom
feat/PLAT-400/replace-host-ticker
Apr 6, 2026
Merged

feat: replace host ticker with host monitor#332
jason-lynch merged 1 commit intomainfrom
feat/PLAT-400/replace-host-ticker

Conversation

@jason-lynch
Copy link
Copy Markdown
Member

Summary

This commit completes some previously-started work to replace host.UpdateTicker with monitor.HostMonitor. The monitor was already implemented, but was not being used yet.

Testing

There should be no noticeable change in functionality. On an initialized cluster, you should see the host statuses continue to update periodically:

cp1-req list-hosts | jq '.hosts[].status.updated_at'

PLAT-400

This commit completes some previously-started work to replace
`host.UpdateTicker` with `monitor.HostMonitor`. The monitor was already
implemented, but was not being used yet.

PLAT-400
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 6, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9eaf081c-de1b-400a-be93-7a896200aff7

📥 Commits

Reviewing files that changed from the base of the PR and between 0724783 and e18bcc9.

📒 Files selected for processing (6)
  • server/internal/app/app.go
  • server/internal/host/host.go
  • server/internal/host/provide.go
  • server/internal/host/ticker.go
  • server/internal/monitor/host_monitor.go
  • server/internal/monitor/service.go
💤 Files with no reviewable changes (3)
  • server/internal/app/app.go
  • server/internal/host/provide.go
  • server/internal/host/ticker.go

📝 Walkthrough

Walkthrough

The host.UpdateTicker component is removed from the application initialization pipeline. Host monitoring refresh timing is consolidated under a single HostMonitorRefreshInterval constant. Host monitor lifecycle is now explicitly managed during service startup and shutdown.

Changes

Cohort / File(s) Summary
UpdateTicker Removal
server/internal/app/app.go, server/internal/host/ticker.go, server/internal/host/provide.go
Deleted the deprecated UpdateTicker component, its provider registration, and its initialization from the app startup sequence. Removed UpdateStatusInterval constant and all associated ticker logic.
Interval Consolidation
server/internal/host/host.go, server/internal/monitor/host_monitor.go
Introduced HostMonitorRefreshInterval constant (15s) in host package. Updated host monitor to reference the new unified interval constant instead of database.InstanceMonitorRefreshInterval, removing the database import dependency.
Monitor Service Lifecycle
server/internal/monitor/service.go
Fixed typo in field name (hostMoniterhostMonitor). Integrated host monitor startup in Service.Start() and shutdown in Service.Shutdown() for proper lifecycle management.

Poem

🐰 The ticker's gone, no more does it chime,
One interval constant marks the time,
The monitor service takes the reins so tight,
With startup and shutdown, all feels just right! ✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

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.
Description check ❓ Inconclusive The description is missing required template sections: it lacks a high-level bulleted Changes section, Testing commands/steps, and a Checklist with required items (tests, documentation, issue linking, changelog). Add a Changes section with bulleted list, specify Testing commands (e.g., 'go test ./...'), and complete the Checklist section with all required items marked accordingly.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: replace host ticker with host monitor' accurately describes the main change—removing UpdateTicker and replacing it with HostMonitor integration.

✏️ 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 feat/PLAT-400/replace-host-ticker

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.

@codacy-production
Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 1 duplication

Metric Results
Duplication 1

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

@jason-lynch
Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 6, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor

@rshoemaker rshoemaker left a comment

Choose a reason for hiding this comment

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

Looks good.

@jason-lynch jason-lynch merged commit 134fba3 into main Apr 6, 2026
3 checks passed
@jason-lynch jason-lynch deleted the feat/PLAT-400/replace-host-ticker branch April 6, 2026 19:31
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.

2 participants