wip: testing agent deployment #3104

Merged
mfreeman451 merged 7 commits from refs/pull/3104/head into staging 2026-03-31 05:31:37 +00:00
mfreeman451 commented 2026-03-31 03:07:05 +00:00 (Migrated from github.com)
Owner

Imported from GitHub pull request.

Original GitHub pull request: #3106
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/3106
Original created: 2026-03-31T03:07:05Z
Original updated: 2026-03-31T05:31:38Z
Original head: carverauto/serviceradar:updates/agent-deploy-fixes
Original base: staging
Original merged: 2026-03-31T05:31:37Z by @mfreeman451

IMPORTANT: Please sign the Developer Certificate of Origin

Thank you for your contribution to ServiceRadar. Please note, when contributing, the developer must include
a DCO sign-off statement indicating the DCO acceptance in one commit message. Here
is an example DCO Signed-off-by line in a commit message:

Signed-off-by: J. Doe <j.doe@domain.com>

Describe your changes

Code checklist before requesting a review

  • I have signed the DCO?
  • The build completes without errors?
  • All tests are passing when running make test?
Imported from GitHub pull request. Original GitHub pull request: #3106 Original author: @mfreeman451 Original URL: https://github.com/carverauto/serviceradar/pull/3106 Original created: 2026-03-31T03:07:05Z Original updated: 2026-03-31T05:31:38Z Original head: carverauto/serviceradar:updates/agent-deploy-fixes Original base: staging Original merged: 2026-03-31T05:31:37Z by @mfreeman451 --- ## IMPORTANT: Please sign the Developer Certificate of Origin Thank you for your contribution to ServiceRadar. Please note, when contributing, the developer must include a [DCO sign-off statement]( https://developercertificate.org/) indicating the DCO acceptance in one commit message. Here is an example DCO Signed-off-by line in a commit message: ``` Signed-off-by: J. Doe <j.doe@domain.com> ``` ## Describe your changes ## Issue ticket number and link ## Code checklist before requesting a review - [ ] I have signed the DCO? - [ ] The build completes without errors? - [ ] All tests are passing when running make test?
Copilot commented 2026-03-31 03:12:10 +00:00 (Migrated from github.com)
Author
Owner

Imported GitHub PR review comment.

Original author: @Copilot
Original URL: https://github.com/carverauto/serviceradar/pull/3106#discussion_r3013226444
Original created: 2026-03-31T03:12:10Z
Original path: elixir/web-ng/lib/serviceradar_web_ng_web/live/settings/agents_live/releases.ex
Original line: 193

In create_rollout, the server-side validation does not block submissions when preview.release_missing? is true (e.g., user submits an unknown version or a version with surrounding whitespace). Because build_rollout_preview/4 treats selected_release == nil as “all selected agents are compatible”, agent_ids will be non-empty and rollout creation can proceed for a release that isn’t actually published. Add an explicit preview.release_missing? guard (and/or trim the version before lookup) to prevent creating rollouts for missing releases.

Imported GitHub PR review comment. Original author: @Copilot Original URL: https://github.com/carverauto/serviceradar/pull/3106#discussion_r3013226444 Original created: 2026-03-31T03:12:10Z Original path: elixir/web-ng/lib/serviceradar_web_ng_web/live/settings/agents_live/releases.ex Original line: 193 --- In `create_rollout`, the server-side validation does not block submissions when `preview.release_missing?` is true (e.g., user submits an unknown version or a version with surrounding whitespace). Because `build_rollout_preview/4` treats `selected_release == nil` as “all selected agents are compatible”, `agent_ids` will be non-empty and rollout creation can proceed for a release that isn’t actually published. Add an explicit `preview.release_missing?` guard (and/or trim the version before lookup) to prevent creating rollouts for missing releases.
Copilot commented 2026-03-31 03:12:10 +00:00 (Migrated from github.com)
Author
Owner

Imported GitHub PR review comment.

Original author: @Copilot
Original URL: https://github.com/carverauto/serviceradar/pull/3106#discussion_r3013226471
Original created: 2026-03-31T03:12:10Z
Original path: elixir/web-ng/lib/serviceradar_web_ng_web/live/settings/agents_live/releases.ex
Original line: 1566

rollout_submission_metadata/2 builds skipped_unsupported_agent_ids from preview.unsupported_agents, but build_rollout_preview/4 truncates unsupported_agents to 8 entries for display (Enum.take(unsupported_agents, 8)). This will silently drop skipped IDs when more than 8 unsupported agents are present. Keep a full list/ID list in the preview for metadata purposes, and only truncate the display list.

    skipped_unsupported_agent_ids =
      Map.get(preview, :unsupported_agent_ids, Enum.map(preview.unsupported_agents, & &1.agent_id))

    compact_map(%{
      requested_cohort: preview.cohort,
      requested_agent_ids: rollout_requested_agent_ids(params),
      skipped_unsupported_agent_ids: skipped_unsupported_agent_ids
Imported GitHub PR review comment. Original author: @Copilot Original URL: https://github.com/carverauto/serviceradar/pull/3106#discussion_r3013226471 Original created: 2026-03-31T03:12:10Z Original path: elixir/web-ng/lib/serviceradar_web_ng_web/live/settings/agents_live/releases.ex Original line: 1566 --- `rollout_submission_metadata/2` builds `skipped_unsupported_agent_ids` from `preview.unsupported_agents`, but `build_rollout_preview/4` truncates `unsupported_agents` to 8 entries for display (`Enum.take(unsupported_agents, 8)`). This will silently drop skipped IDs when more than 8 unsupported agents are present. Keep a full list/ID list in the preview for metadata purposes, and only truncate the display list. ```suggestion skipped_unsupported_agent_ids = Map.get(preview, :unsupported_agent_ids, Enum.map(preview.unsupported_agents, & &1.agent_id)) compact_map(%{ requested_cohort: preview.cohort, requested_agent_ids: rollout_requested_agent_ids(params), skipped_unsupported_agent_ids: skipped_unsupported_agent_ids ```
Copilot commented 2026-03-31 03:12:10 +00:00 (Migrated from github.com)
Author
Owner

Imported GitHub PR review comment.

Original author: @Copilot
Original URL: https://github.com/carverauto/serviceradar/pull/3106#discussion_r3013226492
Original created: 2026-03-31T03:12:10Z
Original path: helm/serviceradar/templates/agent-gateway.yaml
Original line: 123

The chart sets DATASVC_ENABLED to a hard-coded "true", which removes the ability to disable datasvc connectivity for the agent-gateway via values and can force the gateway to attempt datasvc connections in deployments where datasvc isn’t present. Consider making this conditional/configurable (e.g., agentGateway.datasvc.enabled defaulting appropriately) and only emitting the DATASVC_* env vars when enabled.

Imported GitHub PR review comment. Original author: @Copilot Original URL: https://github.com/carverauto/serviceradar/pull/3106#discussion_r3013226492 Original created: 2026-03-31T03:12:10Z Original path: helm/serviceradar/templates/agent-gateway.yaml Original line: 123 --- The chart sets `DATASVC_ENABLED` to a hard-coded "true", which removes the ability to disable datasvc connectivity for the agent-gateway via values and can force the gateway to attempt datasvc connections in deployments where datasvc isn’t present. Consider making this conditional/configurable (e.g., `agentGateway.datasvc.enabled` defaulting appropriately) and only emitting the DATASVC_* env vars when enabled.
Copilot commented 2026-03-31 03:12:11 +00:00 (Migrated from github.com)
Author
Owner

Imported GitHub PR review comment.

Original author: @Copilot
Original URL: https://github.com/carverauto/serviceradar/pull/3106#discussion_r3013226499
Original created: 2026-03-31T03:12:11Z
Original path: helm/serviceradar/templates/agent-gateway.yaml
Original line: 18

agent-gateway.yaml introduces DATASVC_SEC_MODE (including potential spiffe), but unlike web.yaml there is no conditional configuration to mount the SPIRE agent socket / bundle or set SPIFFE-related env vars when secMode is spiffe. As-is, configuring agentGateway.datasvc.secMode: spiffe will likely fail at runtime. Either document/limit supported modes here, or add the missing SPIFFE wiring similar to web.yaml.

Imported GitHub PR review comment. Original author: @Copilot Original URL: https://github.com/carverauto/serviceradar/pull/3106#discussion_r3013226499 Original created: 2026-03-31T03:12:11Z Original path: helm/serviceradar/templates/agent-gateway.yaml Original line: 18 --- `agent-gateway.yaml` introduces `DATASVC_SEC_MODE` (including potential `spiffe`), but unlike `web.yaml` there is no conditional configuration to mount the SPIRE agent socket / bundle or set SPIFFE-related env vars when `secMode` is `spiffe`. As-is, configuring `agentGateway.datasvc.secMode: spiffe` will likely fail at runtime. Either document/limit supported modes here, or add the missing SPIFFE wiring similar to `web.yaml`.
mfreeman451 referenced this pull request from a commit 2026-04-02 19:29:15 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
carverauto/serviceradar!3104
No description provided.