mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-10 02:25:56 +00:00
465ef1fda9
ec8b88fe2registered the alert-form docker identities as Patrol scope aliases for hosts and containers, but Swarm service alerts publish a third form, docker:<host>/service/<serviceID>, which matches neither the host alias docker:<host> nor the container alias docker:<host>/<containerID>. Have Patrol investigate on a docker service alert still returned patrol_scope_unresolved, and the automatic alert-fired patrol path sent the same identity, so scoped runs it triggered for service alerts failed resolution the same way. Mirror the service resource IDs onto the owning docker host record. Patrol has no service-level analysis, and a service's tasks run as containers on the host, so the host is the smallest unit Patrol can investigate for a service alert. Export the alerts helper for the same reasonec8b88fe2exported DockerResourceID, so the identity format cannot drift between the two subsystems. Hosts without an ID are skipped. The host-less fallback form docker-service:<name> is not host qualified and would alias unrelated records together across hosts, which is the same anti-aliasing rule dockerAlertScopeAlias already applies. Covered by tests asserting the alias equals what the alerts subsystem emits for the same input, that the host-less guard registers nothing, and that a service without an ID follows the canonical name-derived form. Refs discussion #1699 Contract-Neutral: behavioral bug fix refs discussion 1699, patrol scope resolution could not resolve docker service alert resource IDs, no public contract delta