Skip to content

NDM Agent Workload Balancing: switch RC product from NDM_AGENT_WORKLOAD_BALANCING to HA_AGENT #54801

Description

@matthewleese

Context

PRs #54652, #54656, #54659, and #54795 implemented NDM Agent Workload Balancing's agent-side component (comp/workloadbalancing), registering its own Remote Config product, NDM_AGENT_WORKLOAD_BALANCING.

The design RFC (NDM Agent Workload Balancing: Device Handoff) has since been updated to reuse HA Agent's existing HA_AGENT Remote Config product instead, extending its schema with a second, discriminated payload type rather than registering a new product. This follows the same polymorphic-payload pattern already used by ASM and Network Path's NETWORK_PATH product, and was settled after a Slack discussion establishing that extending an existing RC pipeline runs roughly 1-2 weeks versus roughly 1-2 months for a new one (new product registration, delivery predicates, the full RC checklist including security review).

What needs to change

  • comp/workloadbalancing's Remote Config listener: subscribe to state.ProductHaAgent (HA_AGENT) instead of a new NDM_AGENT_WORKLOAD_BALANCING product.
  • The listener needs to only act on documents carrying workload-balancing's discriminator field (e.g. group_id), ignoring ordinary HA Agent election documents (config_id/active_agent) on the same product, per comp/haagent's existing per-document filtering pattern.
  • Apply-status handling: skip applyStateCallback for documents this listener doesn't own, mirroring the existing pattern in comp/core/autodiscovery/providers/networkpath/provider.go and comp/networkpath/npcollector/impl/remote_config.go, which already share one RC product between two independent listeners.
  • The RC product schema itself (config validator's schema library) needs to move from a new NDM_AGENT_WORKLOAD_BALANCING directory to an extension of HA_AGENT's existing root.json.
  • Backend-side writer (WorkloadBalancingService.UpsertGroupAssignment) needs to target HA_AGENT RC documents instead of a separate product.
  • Test suite in test/new-e2e/tests/workload-balancing/ currently calls RCAddConfig(..., state.ProductNDMAgentWorkloadBalancing, ...) — needs updating to state.ProductHaAgent with the new payload shape.

Why this is a separate follow-up

This is a documentation-first change: the RFC update landed ahead of the code so reviewers are working from the current design. The already-merged agent code should be brought in line with it once the RFC's schema/discriminator details are finalized.

Note: This issue was created by Claude.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions