Skip to content

feat: orderPriority on infra and dcc-bus services - #58

Merged
keskad merged 2 commits into
masterfrom
feat/order-priority
Aug 8, 2026
Merged

feat: orderPriority on infra and dcc-bus services#58
keskad merged 2 commits into
masterfrom
feat/order-priority

Conversation

@keskad

@keskad keskad commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Set explicit OrderPriority on Redis (100), microdns (110), alloy (130), and dcc-bus (350) drop-ins — same scale as hub OS services
  • Bump github.com/dcc-bigfred/microinit/go to include OrderPriority on ServiceDef
  • Assert priorities in infra unit tests

Depends on dcc-bigfred/microinit#11. Related: dcc-bigfred/bigfred-os#24.

Test plan

  • go test ./pkgs/bigfred/server/microinit/... ./pkgs/bigfred/server/service/
  • On standalone (non-OS) run, inspect written infra/*.json / dcc-bus/*.json for orderPriority

Made with Cursor

Align redis/microdns/alloy (100/110/130) and dcc-bus (350) with hub OS
bands; bump microinit/go for OrderPriority on ServiceDef.

Co-authored-by: Cursor <cursoragent@cursor.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This Pull Request effectively introduces OrderPriority to several key infrastructure and dcc-bus services, which is a significant improvement for managing service startup order and dependencies. The dependency update to microinit is appropriate, and the new unit tests for Redis and MicroDNS services correctly validate the OrderPriority settings. This change enhances the robustness and predictability of service initialization.

Comment thread go.mod Outdated
github.com/alicebob/miniredis/v2 v2.38.0
github.com/coder/websocket v1.8.13
github.com/dcc-bigfred/microinit/go v0.5.1-0.20260808173513-340a48672843
github.com/dcc-bigfred/microinit/go v0.5.1-0.20260808181038-38c3ddf12a28

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✨ [POSITIVE] POSITIVE: The dependency update to github.com/dcc-bigfred/microinit/go is necessary to support the new OrderPriority field in ServiceDef, aligning with the PR's goal.

RestartPolicy: RestartAlways,
StartWaitSecs: IntPtr(2),
ShutdownWaitSecs: IntPtr(10),
OrderPriority: IntPtr(100),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✨ [POSITIVE] POSITIVE: Explicitly setting OrderPriority for the Redis service improves control over service startup order, which is crucial for dependent services.

RestartBackoff: IntPtr(60),
StartWaitSecs: IntPtr(1),
ShutdownWaitSecs: IntPtr(5),
OrderPriority: IntPtr(110),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✨ [POSITIVE] POSITIVE: Assigning an OrderPriority to the MicroDNS service ensures it starts in a predictable sequence, especially if it relies on other foundational services.

RestartPolicy: RestartOnError,
StartWaitSecs: IntPtr(2),
ShutdownWaitSecs: IntPtr(10),
OrderPriority: IntPtr(130),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✨ [POSITIVE] POSITIVE: Setting OrderPriority for the Alloy service is a good practice for managing complex service dependencies and ensuring correct initialization flow.

if svc.RestartPolicy != RestartAlways {
t.Fatalf("RestartPolicy = %q, want %q", svc.RestartPolicy, RestartAlways)
}
if svc.OrderPriority == nil || *svc.OrderPriority != 100 {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✨ [POSITIVE] POSITIVE: Adding an assertion for OrderPriority in the Redis service test ensures that the priority is correctly applied and maintained, improving test coverage and reliability.

if svc.Labels[LabelCreatedBy] != CreatedByBigfred {
t.Fatalf("labels: %+v", svc.Labels)
}
if svc.OrderPriority == nil || *svc.OrderPriority != 110 {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✨ [POSITIVE] POSITIVE: The new assertion for OrderPriority in the MicroDNS service test is valuable for verifying the correct configuration of service startup order.

RestartPolicy: microinit.RestartOnError,
StartWaitSecs: microinit.IntPtr(1),
ShutdownWaitSecs: microinit.IntPtr(35),
OrderPriority: microinit.IntPtr(350),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✨ [POSITIVE] POSITIVE: Setting OrderPriority for the dcc-bus service is a critical improvement, as this service likely has dependencies and its startup order is important for system stability.

Pin github.com/dcc-bigfred/microinit/go to 3d44aec on main.

Co-authored-by: Cursor <cursoragent@cursor.com>
@keskad
keskad merged commit 951f3e4 into master Aug 8, 2026
2 checks passed
@keskad
keskad deleted the feat/order-priority branch August 8, 2026 18:40

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This Pull Request successfully introduces explicit OrderPriority for Redis, microdns, alloy, and dcc-bus services, aligning them with the hub OS services' priority scale. The dependency update to github.com/dcc-bigfred/microinit/go correctly incorporates the OrderPriority field into ServiceDef. The addition of unit tests to assert these priorities is a good practice, ensuring the new configuration is correctly applied and maintained.

if svc.RestartPolicy != RestartAlways {
t.Fatalf("RestartPolicy = %q, want %q", svc.RestartPolicy, RestartAlways)
}
if svc.OrderPriority == nil || *svc.OrderPriority != 100 {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✨ [POSITIVE] POSITIVE: Adding assertions for OrderPriority in the unit tests is a great improvement. It ensures that the newly introduced priority settings are correctly configured and provides confidence in the service definitions.

if svc.Labels[LabelCreatedBy] != CreatedByBigfred {
t.Fatalf("labels: %+v", svc.Labels)
}
if svc.OrderPriority == nil || *svc.OrderPriority != 110 {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✨ [POSITIVE] POSITIVE: This test addition for OrderPriority is valuable, ensuring the microdns service correctly sets its startup priority.

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.

1 participant