Skip to content

Remove interaction with URM service from Dashboard Service #19801

Open
@GeorgeMac

Description

@GeorgeMac

In order to further support the separation of concerns required to deliver #19783, we need to remove the need for URM interaction from DashboardService. This also support ongoing efforts to remove dependencies on URMs outside the tenant service.

The URM service is currently required to support listing dashboards by owner ID. We can solve this by adding an owner ID field to the dashboard type and define a migration to backfill the relationship. Severing the need to depend on URMs to facilitate the lookup.

Implementation

  • Add OwnerID field to Dashboard domain model:

    influxdb/dashboard.go

    Lines 74 to 82 in ce00f0d

    // Dashboard represents all visual and query data for a dashboard.
    type Dashboard struct {
    ID ID `json:"id,omitempty"`
    OrganizationID ID `json:"orgID,omitempty"`
    Name string `json:"name"`
    Description string `json:"description"`
    Cells []*Cell `json:"cells"`
    Meta DashboardMeta `json:"meta"`
    }
  • Create kv migration to backfill owner ID based on existing URMs. Prioritize owner type URMs over member. The best we can offer is to take the first owner found. Fallback to member if necessary. If one cannot be found, then it will not be retrievable when listing dashboard by a particular user.
  • Remove interaction with URM service.

Success Criteria

  • Dashboard continue to list as expected in the UI.
  • When listing by owner, the dashboards list filters as expected.
  • Dashboard service has no knowledge of URMs
  • We unblock chore(kv): delete deprecated kv service code #19783 as we re-instate the ability to list dashboards by owner without the need for interacting with a URM service to do so.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions