Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.

Conversation

@mattjohnsonpint
Copy link
Contributor

Working on cluster resilience. Likely this won't be the last one in this area.

@mattjohnsonpint mattjohnsonpint requested review from a team and Copilot June 23, 2025 01:09
@mattjohnsonpint mattjohnsonpint enabled auto-merge (squash) June 23, 2025 01:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances cluster resilience by adding structured tracing, refactoring discovery, and unifying duration handling.

  • Inject Sentry spans across actor lifecycle methods and key helpers
  • Refactor cluster discovery into newDiscoveryProvider with a wrapper for tracing
  • Introduce getDurationFromEnv and update environment-based timing configuration

Reviewed Changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
runtime/httpserver/health.go Pass r.Context() into ListLocalAgents
runtime/go.mod Bump github.com/tochemey/goakt/v3 to v3.6.5
runtime/actors/wasmagent.go Add spans in PreStart/Receive/PostStop/etc. and reorder buffers init
runtime/actors/subscriber.go Instrument subscription functions with spans
runtime/actors/misc.go Add getDurationFromEnv and instrument tell/ask with spans
runtime/actors/cluster.go Extract discovery logic into newDiscoveryProvider, add duration helpers, and spans
runtime/actors/agents.go Instrument agent lifecycle APIs with spans; update ListLocalAgents signature
runtime/actors/actorsystem.go Refactor startup into startActorSystem with retry/backoff and add spans
runtime/actors/actorlogger.go Remove paused/shutdown filters and simplify logging
CHANGELOG.md Add entry for v0.18.0-alpha.10
Comments suppressed due to low confidence (2)

runtime/actors/misc.go:81

  • Add unit tests for getDurationFromEnv to verify correct behavior when the environment variable is missing, invalid, or zero to prevent regressions.
func getDurationFromEnv(envVar string, defaultValue int, unit time.Duration) time.Duration {

runtime/actors/cluster.go:178

  • The new environment variables (e.g. MODUS_CLUSTER_PEER_SYNC_SECONDS, MODUS_CLUSTER_NODES_SYNC_SECONDS) should be documented in the project README or an environment reference to guide operators.
func peerSyncInterval() time.Duration {

@mattjohnsonpint mattjohnsonpint merged commit 5e780f9 into main Jun 23, 2025
33 checks passed
@mattjohnsonpint mattjohnsonpint deleted the mjp/cluster-improvements branch June 23, 2025 01:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants