bug: cant edit integration source #924

Closed
opened 2026-03-28 04:29:56 +00:00 by mfreeman451 · 1 comment
Owner

Imported from GitHub.

Original GitHub issue: #2622
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/issues/2622
Original created: 2026-01-30T19:03:36Z


Describe the bug
https://demo.serviceradar.cloud/settings/networks/integrations/946fe677-b238-4997-82f5-21d279c1d20f/edit

Throws an error:

19:01:40.805 [error] GenServer #PID<0.31438.0> terminating
** (KeyError) key :selected_source not found in:

    %{
      form: %Phoenix.HTML.Form{
        source: #AshPhoenix.Form<
          resource: ServiceRadar.Integrations.IntegrationSource,
          action: :update,
          type: :update,
          params: %{},
          source: #Ash.Changeset<
            domain: ServiceRadar.Integrations,
            action_type: :update,
            action: :update,
            attributes: %{},
            relationships: %{},
            arguments: %{},
            errors: [],
            data: %ServiceRadar.Integrations.IntegrationSource{
              id: "946fe677-b238-4997-82f5-21d279c1d20f",
              name: "armis",
              source_type: :armis,
              endpoint: "https://serviceradar-faker:8080",
              enabled: true,
              agent_id: "k8s-agent",
              gateway_id: nil,
              partition: "default",
              poll_interval_seconds: 300,
              discovery_interval_seconds: 3600,
              sweep_interval_seconds: 3600,
              page_size: 100,
              network_blacklist: [],
              queries: [
                %{
                  "label" => "all_devices",
                  "query" => "in:devices",
                  "sweep_modes" => []
                }
              ],
              custom_fields: [],
              settings: %{},
              last_sync_at: nil,
              last_sync_result: nil,
              last_device_count: 0,
              last_error_message: nil,
              sync_status: :idle,
              consecutive_failures: 0,
              total_syncs: 0,
              inserted_at: ~U[2026-01-30 18:18:27.092811Z],
              updated_at: ~U[2026-01-30 18:18:27.092811Z],
              credentials: #Ash.NotLoaded<:calculation, field: :credentials>,
              poll_interval_display: #Ash.NotLoaded<:calculation, field: :poll_interval_display>,
              status_label: #Ash.NotLoaded<:calculation, field: :status_label>,
              status_color: #Ash.NotLoaded<:calculation, field: :status_color>,
              is_healthy: #Ash.NotLoaded<:calculation, field: :is_healthy>,
              __meta__: #Ecto.Schema.Metadata<:loaded, "platform", "integration_sources">
            },
            valid?: true,
            load: [:credentials_encrypted]
          >,
          name: "form",
          data: %ServiceRadar.Integrations.IntegrationSource{
            id: "946fe677-b238-4997-82f5-21d279c1d20f",
            name: "armis",
            source_type: :armis,
            endpoint: "https://serviceradar-faker:8080",
            enabled: true,
            agent_id: "k8s-agent",
            gateway_id: nil,
            partition: "default",
            poll_interval_seconds: 300,
            discovery_interval_seconds: 3600,
            sweep_interval_seconds: 3600,
            page_size: 100,
            network_blacklist: [],
            queries: [
              %{
                "label" => "all_devices",
                "query" => "in:devices",
                "sweep_modes" => []
              }
            ],
            custom_fields: [],
            settings: %{},
            last_sync_at: nil,
            last_sync_result: nil,
            last_device_count: 0,
            last_error_message: nil,
            sync_status: :idle,
            consecutive_failures: 0,
            total_syncs: 0,
            inserted_at: ~U[2026-01-30 18:18:27.092811Z],
            updated_at: ~U[2026-01-30 18:18:27.092811Z],
            credentials: #Ash.NotLoaded<:calculation, field: :credentials>,
            poll_interval_display: #Ash.NotLoaded<:calculation, field: :poll_interval_display>,
            status_label: #Ash.NotLoaded<:calculation, field: :status_label>,
            status_color: #Ash.NotLoaded<:calculation, field: :status_color>,
            is_healthy: #Ash.NotLoaded<:calculation, field: :is_healthy>,
            __meta__: #Ecto.Schema.Metadata<:loaded, "platform", "integration_sources">
          },
          form_keys: [],
          forms: %{},
          domain: ServiceRadar.Integrations,
          method: "put",
          submit_errors: nil,
          id: "form",
          transform_errors: nil,
          post_process_errors: nil,
          original_data: %ServiceRadar.Integrations.IntegrationSource{
            id: "946fe677-b238-4997-82f5-21d279c1d20f",
            name: "armis",
            source_type: :armis,
            endpoint: "https://serviceradar-faker:8080",
            enabled: true,
            agent_id: "k8s-agent",
            gateway_id: nil,
            partition: "default",
            poll_interval_seconds: 300,
            discovery_interval_seconds: 3600,
            sweep_interval_seconds: 3600,
            page_size: 100,
            network_blacklist: [],
            queries: [
              %{
                "label" => "all_devices",
                "query" => "in:devices",
                "sweep_modes" => []
              }
            ],
            custom_fields: [],
            settings: %{},
            last_sync_at: nil,
            last_sync_result: nil,
            last_device_count: 0,
            last_error_message: nil,
            sync_status: :idle,
            consecutive_failures: 0,
            total_syncs: 0,
            inserted_at: ~U[2026-01-30 18:18:27.092811Z],
            updated_at: ~U[2026-01-30 18:18:27.092811Z],
            credentials: #Ash.NotLoaded<:calculation, field: :credentials>,
            poll_interval_display: #Ash.NotLoaded<:calculation, field: :poll_interval_display>,
            status_label: #Ash.NotLoaded<:calculation, field: :status_label>,
            status_color: #Ash.NotLoaded<:calculation, field: :status_color>,
            is_healthy: #Ash.NotLoaded<:calculation, field: :is_healthy>,
            __meta__: #Ecto.Schema.Metadata<:loaded, "platform", "integration_sources">
          },
          transform_params: #Function<5.21458352/3 in ServiceRadarWebNGWeb.Settings.IntegrationsLive.Index.build_edit_form/2>,
          prepare_params: nil,
          prepare_source: nil,
          raw_params: %{},
          warn_on_unhandled_errors?: true,
          any_removed?: false,
          added?: false,
          changed?: false,
          touched_forms: MapSet.new([]),
          valid?: true,
          errors: nil,
          submitted_once?: false,
          just_submitted?: false,
          ...
        >,
        impl: Phoenix.HTML.FormData.AshPhoenix.Form,
        id: "form",
        name: "form",
        data: %ServiceRadar.Integrations.IntegrationSource{
          id: "946fe677-b238-4997-82f5-21d279c1d20f",
          name: "armis",
          source_type: :armis,
          endpoint: "https://serviceradar-faker:8080",
          enabled: true,
          agent_id: "k8s-agent",
          gateway_id: nil,
          partition: "default",
          poll_interval_seconds: 300,
          discovery_interval_seconds: 3600,
          sweep_interval_seconds: 3600,
          page_size: 100,
          network_blacklist: [],
          queries: [
            %{
              "label" => "all_devices",
              "query" => "in:devices",
              "sweep_modes" => []
            }
          ],
          custom_fields: [],
          settings: %{},
          last_sync_at: nil,
          last_sync_result: nil,
          last_device_count: 0,
          last_error_message: nil,
          sync_status: :idle,
          consecutive_failures: 0,
          total_syncs: 0,
          inserted_at: ~U[2026-01-30 18:18:27.092811Z],
          updated_at: ~U[2026-01-30 18:18:27.092811Z],
          credentials: #Ash.NotLoaded<:calculation, field: :credentials>,
          poll_interval_display: #Ash.NotLoaded<:calculation, field: :poll_interval_display>,
          status_label: #Ash.NotLoaded<:calculation, field: :status_label>,
          status_color: #Ash.NotLoaded<:calculation, field: :status_color>,
          is_healthy: #Ash.NotLoaded<:calculation, field: :is_healthy>,
          __meta__: #Ecto.Schema.Metadata<:loaded, "platform" (truncated)
19:01:40.810 [error] an exception was raised:
    ** (KeyError) key :selected_source not found in:

    %{
      form: %Phoenix.HTML.Form{
        source: #AshPhoenix.Form<
          resource: ServiceRadar.Integrations.IntegrationSource,
          action: :update,
          type: :update,
          params: %{},
          source: #Ash.Changeset<
            domain: ServiceRadar.Integrations,
            action_type: :update,
            action: :update,
            attributes: %{},
            relationships: %{},
            arguments: %{},
            errors: [],
            data: %ServiceRadar.Integrations.IntegrationSource{
              id: "946fe677-b238-4997-82f5-21d279c1d20f",
              name: "armis",
              source_type: :armis,
              endpoint: "https://serviceradar-faker:8080",
              enabled: true,
              agent_id: "k8s-agent",
              gateway_id: nil,
              partition: "default",
              poll_interval_seconds: 300,
              discovery_interval_seconds: 3600,
              sweep_interval_seconds: 3600,
              page_size: 100,
              network_blacklist: [],
              queries: [
                %{
                  "label" => "all_devices",
                  "query" => "in:devices",
                  "sweep_modes" => []
                }
              ],
              custom_fields: [],
              settings: %{},
              last_sync_at: nil,
              last_sync_result: nil,
              last_device_count: 0,
              last_error_message: nil,
              sync_status: :idle,
              consecutive_failures: 0,
              total_syncs: 0,
              inserted_at: ~U[2026-01-30 18:18:27.092811Z],
              updated_at: ~U[2026-01-30 18:18:27.092811Z],
              credentials: #Ash.NotLoaded<:calculation, field: :credentials>,
              poll_interval_display: #Ash.NotLoaded<:calculation, field: :poll_interval_display>,
              status_label: #Ash.NotLoaded<:calculation, field: :status_label>,
              status_color: #Ash.NotLoaded<:calculation, field: :status_color>,
              is_healthy: #Ash.NotLoaded<:calculation, field: :is_healthy>,
              __meta__: #Ecto.Schema.Metadata<:loaded, "platform", "integration_sources">
            },
            valid?: true,
            load: [:credentials_encrypted]
          >,
          name: "form",
          data: %ServiceRadar.Integrations.IntegrationSource{
            id: "946fe677-b238-4997-82f5-21d279c1d20f",
            name: "armis",
            source_type: :armis,
            endpoint: "https://serviceradar-faker:8080",
            enabled: true,
            agent_id: "k8s-agent",
            gateway_id: nil,
            partition: "default",
            poll_interval_seconds: 300,
            discovery_interval_seconds: 3600,
            sweep_interval_seconds: 3600,
            page_size: 100,
            network_blacklist: [],
            queries: [
              %{
                "label" => "all_devices",
                "query" => "in:devices",
                "sweep_modes" => []
              }
            ],
            custom_fields: [],
            settings: %{},
            last_sync_at: nil,
            last_sync_result: nil,
            last_device_count: 0,
            last_error_message: nil,
            sync_status: :idle,
            consecutive_failures: 0,
            total_syncs: 0,
            inserted_at: ~U[2026-01-30 18:18:27.092811Z],
            updated_at: ~U[2026-01-30 18:18:27.092811Z],
            credentials: #Ash.NotLoaded<:calculation, field: :credentials>,
            poll_interval_display: #Ash.NotLoaded<:calculation, field: :poll_interval_display>,
            status_label: #Ash.NotLoaded<:calculation, field: :status_label>,
            status_color: #Ash.NotLoaded<:calculation, field: :status_color>,
            is_healthy: #Ash.NotLoaded<:calculation, field: :is_healthy>,
            __meta__: #Ecto.Schema.Metadata<:loaded, "platform", "integration_sources">
          },
          form_keys: [],
          forms: %{},
          domain: ServiceRadar.Integrations,
          method: "put",
          submit_errors: nil,
          id: "form",
          transform_errors: nil,
          post_process_errors: nil,
          original_data: %ServiceRadar.Integrations.IntegrationSource{
            id: "946fe677-b238-4997-82f5-21d279c1d20f",
            name: "armis",
            source_type: :armis,
            endpoint: "https://serviceradar-faker:8080",
            enabled: true,
            agent_id: "k8s-agent",
            gateway_id: nil,
            partition: "default",
            poll_interval_seconds: 300,
            discovery_interval_seconds: 3600,
            sweep_interval_seconds: 3600,
            page_size: 100,
            network_blacklist: [],
            queries: [
              %{
                "label" => "all_devices",
                "query" => "in:devices",
                "sweep_modes" => []
              }
            ],
            custom_fields: [],
            settings: %{},
            last_sync_at: nil,
            last_sync_result: nil,
            last_device_count: 0,
            last_error_message: nil,
            sync_status: :idle,
            consecutive_failures: 0,
            total_syncs: 0,
            inserted_at: ~U[2026-01-30 18:18:27.092811Z],
            updated_at: ~U[2026-01-30 18:18:27.092811Z],
            credentials: #Ash.NotLoaded<:calculation, field: :credentials>,
            poll_interval_display: #Ash.NotLoaded<:calculation, field: :poll_interval_display>,
            status_label: #Ash.NotLoaded<:calculation, field: :status_label>,
            status_color: #Ash.NotLoaded<:calculation, field: :status_color>,
            is_healthy: #Ash.NotLoaded<:calculation, field: :is_healthy>,
            __meta__: #Ecto.Schema.Metadata<:loaded, "platform", "integration_sources">
          },
          transform_params: #Function<5.21458352/3 in ServiceRadarWebNGWeb.Settings.IntegrationsLive.Index.build_edit_form/2>,
          prepare_params: nil,
          prepare_source: nil,
          raw_params: %{},
          warn_on_unhandled_errors?: true,
          any_removed?: false,
          added?: false,
          changed?: false,
          touched_forms: MapSet.new([]),
          valid?: true,
          errors: nil,
          submitted_once?: false,
          just_submitted?: false,
          ...
        >,
        impl: Phoenix.HTML.FormData.AshPhoenix.Form,
        id: "form",
        name: "form",
        data: %ServiceRadar.Integrations.IntegrationSource{
          id: "946fe677-b238-4997-82f5-21d279c1d20f",
          name: "armis",
          source_type: :armis,
          endpoint: "https://serviceradar-faker:8080",
          enabled: true,
          agent_id: "k8s-agent",
          gateway_id: nil,
          partition: "default",
          poll_interval_seconds: 300,
          discovery_interval_seconds: 3600,
          sweep_interval_seconds: 3600,
          page_size: 100,
          network_blacklist: [],
          queries: [
            %{
              "label" => "all_devices",
              "query" => "in:devices",
              "sweep_modes" => []
            }
          ],
          custom_fields: [],
          settings: %{},
          last_sync_at: nil,
          last_sync_result: nil,
          last_device_count: 0,
          last_error_message: nil,
          sync_status: :idle,
          consecutive_failures: 0,
          total_syncs: 0,
          inserted_at: ~U[2026-01-30 18:18:27.092811Z],
          updated_at: ~U[2026-01-30 18:18:27.092811Z],
          credentials: #Ash.NotLoaded<:calculation, field: :credentials>,
          poll_interval_display: #Ash.NotLoaded<:calculation, field: :poll_interval_display>,
          status_label: #Ash.NotLoaded<:calculation, field: :status_label>,
          status_color: #Ash.NotLoaded<:calculation, field: :status_color>,
          is_healthy: #Ash.NotLoaded<:calculation, field: :is_healthy>,
          __meta__: #Ecto.Schema.Metadata<:loaded, "platform", "integ (truncated)
19:01:48.523 [info] Plug.SSL is redirecting GET / to https://demo.serviceradar.cloud with status 301
19:01:48.569 [info] Plug.SSL is redirecting GET / to https://demo.serviceradar.cloud with status 301
19:01:50.710 request_id=a26f85039aae8c7b8150ea83a3c6e096 [info] GET /settings/networks/integrations/946fe677-b238-4997-82f5-21d279c1d20f/edit
19:01:50.745 request_id=a26f85039aae8c7b8150ea83a3c6e096 [info] Sent 500 in 35ms
19:01:50.747 request_id=a26f85039aae8c7b8150ea83a3c6e096 [error] ** (KeyError) key :selected_source not found in:

    %{
      form: %Phoenix.HTML.Form{
        source: #AshPhoenix.Form<
          resource: ServiceRadar.Integrations.IntegrationSource,
          action: :update,
          type: :update,
          params: %{},
          source: #Ash.Changeset<
            domain: ServiceRadar.Integrations,
            action_type: :update,
            action: :update,
            attributes: %{},
            relationships: %{},
            arguments: %{},
            errors: [],
            data: %ServiceRadar.Integrations.IntegrationSource{
              id: "946fe677-b238-4997-82f5-21d279c1d20f",
              name: "armis",
              source_type: :armis,
              endpoint: "https://serviceradar-faker:8080",
              enabled: true,
              agent_id: "k8s-agent",
              gateway_id: nil,
              partition: "default",
              poll_interval_seconds: 300,
              discovery_interval_seconds: 3600,
              sweep_interval_seconds: 3600,
              page_size: 100,
              network_blacklist: [],
              queries: [
                %{
                  "label" => "all_devices",
                  "query" => "in:devices",
                  "sweep_modes" => []
                }
              ],
              custom_fields: [],
              settings: %{},
              last_sync_at: nil,
              last_sync_result: nil,
              last_device_count: 0,
              last_error_message: nil,
              sync_status: :idle,
              consecutive_failures: 0,
              total_syncs: 0,
              inserted_at: ~U[2026-01-30 18:18:27.092811Z],
              updated_at: ~U[2026-01-30 18:18:27.092811Z],
              credentials: #Ash.NotLoaded<:calculation, field: :credentials>,
              poll_interval_display: #Ash.NotLoaded<:calculation, field: :poll_interval_display>,
              status_label: #Ash.NotLoaded<:calculation, field: :status_label>,
              status_color: #Ash.NotLoaded<:calculation, field: :status_color>,
              is_healthy: #Ash.NotLoaded<:calculation, field: :is_healthy>,
              __meta__: #Ecto.Schema.Metadata<:loaded, "platform", "integration_sources">
            },
            valid?: true,
            load: [:credentials_encrypted]
          >,
          name: "form",
          data: %ServiceRadar.Integrations.IntegrationSource{
            id: "946fe677-b238-4997-82f5-21d279c1d20f",
            name: "armis",
            source_type: :armis,
            endpoint: "https://serviceradar-faker:8080",
            enabled: true,
            agent_id: "k8s-agent",
            gateway_id: nil,
            partition: "default",
            poll_interval_seconds: 300,
            discovery_interval_seconds: 3600,
            sweep_interval_seconds: 3600,
            page_size: 100,
            network_blacklist: [],
            queries: [
              %{
                "label" => "all_devices",
                "query" => "in:devices",
                "sweep_modes" => []
              }
            ],
            custom_fields: [],
            settings: %{},
            last_sync_at: nil,
            last_sync_result: nil,
            last_device_count: 0,
            last_error_message: nil,
            sync_status: :idle,
            consecutive_failures: 0,
            total_syncs: 0,
            inserted_at: ~U[2026-01-30 18:18:27.092811Z],
            updated_at: ~U[2026-01-30 18:18:27.092811Z],
            credentials: #Ash.NotLoaded<:calculation, field: :credentials>,
            poll_interval_display: #Ash.NotLoaded<:calculation, field: :poll_interval_display>,
            status_label: #Ash.NotLoaded<:calculation, field: :status_label>,
            status_color: #Ash.NotLoaded<:calculation, field: :status_color>,
            is_healthy: #Ash.NotLoaded<:calculation, field: :is_healthy>,
            __meta__: #Ecto.Schema.Metadata<:loaded, "platform", "integration_sources">
          },
          form_keys: [],
          forms: %{},
          domain: ServiceRadar.Integrations,
          method: "put",
          submit_errors: nil,
          id: "form",
          transform_errors: nil,
          post_process_errors: nil,
          original_data: %ServiceRadar.Integrations.IntegrationSource{
            id: "946fe677-b238-4997-82f5-21d279c1d20f",
            name: "armis",
            source_type: :armis,
            endpoint: "https://serviceradar-faker:8080",
            enabled: true,
            agent_id: "k8s-agent",
            gateway_id: nil,
            partition: "default",
            poll_interval_seconds: 300,
            discovery_interval_seconds: 3600,
            sweep_interval_seconds: 3600,
            page_size: 100,
            network_blacklist: [],
            queries: [
              %{
                "label" => "all_devices",
                "query" => "in:devices",
                "sweep_modes" => []
              }
            ],
            custom_fields: [],
            settings: %{},
            last_sync_at: nil,
            last_sync_result: nil,
            last_device_count: 0,
            last_error_message: nil,
            sync_status: :idle,
            consecutive_failures: 0,
            total_syncs: 0,
            inserted_at: ~U[2026-01-30 18:18:27.092811Z],
            updated_at: ~U[2026-01-30 18:18:27.092811Z],
            credentials: #Ash.NotLoaded<:calculation, field: :credentials>,
            poll_interval_display: #Ash.NotLoaded<:calculation, field: :poll_interval_display>,
            status_label: #Ash.NotLoaded<:calculation, field: :status_label>,
            status_color: #Ash.NotLoaded<:calculation, field: :status_color>,
            is_healthy: #Ash.NotLoaded<:calculation, field: :is_healthy>,
            __meta__: #Ecto.Schema.Metadata<:loaded, "platform", "integration_sources">
          },
          transform_params: #Function<5.21458352/3 in ServiceRadarWebNGWeb.Settings.IntegrationsLive.Index.build_edit_form/2>,
          prepare_params: nil,
          prepare_source: nil,
          raw_params: %{},
          warn_on_unhandled_errors?: true,
          any_removed?: false,
          added?: false,
          changed?: false,
          touched_forms: MapSet.new([]),
          valid?: true,
          errors: nil,
          submitted_once?: false,
          just_submitted?: false,
          ...
        >,
        impl: Phoenix.HTML.FormData.AshPhoenix.Form,
        id: "form",
        name: "form",
        data: %ServiceRadar.Integrations.IntegrationSource{
          id: "946fe677-b238-4997-82f5-21d279c1d20f",
          name: "armis",
          source_type: :armis,
          endpoint: "https://serviceradar-faker:8080",
          enabled: true,
          agent_id: "k8s-agent",
          gateway_id: nil,
          partition: "default",
          poll_interval_seconds: 300,
          discovery_interval_seconds: 3600,
          sweep_interval_seconds: 3600,
          page_size: 100,
          network_blacklist: [],
          queries: [
            %{
              "label" => "all_devices",
              "query" => "in:devices",
              "sweep_modes" => []
            }
          ],
          custom_fields: [],
          settings: %{},
          last_sync_at: nil,
          last_sync_result: nil,
          last_device_count: 0,
          last_error_message: nil,
          sync_status: :idle,
          consecutive_failures: 0,
          total_syncs: 0,
          inserted_at: ~U[2026-01-30 18:18:27.092811Z],
          updated_at: ~U[2026-01-30 18:18:27.092811Z],
          credentials: #Ash.NotLoaded<:calculation, field: :credentials>,
          poll_interval_display: #Ash.NotLoaded<:calculation, field: :poll_interval_display>,
          status_label: #Ash.NotLoaded<:calculation, field: :status_label>,
          status_color: #Ash.NotLoaded<:calculation, field: :status_color>,
          is_healthy: #Ash.NotLoaded<:calculation, field: :is_healthy>,
          __meta__: #Ecto.Schema.Metadata<:loaded, "platform", "integration_sources">
        },
  (truncated)

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Imported from GitHub. Original GitHub issue: #2622 Original author: @mfreeman451 Original URL: https://github.com/carverauto/serviceradar/issues/2622 Original created: 2026-01-30T19:03:36Z --- **Describe the bug** https://demo.serviceradar.cloud/settings/networks/integrations/946fe677-b238-4997-82f5-21d279c1d20f/edit Throws an error: ``` 19:01:40.805 [error] GenServer #PID<0.31438.0> terminating ** (KeyError) key :selected_source not found in: %{ form: %Phoenix.HTML.Form{ source: #AshPhoenix.Form< resource: ServiceRadar.Integrations.IntegrationSource, action: :update, type: :update, params: %{}, source: #Ash.Changeset< domain: ServiceRadar.Integrations, action_type: :update, action: :update, attributes: %{}, relationships: %{}, arguments: %{}, errors: [], data: %ServiceRadar.Integrations.IntegrationSource{ id: "946fe677-b238-4997-82f5-21d279c1d20f", name: "armis", source_type: :armis, endpoint: "https://serviceradar-faker:8080", enabled: true, agent_id: "k8s-agent", gateway_id: nil, partition: "default", poll_interval_seconds: 300, discovery_interval_seconds: 3600, sweep_interval_seconds: 3600, page_size: 100, network_blacklist: [], queries: [ %{ "label" => "all_devices", "query" => "in:devices", "sweep_modes" => [] } ], custom_fields: [], settings: %{}, last_sync_at: nil, last_sync_result: nil, last_device_count: 0, last_error_message: nil, sync_status: :idle, consecutive_failures: 0, total_syncs: 0, inserted_at: ~U[2026-01-30 18:18:27.092811Z], updated_at: ~U[2026-01-30 18:18:27.092811Z], credentials: #Ash.NotLoaded<:calculation, field: :credentials>, poll_interval_display: #Ash.NotLoaded<:calculation, field: :poll_interval_display>, status_label: #Ash.NotLoaded<:calculation, field: :status_label>, status_color: #Ash.NotLoaded<:calculation, field: :status_color>, is_healthy: #Ash.NotLoaded<:calculation, field: :is_healthy>, __meta__: #Ecto.Schema.Metadata<:loaded, "platform", "integration_sources"> }, valid?: true, load: [:credentials_encrypted] >, name: "form", data: %ServiceRadar.Integrations.IntegrationSource{ id: "946fe677-b238-4997-82f5-21d279c1d20f", name: "armis", source_type: :armis, endpoint: "https://serviceradar-faker:8080", enabled: true, agent_id: "k8s-agent", gateway_id: nil, partition: "default", poll_interval_seconds: 300, discovery_interval_seconds: 3600, sweep_interval_seconds: 3600, page_size: 100, network_blacklist: [], queries: [ %{ "label" => "all_devices", "query" => "in:devices", "sweep_modes" => [] } ], custom_fields: [], settings: %{}, last_sync_at: nil, last_sync_result: nil, last_device_count: 0, last_error_message: nil, sync_status: :idle, consecutive_failures: 0, total_syncs: 0, inserted_at: ~U[2026-01-30 18:18:27.092811Z], updated_at: ~U[2026-01-30 18:18:27.092811Z], credentials: #Ash.NotLoaded<:calculation, field: :credentials>, poll_interval_display: #Ash.NotLoaded<:calculation, field: :poll_interval_display>, status_label: #Ash.NotLoaded<:calculation, field: :status_label>, status_color: #Ash.NotLoaded<:calculation, field: :status_color>, is_healthy: #Ash.NotLoaded<:calculation, field: :is_healthy>, __meta__: #Ecto.Schema.Metadata<:loaded, "platform", "integration_sources"> }, form_keys: [], forms: %{}, domain: ServiceRadar.Integrations, method: "put", submit_errors: nil, id: "form", transform_errors: nil, post_process_errors: nil, original_data: %ServiceRadar.Integrations.IntegrationSource{ id: "946fe677-b238-4997-82f5-21d279c1d20f", name: "armis", source_type: :armis, endpoint: "https://serviceradar-faker:8080", enabled: true, agent_id: "k8s-agent", gateway_id: nil, partition: "default", poll_interval_seconds: 300, discovery_interval_seconds: 3600, sweep_interval_seconds: 3600, page_size: 100, network_blacklist: [], queries: [ %{ "label" => "all_devices", "query" => "in:devices", "sweep_modes" => [] } ], custom_fields: [], settings: %{}, last_sync_at: nil, last_sync_result: nil, last_device_count: 0, last_error_message: nil, sync_status: :idle, consecutive_failures: 0, total_syncs: 0, inserted_at: ~U[2026-01-30 18:18:27.092811Z], updated_at: ~U[2026-01-30 18:18:27.092811Z], credentials: #Ash.NotLoaded<:calculation, field: :credentials>, poll_interval_display: #Ash.NotLoaded<:calculation, field: :poll_interval_display>, status_label: #Ash.NotLoaded<:calculation, field: :status_label>, status_color: #Ash.NotLoaded<:calculation, field: :status_color>, is_healthy: #Ash.NotLoaded<:calculation, field: :is_healthy>, __meta__: #Ecto.Schema.Metadata<:loaded, "platform", "integration_sources"> }, transform_params: #Function<5.21458352/3 in ServiceRadarWebNGWeb.Settings.IntegrationsLive.Index.build_edit_form/2>, prepare_params: nil, prepare_source: nil, raw_params: %{}, warn_on_unhandled_errors?: true, any_removed?: false, added?: false, changed?: false, touched_forms: MapSet.new([]), valid?: true, errors: nil, submitted_once?: false, just_submitted?: false, ... >, impl: Phoenix.HTML.FormData.AshPhoenix.Form, id: "form", name: "form", data: %ServiceRadar.Integrations.IntegrationSource{ id: "946fe677-b238-4997-82f5-21d279c1d20f", name: "armis", source_type: :armis, endpoint: "https://serviceradar-faker:8080", enabled: true, agent_id: "k8s-agent", gateway_id: nil, partition: "default", poll_interval_seconds: 300, discovery_interval_seconds: 3600, sweep_interval_seconds: 3600, page_size: 100, network_blacklist: [], queries: [ %{ "label" => "all_devices", "query" => "in:devices", "sweep_modes" => [] } ], custom_fields: [], settings: %{}, last_sync_at: nil, last_sync_result: nil, last_device_count: 0, last_error_message: nil, sync_status: :idle, consecutive_failures: 0, total_syncs: 0, inserted_at: ~U[2026-01-30 18:18:27.092811Z], updated_at: ~U[2026-01-30 18:18:27.092811Z], credentials: #Ash.NotLoaded<:calculation, field: :credentials>, poll_interval_display: #Ash.NotLoaded<:calculation, field: :poll_interval_display>, status_label: #Ash.NotLoaded<:calculation, field: :status_label>, status_color: #Ash.NotLoaded<:calculation, field: :status_color>, is_healthy: #Ash.NotLoaded<:calculation, field: :is_healthy>, __meta__: #Ecto.Schema.Metadata<:loaded, "platform" (truncated) 19:01:40.810 [error] an exception was raised: ** (KeyError) key :selected_source not found in: %{ form: %Phoenix.HTML.Form{ source: #AshPhoenix.Form< resource: ServiceRadar.Integrations.IntegrationSource, action: :update, type: :update, params: %{}, source: #Ash.Changeset< domain: ServiceRadar.Integrations, action_type: :update, action: :update, attributes: %{}, relationships: %{}, arguments: %{}, errors: [], data: %ServiceRadar.Integrations.IntegrationSource{ id: "946fe677-b238-4997-82f5-21d279c1d20f", name: "armis", source_type: :armis, endpoint: "https://serviceradar-faker:8080", enabled: true, agent_id: "k8s-agent", gateway_id: nil, partition: "default", poll_interval_seconds: 300, discovery_interval_seconds: 3600, sweep_interval_seconds: 3600, page_size: 100, network_blacklist: [], queries: [ %{ "label" => "all_devices", "query" => "in:devices", "sweep_modes" => [] } ], custom_fields: [], settings: %{}, last_sync_at: nil, last_sync_result: nil, last_device_count: 0, last_error_message: nil, sync_status: :idle, consecutive_failures: 0, total_syncs: 0, inserted_at: ~U[2026-01-30 18:18:27.092811Z], updated_at: ~U[2026-01-30 18:18:27.092811Z], credentials: #Ash.NotLoaded<:calculation, field: :credentials>, poll_interval_display: #Ash.NotLoaded<:calculation, field: :poll_interval_display>, status_label: #Ash.NotLoaded<:calculation, field: :status_label>, status_color: #Ash.NotLoaded<:calculation, field: :status_color>, is_healthy: #Ash.NotLoaded<:calculation, field: :is_healthy>, __meta__: #Ecto.Schema.Metadata<:loaded, "platform", "integration_sources"> }, valid?: true, load: [:credentials_encrypted] >, name: "form", data: %ServiceRadar.Integrations.IntegrationSource{ id: "946fe677-b238-4997-82f5-21d279c1d20f", name: "armis", source_type: :armis, endpoint: "https://serviceradar-faker:8080", enabled: true, agent_id: "k8s-agent", gateway_id: nil, partition: "default", poll_interval_seconds: 300, discovery_interval_seconds: 3600, sweep_interval_seconds: 3600, page_size: 100, network_blacklist: [], queries: [ %{ "label" => "all_devices", "query" => "in:devices", "sweep_modes" => [] } ], custom_fields: [], settings: %{}, last_sync_at: nil, last_sync_result: nil, last_device_count: 0, last_error_message: nil, sync_status: :idle, consecutive_failures: 0, total_syncs: 0, inserted_at: ~U[2026-01-30 18:18:27.092811Z], updated_at: ~U[2026-01-30 18:18:27.092811Z], credentials: #Ash.NotLoaded<:calculation, field: :credentials>, poll_interval_display: #Ash.NotLoaded<:calculation, field: :poll_interval_display>, status_label: #Ash.NotLoaded<:calculation, field: :status_label>, status_color: #Ash.NotLoaded<:calculation, field: :status_color>, is_healthy: #Ash.NotLoaded<:calculation, field: :is_healthy>, __meta__: #Ecto.Schema.Metadata<:loaded, "platform", "integration_sources"> }, form_keys: [], forms: %{}, domain: ServiceRadar.Integrations, method: "put", submit_errors: nil, id: "form", transform_errors: nil, post_process_errors: nil, original_data: %ServiceRadar.Integrations.IntegrationSource{ id: "946fe677-b238-4997-82f5-21d279c1d20f", name: "armis", source_type: :armis, endpoint: "https://serviceradar-faker:8080", enabled: true, agent_id: "k8s-agent", gateway_id: nil, partition: "default", poll_interval_seconds: 300, discovery_interval_seconds: 3600, sweep_interval_seconds: 3600, page_size: 100, network_blacklist: [], queries: [ %{ "label" => "all_devices", "query" => "in:devices", "sweep_modes" => [] } ], custom_fields: [], settings: %{}, last_sync_at: nil, last_sync_result: nil, last_device_count: 0, last_error_message: nil, sync_status: :idle, consecutive_failures: 0, total_syncs: 0, inserted_at: ~U[2026-01-30 18:18:27.092811Z], updated_at: ~U[2026-01-30 18:18:27.092811Z], credentials: #Ash.NotLoaded<:calculation, field: :credentials>, poll_interval_display: #Ash.NotLoaded<:calculation, field: :poll_interval_display>, status_label: #Ash.NotLoaded<:calculation, field: :status_label>, status_color: #Ash.NotLoaded<:calculation, field: :status_color>, is_healthy: #Ash.NotLoaded<:calculation, field: :is_healthy>, __meta__: #Ecto.Schema.Metadata<:loaded, "platform", "integration_sources"> }, transform_params: #Function<5.21458352/3 in ServiceRadarWebNGWeb.Settings.IntegrationsLive.Index.build_edit_form/2>, prepare_params: nil, prepare_source: nil, raw_params: %{}, warn_on_unhandled_errors?: true, any_removed?: false, added?: false, changed?: false, touched_forms: MapSet.new([]), valid?: true, errors: nil, submitted_once?: false, just_submitted?: false, ... >, impl: Phoenix.HTML.FormData.AshPhoenix.Form, id: "form", name: "form", data: %ServiceRadar.Integrations.IntegrationSource{ id: "946fe677-b238-4997-82f5-21d279c1d20f", name: "armis", source_type: :armis, endpoint: "https://serviceradar-faker:8080", enabled: true, agent_id: "k8s-agent", gateway_id: nil, partition: "default", poll_interval_seconds: 300, discovery_interval_seconds: 3600, sweep_interval_seconds: 3600, page_size: 100, network_blacklist: [], queries: [ %{ "label" => "all_devices", "query" => "in:devices", "sweep_modes" => [] } ], custom_fields: [], settings: %{}, last_sync_at: nil, last_sync_result: nil, last_device_count: 0, last_error_message: nil, sync_status: :idle, consecutive_failures: 0, total_syncs: 0, inserted_at: ~U[2026-01-30 18:18:27.092811Z], updated_at: ~U[2026-01-30 18:18:27.092811Z], credentials: #Ash.NotLoaded<:calculation, field: :credentials>, poll_interval_display: #Ash.NotLoaded<:calculation, field: :poll_interval_display>, status_label: #Ash.NotLoaded<:calculation, field: :status_label>, status_color: #Ash.NotLoaded<:calculation, field: :status_color>, is_healthy: #Ash.NotLoaded<:calculation, field: :is_healthy>, __meta__: #Ecto.Schema.Metadata<:loaded, "platform", "integ (truncated) 19:01:48.523 [info] Plug.SSL is redirecting GET / to https://demo.serviceradar.cloud with status 301 19:01:48.569 [info] Plug.SSL is redirecting GET / to https://demo.serviceradar.cloud with status 301 19:01:50.710 request_id=a26f85039aae8c7b8150ea83a3c6e096 [info] GET /settings/networks/integrations/946fe677-b238-4997-82f5-21d279c1d20f/edit 19:01:50.745 request_id=a26f85039aae8c7b8150ea83a3c6e096 [info] Sent 500 in 35ms 19:01:50.747 request_id=a26f85039aae8c7b8150ea83a3c6e096 [error] ** (KeyError) key :selected_source not found in: %{ form: %Phoenix.HTML.Form{ source: #AshPhoenix.Form< resource: ServiceRadar.Integrations.IntegrationSource, action: :update, type: :update, params: %{}, source: #Ash.Changeset< domain: ServiceRadar.Integrations, action_type: :update, action: :update, attributes: %{}, relationships: %{}, arguments: %{}, errors: [], data: %ServiceRadar.Integrations.IntegrationSource{ id: "946fe677-b238-4997-82f5-21d279c1d20f", name: "armis", source_type: :armis, endpoint: "https://serviceradar-faker:8080", enabled: true, agent_id: "k8s-agent", gateway_id: nil, partition: "default", poll_interval_seconds: 300, discovery_interval_seconds: 3600, sweep_interval_seconds: 3600, page_size: 100, network_blacklist: [], queries: [ %{ "label" => "all_devices", "query" => "in:devices", "sweep_modes" => [] } ], custom_fields: [], settings: %{}, last_sync_at: nil, last_sync_result: nil, last_device_count: 0, last_error_message: nil, sync_status: :idle, consecutive_failures: 0, total_syncs: 0, inserted_at: ~U[2026-01-30 18:18:27.092811Z], updated_at: ~U[2026-01-30 18:18:27.092811Z], credentials: #Ash.NotLoaded<:calculation, field: :credentials>, poll_interval_display: #Ash.NotLoaded<:calculation, field: :poll_interval_display>, status_label: #Ash.NotLoaded<:calculation, field: :status_label>, status_color: #Ash.NotLoaded<:calculation, field: :status_color>, is_healthy: #Ash.NotLoaded<:calculation, field: :is_healthy>, __meta__: #Ecto.Schema.Metadata<:loaded, "platform", "integration_sources"> }, valid?: true, load: [:credentials_encrypted] >, name: "form", data: %ServiceRadar.Integrations.IntegrationSource{ id: "946fe677-b238-4997-82f5-21d279c1d20f", name: "armis", source_type: :armis, endpoint: "https://serviceradar-faker:8080", enabled: true, agent_id: "k8s-agent", gateway_id: nil, partition: "default", poll_interval_seconds: 300, discovery_interval_seconds: 3600, sweep_interval_seconds: 3600, page_size: 100, network_blacklist: [], queries: [ %{ "label" => "all_devices", "query" => "in:devices", "sweep_modes" => [] } ], custom_fields: [], settings: %{}, last_sync_at: nil, last_sync_result: nil, last_device_count: 0, last_error_message: nil, sync_status: :idle, consecutive_failures: 0, total_syncs: 0, inserted_at: ~U[2026-01-30 18:18:27.092811Z], updated_at: ~U[2026-01-30 18:18:27.092811Z], credentials: #Ash.NotLoaded<:calculation, field: :credentials>, poll_interval_display: #Ash.NotLoaded<:calculation, field: :poll_interval_display>, status_label: #Ash.NotLoaded<:calculation, field: :status_label>, status_color: #Ash.NotLoaded<:calculation, field: :status_color>, is_healthy: #Ash.NotLoaded<:calculation, field: :is_healthy>, __meta__: #Ecto.Schema.Metadata<:loaded, "platform", "integration_sources"> }, form_keys: [], forms: %{}, domain: ServiceRadar.Integrations, method: "put", submit_errors: nil, id: "form", transform_errors: nil, post_process_errors: nil, original_data: %ServiceRadar.Integrations.IntegrationSource{ id: "946fe677-b238-4997-82f5-21d279c1d20f", name: "armis", source_type: :armis, endpoint: "https://serviceradar-faker:8080", enabled: true, agent_id: "k8s-agent", gateway_id: nil, partition: "default", poll_interval_seconds: 300, discovery_interval_seconds: 3600, sweep_interval_seconds: 3600, page_size: 100, network_blacklist: [], queries: [ %{ "label" => "all_devices", "query" => "in:devices", "sweep_modes" => [] } ], custom_fields: [], settings: %{}, last_sync_at: nil, last_sync_result: nil, last_device_count: 0, last_error_message: nil, sync_status: :idle, consecutive_failures: 0, total_syncs: 0, inserted_at: ~U[2026-01-30 18:18:27.092811Z], updated_at: ~U[2026-01-30 18:18:27.092811Z], credentials: #Ash.NotLoaded<:calculation, field: :credentials>, poll_interval_display: #Ash.NotLoaded<:calculation, field: :poll_interval_display>, status_label: #Ash.NotLoaded<:calculation, field: :status_label>, status_color: #Ash.NotLoaded<:calculation, field: :status_color>, is_healthy: #Ash.NotLoaded<:calculation, field: :is_healthy>, __meta__: #Ecto.Schema.Metadata<:loaded, "platform", "integration_sources"> }, transform_params: #Function<5.21458352/3 in ServiceRadarWebNGWeb.Settings.IntegrationsLive.Index.build_edit_form/2>, prepare_params: nil, prepare_source: nil, raw_params: %{}, warn_on_unhandled_errors?: true, any_removed?: false, added?: false, changed?: false, touched_forms: MapSet.new([]), valid?: true, errors: nil, submitted_once?: false, just_submitted?: false, ... >, impl: Phoenix.HTML.FormData.AshPhoenix.Form, id: "form", name: "form", data: %ServiceRadar.Integrations.IntegrationSource{ id: "946fe677-b238-4997-82f5-21d279c1d20f", name: "armis", source_type: :armis, endpoint: "https://serviceradar-faker:8080", enabled: true, agent_id: "k8s-agent", gateway_id: nil, partition: "default", poll_interval_seconds: 300, discovery_interval_seconds: 3600, sweep_interval_seconds: 3600, page_size: 100, network_blacklist: [], queries: [ %{ "label" => "all_devices", "query" => "in:devices", "sweep_modes" => [] } ], custom_fields: [], settings: %{}, last_sync_at: nil, last_sync_result: nil, last_device_count: 0, last_error_message: nil, sync_status: :idle, consecutive_failures: 0, total_syncs: 0, inserted_at: ~U[2026-01-30 18:18:27.092811Z], updated_at: ~U[2026-01-30 18:18:27.092811Z], credentials: #Ash.NotLoaded<:calculation, field: :credentials>, poll_interval_display: #Ash.NotLoaded<:calculation, field: :poll_interval_display>, status_label: #Ash.NotLoaded<:calculation, field: :status_label>, status_color: #Ash.NotLoaded<:calculation, field: :status_color>, is_healthy: #Ash.NotLoaded<:calculation, field: :is_healthy>, __meta__: #Ecto.Schema.Metadata<:loaded, "platform", "integration_sources"> }, (truncated) ``` **To Reproduce** Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - OS: [e.g. iOS] - Browser [e.g. chrome, safari] - Version [e.g. 22] **Smartphone (please complete the following information):** - Device: [e.g. iPhone6] - OS: [e.g. iOS8.1] - Browser [e.g. stock browser, safari] - Version [e.g. 22] **Additional context** Add any other context about the problem here.
mfreeman451 added this to the 1.1.0 milestone 2026-03-28 04:29:56 +00:00
Author
Owner

Imported GitHub comment.

Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/issues/2622#issuecomment-3827411954
Original created: 2026-01-31T04:03:18Z


closing as completed

Imported GitHub comment. Original author: @mfreeman451 Original URL: https://github.com/carverauto/serviceradar/issues/2622#issuecomment-3827411954 Original created: 2026-01-31T04:03:18Z --- closing as completed
Sign in to join this conversation.
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#924
No description provided.