influxdata / influxdata/influxdb

Remove interaction with URM service from Dashboard Service

Open
#19,801 0 comments 0 reactions 1 assignee Claimed by @GeorgeMac View on GitHub
kind/refactor team/compute
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

In order to further support the separation of concerns required to deliver https://github.com/influxdata/influxdb/pull/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:
https://github.com/influxdata/influxdb/blob/ce00f0d22619ee4103c22a4f5defafa527f54056/dashboard.go#L74-L82
- 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 https://github.com/influxdata/influxdb/pull/19783 as we re-instate the ability to list dashboards by owner without the need for interacting with a URM service to do so.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.