feat(catalog): expose entityRef on Location type and add PUT /locations/:id

- Add `entityRef` field to all Location API responses, carrying the stable
  entity ref (e.g. `location:default/generated-<sha1hex>`) that was
  already persisted to the `location_entity_ref` column.
- Make `entityRef` filterable via `POST /locations/by-query`.
- Add `PUT /locations/:id` endpoint that updates the `type`/`target` of
  an existing location and issues the corresponding delta mutation so the
  catalog entity is updated in-place without changing its entity ref.
- Wire `updateLocation` through `CatalogApi`, `CatalogService`,
  `CatalogClient`, `LocationService`, `LocationStore`, and their
  implementations and mocks.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
This commit is contained in:
Fredrik Adelöw
2026-04-07 16:36:06 +02:00
parent 587981973c
commit c384fff709
34 changed files with 615 additions and 48 deletions
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend': minor
---
Location responses now include an `entityRef` field with the stable entity reference for each location. The `entityRef` field is also filterable via `POST /locations/by-query`. Added `PUT /locations/:id` endpoint for updating the type and target of an existing location.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/catalog-client': minor
---
Added `entityRef` field to the `Location` type, exposing the stable entity reference for each registered location. Added `updateLocation` method to `CatalogApi` for updating the type and target of an existing location.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-node': minor
---
Added `updateLocation` method to `CatalogService` for updating the type and target of an existing location.