diff --git a/.changeset/yellow-shirts-study.md b/.changeset/yellow-shirts-study.md
new file mode 100644
index 0000000000..7e464f1c26
--- /dev/null
+++ b/.changeset/yellow-shirts-study.md
@@ -0,0 +1,9 @@
+---
+'@backstage/catalog-model': minor
+'@backstage/plugin-catalog-backend': minor
+---
+
+**BREAKING**: Removed the `target` property from `EntityRelation`. This field has been replaced by `targetRef`.
+This means that `target: { name: 'team-a', kind: 'group', namespace: 'default' }` is now replaced with `targetRef: 'group:default/team-a'` in entity relations.
+
+The entities API endpoint still return the old `target` field for to ease transitions, however the future removal of this field will be considered non breaking.
diff --git a/packages/app/src/components/catalog/EntityPage.tsx b/packages/app/src/components/catalog/EntityPage.tsx
index ba0eacf97e..5f0f22183f 100644
--- a/packages/app/src/components/catalog/EntityPage.tsx
+++ b/packages/app/src/components/catalog/EntityPage.tsx
@@ -108,27 +108,8 @@ import { EntityTodoContent } from '@backstage/plugin-todo';
import { Button, Grid } from '@material-ui/core';
import BadgeIcon from '@material-ui/icons/CallToAction';
-import {
- EntityGithubInsightsContent,
- EntityGithubInsightsLanguagesCard,
- EntityGithubInsightsReadmeCard,
- EntityGithubInsightsReleasesCard,
- isGithubInsightsAvailable,
-} from '@roadiehq/backstage-plugin-github-insights';
-import {
- EntityGithubPullRequestsContent,
- EntityGithubPullRequestsOverviewCard,
- isGithubPullRequestsAvailable,
-} from '@roadiehq/backstage-plugin-github-pull-requests';
-import {
- EntityTravisCIContent,
- EntityTravisCIOverviewCard,
- isTravisciAvailable,
-} from '@roadiehq/backstage-plugin-travis-ci';
-import {
- EntityBuildkiteContent,
- isBuildkiteAvailable,
-} from '@roadiehq/backstage-plugin-buildkite';
+import { EntityGithubInsightsContent } from '@roadiehq/backstage-plugin-github-insights';
+import { EntityGithubPullRequestsContent } from '@roadiehq/backstage-plugin-github-pull-requests';
import {
isNewRelicDashboardAvailable,
EntityNewRelicDashboardContent,
@@ -179,10 +160,6 @@ export const cicdContent = (
-
-
-
-
@@ -191,10 +168,6 @@ export const cicdContent = (
-
-
-
-
@@ -234,12 +207,6 @@ const cicdCard = (
-
-
-
-
-
-
@@ -325,18 +292,6 @@ const overviewContent = (
{cicdCard}
-
- Boolean(isGithubInsightsAvailable(e))}>
-
-
-
-
-
-
-
-
-
-
@@ -345,14 +300,6 @@ const overviewContent = (
-
- Boolean(isGithubPullRequestsAvailable(e))}>
-
-
-
-
-
-
diff --git a/packages/catalog-model/api-report.md b/packages/catalog-model/api-report.md
index 1a36ce43c7..eb0e4ad7f0 100644
--- a/packages/catalog-model/api-report.md
+++ b/packages/catalog-model/api-report.md
@@ -192,7 +192,6 @@ export type EntityPolicy = {
// @public
export type EntityRelation = {
type: string;
- target: CompoundEntityRef;
targetRef: string;
};
diff --git a/packages/catalog-model/src/entity/Entity.ts b/packages/catalog-model/src/entity/Entity.ts
index 14cd01e40b..96f19b2c8a 100644
--- a/packages/catalog-model/src/entity/Entity.ts
+++ b/packages/catalog-model/src/entity/Entity.ts
@@ -15,7 +15,6 @@
*/
import { JsonObject } from '@backstage/types';
-import { CompoundEntityRef } from '../types';
import { EntityStatus } from './EntityStatus';
/**
@@ -185,13 +184,6 @@ export type EntityRelation = {
*/
type: string;
- /**
- * The target entity of this relation.
- *
- * @deprecated use targetRef instead
- */
- target: CompoundEntityRef;
-
/**
* The entity ref of the target of this relation.
*/
diff --git a/plugins/api-docs/src/components/ApisCards/ConsumedApisCard.test.tsx b/plugins/api-docs/src/components/ApisCards/ConsumedApisCard.test.tsx
index f84f66cee8..afb836ecc9 100644
--- a/plugins/api-docs/src/components/ApisCards/ConsumedApisCard.test.tsx
+++ b/plugins/api-docs/src/components/ApisCards/ConsumedApisCard.test.tsx
@@ -94,11 +94,6 @@ describe('', () => {
},
relations: [
{
- target: {
- kind: 'api',
- namespace: 'my-namespace',
- name: 'target-name',
- },
targetRef: 'api:my-namespace/target-name',
type: RELATION_CONSUMES_API,
},
diff --git a/plugins/api-docs/src/components/ApisCards/HasApisCard.test.tsx b/plugins/api-docs/src/components/ApisCards/HasApisCard.test.tsx
index daa909c7f8..85b353f04e 100644
--- a/plugins/api-docs/src/components/ApisCards/HasApisCard.test.tsx
+++ b/plugins/api-docs/src/components/ApisCards/HasApisCard.test.tsx
@@ -94,11 +94,6 @@ describe('', () => {
},
relations: [
{
- target: {
- kind: 'api',
- namespace: 'my-namespace',
- name: 'target-name',
- },
targetRef: 'api:my-namespace/target-name',
type: RELATION_HAS_PART,
},
diff --git a/plugins/api-docs/src/components/ApisCards/ProvidedApisCard.test.tsx b/plugins/api-docs/src/components/ApisCards/ProvidedApisCard.test.tsx
index 852386140c..40ffeff330 100644
--- a/plugins/api-docs/src/components/ApisCards/ProvidedApisCard.test.tsx
+++ b/plugins/api-docs/src/components/ApisCards/ProvidedApisCard.test.tsx
@@ -94,11 +94,6 @@ describe('', () => {
},
relations: [
{
- target: {
- kind: 'api',
- namespace: 'my-namespace',
- name: 'target-name',
- },
targetRef: 'api:my-namespace/target-name',
type: RELATION_PROVIDES_API,
},
diff --git a/plugins/api-docs/src/components/ComponentsCards/ConsumingComponentsCard.test.tsx b/plugins/api-docs/src/components/ComponentsCards/ConsumingComponentsCard.test.tsx
index a62b2119c7..abc91d8793 100644
--- a/plugins/api-docs/src/components/ComponentsCards/ConsumingComponentsCard.test.tsx
+++ b/plugins/api-docs/src/components/ComponentsCards/ConsumingComponentsCard.test.tsx
@@ -97,11 +97,6 @@ describe('', () => {
},
relations: [
{
- target: {
- kind: 'component',
- namespace: 'my-namespace',
- name: 'target-name',
- },
targetRef: 'component:my-namespace/target-name',
type: RELATION_API_CONSUMED_BY,
},
diff --git a/plugins/api-docs/src/components/ComponentsCards/ProvidingComponentsCard.test.tsx b/plugins/api-docs/src/components/ComponentsCards/ProvidingComponentsCard.test.tsx
index 1a0aae12c7..bdd45c3d58 100644
--- a/plugins/api-docs/src/components/ComponentsCards/ProvidingComponentsCard.test.tsx
+++ b/plugins/api-docs/src/components/ComponentsCards/ProvidingComponentsCard.test.tsx
@@ -97,11 +97,6 @@ describe('', () => {
},
relations: [
{
- target: {
- kind: 'component',
- namespace: 'my-namespace',
- name: 'target-name',
- },
targetRef: 'component:my-namespace/target-name',
type: RELATION_API_PROVIDED_BY,
},
diff --git a/plugins/auth-backend/src/lib/catalog/CatalogIdentityClient.test.ts b/plugins/auth-backend/src/lib/catalog/CatalogIdentityClient.test.ts
index b99c8a7615..587b433ca1 100644
--- a/plugins/auth-backend/src/lib/catalog/CatalogIdentityClient.test.ts
+++ b/plugins/auth-backend/src/lib/catalog/CatalogIdentityClient.test.ts
@@ -80,11 +80,6 @@ describe('CatalogIdentityClient', () => {
{
type: RELATION_MEMBER_OF,
targetRef: 'group:default/team-a',
- target: {
- kind: 'group',
- namespace: 'default',
- name: 'team-a',
- },
},
],
},
@@ -102,11 +97,6 @@ describe('CatalogIdentityClient', () => {
{
type: RELATION_MEMBER_OF,
targetRef: 'group:reality/screen-actors-guild',
- target: {
- kind: 'group',
- namespace: 'reality',
- name: 'screen-actors-guild',
- },
},
],
},
diff --git a/plugins/catalog-backend/src/permissions/rules/isEntityOwner.test.ts b/plugins/catalog-backend/src/permissions/rules/isEntityOwner.test.ts
index 8e20655393..11304c768c 100644
--- a/plugins/catalog-backend/src/permissions/rules/isEntityOwner.test.ts
+++ b/plugins/catalog-backend/src/permissions/rules/isEntityOwner.test.ts
@@ -30,11 +30,6 @@ describe('isEntityOwner', () => {
{
type: 'ownedBy',
targetRef: 'user:default/spiderman',
- target: {
- kind: 'user',
- namespace: 'default',
- name: 'spiderman',
- },
},
],
};
@@ -54,11 +49,6 @@ describe('isEntityOwner', () => {
{
type: 'ownedBy',
targetRef: 'user:default/green-goblin',
- target: {
- kind: 'user',
- namespace: 'default',
- name: 'green-goblin',
- },
},
],
};
diff --git a/plugins/catalog-backend/src/service/DefaultEntitiesCatalog.ts b/plugins/catalog-backend/src/service/DefaultEntitiesCatalog.ts
index f8b68bebc5..eaa0ce0189 100644
--- a/plugins/catalog-backend/src/service/DefaultEntitiesCatalog.ts
+++ b/plugins/catalog-backend/src/service/DefaultEntitiesCatalog.ts
@@ -208,9 +208,10 @@ export class DefaultEntitiesCatalog implements EntitiesCatalog {
// sure that all adopters have re-stitched their entities so that the new
// targetRef field is present on them, and that they have stopped consuming
// the now-removed old field
+ // TODO(jhaals): Remove this in April 2022
for (const entity of entities) {
if (entity.relations) {
- for (const relation of entity.relations) {
+ for (const relation of entity.relations as any) {
if (!relation.targetRef && relation.target) {
// This is the case where an old-form entity, not yet stitched with
// the updated code, was in the database
diff --git a/plugins/catalog-backend/src/stitching/Stitcher.test.ts b/plugins/catalog-backend/src/stitching/Stitcher.test.ts
index 582ed3f953..9accebf1fc 100644
--- a/plugins/catalog-backend/src/stitching/Stitcher.test.ts
+++ b/plugins/catalog-backend/src/stitching/Stitcher.test.ts
@@ -94,11 +94,6 @@ describe('Stitcher', () => {
{
type: 'looksAt',
targetRef: 'k:ns/other',
- target: {
- kind: 'k',
- namespace: 'ns',
- name: 'other',
- },
},
],
apiVersion: 'a',
@@ -160,20 +155,10 @@ describe('Stitcher', () => {
{
type: 'looksAt',
targetRef: 'k:ns/other',
- target: {
- kind: 'k',
- namespace: 'ns',
- name: 'other',
- },
},
{
type: 'looksAt',
targetRef: 'k:ns/third',
- target: {
- kind: 'k',
- namespace: 'ns',
- name: 'third',
- },
},
]),
apiVersion: 'a',
diff --git a/plugins/catalog-backend/src/stitching/Stitcher.ts b/plugins/catalog-backend/src/stitching/Stitcher.ts
index 23fdffd272..c31052c01e 100644
--- a/plugins/catalog-backend/src/stitching/Stitcher.ts
+++ b/plugins/catalog-backend/src/stitching/Stitcher.ts
@@ -17,7 +17,6 @@
import { ENTITY_STATUS_CATALOG_PROCESSING_TYPE } from '@backstage/catalog-client';
import {
AlphaEntity,
- parseEntityRef,
EntityRelation,
EntityStatusItem,
} from '@backstage/catalog-model';
@@ -186,8 +185,6 @@ export class Stitcher {
.filter(row => row.relationType /* exclude null row, if relevant */)
.map(row => ({
type: row.relationType!,
- // TODO(freben): This field is deprecated and should be removed in a future release
- target: parseEntityRef(row.relationTarget!),
targetRef: row.relationTarget!,
}));
if (statusItems.length) {
diff --git a/plugins/catalog-backend/src/stitching/buildEntitySearch.test.ts b/plugins/catalog-backend/src/stitching/buildEntitySearch.test.ts
index 27b4421a83..e18f1c0c48 100644
--- a/plugins/catalog-backend/src/stitching/buildEntitySearch.test.ts
+++ b/plugins/catalog-backend/src/stitching/buildEntitySearch.test.ts
@@ -143,12 +143,10 @@ describe('buildEntitySearch', () => {
{
type: 't1',
targetRef: 'k:ns/a',
- target: { kind: 'k', namespace: 'ns', name: 'a' },
},
{
type: 't2',
targetRef: 'k:ns/b',
- target: { kind: 'k', namespace: 'ns', name: 'b' },
},
],
apiVersion: 'a',
@@ -192,12 +190,10 @@ describe('buildEntitySearch', () => {
{
type: 'dup',
targetRef: 'k:ns/a',
- target: { kind: 'k', namespace: 'ns', name: 'a' },
},
{
type: 'DUP',
targetRef: 'k:ns/b',
- target: { kind: 'k', namespace: 'ns', name: 'b' },
},
],
apiVersion: 'a',
diff --git a/plugins/catalog-graph/src/components/EntityRelationsGraph/EntityRelationsGraph.test.tsx b/plugins/catalog-graph/src/components/EntityRelationsGraph/EntityRelationsGraph.test.tsx
index e8c9239739..2bf303bb92 100644
--- a/plugins/catalog-graph/src/components/EntityRelationsGraph/EntityRelationsGraph.test.tsx
+++ b/plugins/catalog-graph/src/components/EntityRelationsGraph/EntityRelationsGraph.test.tsx
@@ -49,20 +49,10 @@ describe('', () => {
},
relations: [
{
- target: {
- kind: 'k',
- name: 'a1',
- namespace: 'd',
- },
targetRef: 'k:d/a1',
type: RELATION_OWNER_OF,
},
{
- target: {
- kind: 'b',
- name: 'c1',
- namespace: 'd',
- },
targetRef: 'b:d/c1',
type: RELATION_HAS_PART,
},
@@ -77,20 +67,10 @@ describe('', () => {
},
relations: [
{
- target: {
- kind: 'b',
- name: 'c',
- namespace: 'd',
- },
targetRef: 'b:d/c',
type: RELATION_OWNED_BY,
},
{
- target: {
- kind: 'b',
- name: 'c1',
- namespace: 'd',
- },
targetRef: 'b:d/c1',
type: RELATION_OWNED_BY,
},
@@ -105,29 +85,14 @@ describe('', () => {
},
relations: [
{
- target: {
- kind: 'b',
- name: 'c',
- namespace: 'd',
- },
targetRef: 'b:d/c',
type: RELATION_PART_OF,
},
{
- target: {
- kind: 'k',
- name: 'a1',
- namespace: 'd',
- },
targetRef: 'k:d/a1',
type: RELATION_OWNER_OF,
},
{
- target: {
- kind: 'b',
- name: 'c2',
- namespace: 'd',
- },
targetRef: 'b:d/c2',
type: RELATION_HAS_PART,
},
@@ -142,11 +107,6 @@ describe('', () => {
},
relations: [
{
- target: {
- kind: 'b',
- name: 'c1',
- namespace: 'd',
- },
targetRef: 'b:d/c1',
type: RELATION_PART_OF,
},
diff --git a/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityRelationNodesAndEdges.test.ts b/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityRelationNodesAndEdges.test.ts
index 4715cb106a..c2ee918e5b 100644
--- a/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityRelationNodesAndEdges.test.ts
+++ b/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityRelationNodesAndEdges.test.ts
@@ -44,20 +44,10 @@ describe('useEntityRelationNodesAndEdges', () => {
},
relations: [
{
- target: {
- kind: 'k',
- name: 'a1',
- namespace: 'd',
- },
targetRef: 'k:d/a1',
type: RELATION_OWNER_OF,
},
{
- target: {
- kind: 'b',
- name: 'c1',
- namespace: 'd',
- },
targetRef: 'b:d/c1',
type: RELATION_HAS_PART,
},
@@ -72,20 +62,10 @@ describe('useEntityRelationNodesAndEdges', () => {
},
relations: [
{
- target: {
- kind: 'b',
- name: 'c',
- namespace: 'd',
- },
targetRef: 'b:d/c',
type: RELATION_OWNED_BY,
},
{
- target: {
- kind: 'b',
- name: 'c1',
- namespace: 'd',
- },
targetRef: 'b:d/c1',
type: RELATION_OWNED_BY,
},
@@ -100,29 +80,14 @@ describe('useEntityRelationNodesAndEdges', () => {
},
relations: [
{
- target: {
- kind: 'b',
- name: 'c',
- namespace: 'd',
- },
targetRef: 'b:d/c',
type: RELATION_PART_OF,
},
{
- target: {
- kind: 'k',
- name: 'a1',
- namespace: 'd',
- },
targetRef: 'k:d/a1',
type: RELATION_OWNER_OF,
},
{
- target: {
- kind: 'b',
- name: 'c2',
- namespace: 'd',
- },
targetRef: 'b:d/c2',
type: RELATION_HAS_PART,
},
@@ -137,11 +102,6 @@ describe('useEntityRelationNodesAndEdges', () => {
},
relations: [
{
- target: {
- kind: 'b',
- name: 'c1',
- namespace: 'd',
- },
targetRef: 'b:d/c1',
type: RELATION_PART_OF,
},
diff --git a/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.test.tsx b/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.test.tsx
index de21bfeee3..f648b51456 100644
--- a/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.test.tsx
+++ b/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.test.tsx
@@ -32,20 +32,10 @@ const sampleEntities: Entity[] = [
{
type: 'ownedBy',
targetRef: 'group:default/some-owner',
- target: {
- name: 'some-owner',
- namespace: 'default',
- kind: 'Group',
- },
},
{
type: 'ownedBy',
targetRef: 'group:default/some-owner-2',
- target: {
- name: 'some-owner-2',
- namespace: 'default',
- kind: 'Group',
- },
},
],
},
@@ -59,11 +49,6 @@ const sampleEntities: Entity[] = [
{
type: 'ownedBy',
targetRef: 'group:default/another-owner',
- target: {
- name: 'another-owner',
- namespace: 'default',
- kind: 'Group',
- },
},
],
},
@@ -77,11 +62,6 @@ const sampleEntities: Entity[] = [
{
type: 'ownedBy',
targetRef: 'group:default/some-owner',
- target: {
- name: 'some-owner',
- namespace: 'default',
- kind: 'Group',
- },
},
],
},
diff --git a/plugins/catalog-react/src/components/EntityTable/presets.test.tsx b/plugins/catalog-react/src/components/EntityTable/presets.test.tsx
index f2fcd016f0..cca9c7d494 100644
--- a/plugins/catalog-react/src/components/EntityTable/presets.test.tsx
+++ b/plugins/catalog-react/src/components/EntityTable/presets.test.tsx
@@ -45,20 +45,10 @@ describe('systemEntityColumns', () => {
{
type: RELATION_PART_OF,
targetRef: 'domain:my-namespace/my-domain',
- target: {
- kind: 'domain',
- name: 'my-domain',
- namespace: 'my-namespace',
- },
},
{
type: RELATION_OWNED_BY,
targetRef: 'group:default/test',
- target: {
- kind: 'group',
- name: 'test',
- namespace: 'default',
- },
},
],
},
@@ -107,20 +97,10 @@ describe('componentEntityColumns', () => {
{
type: RELATION_PART_OF,
targetRef: 'system:my-namespace/my-system',
- target: {
- kind: 'system',
- name: 'my-system',
- namespace: 'my-namespace',
- },
},
{
type: RELATION_OWNED_BY,
targetRef: 'group:default/test',
- target: {
- kind: 'group',
- name: 'test',
- namespace: 'default',
- },
},
],
},
diff --git a/plugins/catalog-react/src/components/UserListPicker/UserListPicker.test.tsx b/plugins/catalog-react/src/components/UserListPicker/UserListPicker.test.tsx
index 310deabbb7..db3ce7cf5d 100644
--- a/plugins/catalog-react/src/components/UserListPicker/UserListPicker.test.tsx
+++ b/plugins/catalog-react/src/components/UserListPicker/UserListPicker.test.tsx
@@ -104,7 +104,6 @@ const backendEntities: Entity[] = [
{
type: RELATION_OWNED_BY,
targetRef: 'user:default/testuser',
- target: { kind: 'User', namespace: 'default', name: 'testUser' },
},
],
},
@@ -138,7 +137,6 @@ const backendEntities: Entity[] = [
{
type: RELATION_OWNED_BY,
targetRef: 'user:default/testuser',
- target: { kind: 'User', namespace: 'default', name: 'testUser' },
},
],
},
diff --git a/plugins/catalog-react/src/hooks/useEntityListProvider.test.tsx b/plugins/catalog-react/src/hooks/useEntityListProvider.test.tsx
index e3ab09f081..3353312955 100644
--- a/plugins/catalog-react/src/hooks/useEntityListProvider.test.tsx
+++ b/plugins/catalog-react/src/hooks/useEntityListProvider.test.tsx
@@ -46,11 +46,6 @@ const entities: Entity[] = [
{
type: 'ownedBy',
targetRef: 'user:default/guest',
- target: {
- name: 'guest',
- namespace: 'default',
- kind: 'User',
- },
},
],
},
diff --git a/plugins/catalog-react/src/hooks/useEntityOwnership.test.tsx b/plugins/catalog-react/src/hooks/useEntityOwnership.test.tsx
index d4d80203d3..616e4949c1 100644
--- a/plugins/catalog-react/src/hooks/useEntityOwnership.test.tsx
+++ b/plugins/catalog-react/src/hooks/useEntityOwnership.test.tsx
@@ -62,12 +62,10 @@ describe('useEntityOwnership', () => {
{
type: RELATION_OWNED_BY,
targetRef: 'user:default/user1',
- target: { kind: 'User', namespace: 'default', name: 'user1' },
},
{
type: RELATION_OWNED_BY,
targetRef: 'group:default/group1',
- target: { kind: 'Group', namespace: 'default', name: 'group1' },
},
],
};
diff --git a/plugins/catalog-react/src/utils/getEntityRelations.test.ts b/plugins/catalog-react/src/utils/getEntityRelations.test.ts
index ea0ba59399..f602e8dcc9 100644
--- a/plugins/catalog-react/src/utils/getEntityRelations.test.ts
+++ b/plugins/catalog-react/src/utils/getEntityRelations.test.ts
@@ -32,7 +32,6 @@ describe('getEntityRelations', () => {
{
type: RELATION_MEMBER_OF,
targetRef: 'group:default/member',
- target: { kind: 'group', namespace: 'default', name: 'member' },
},
{
type: RELATION_CHILD_OF,
@@ -53,7 +52,6 @@ describe('getEntityRelations', () => {
{
type: RELATION_MEMBER_OF,
targetRef: 'group:default/member',
- target: { kind: 'group', namespace: 'default', name: 'member' },
},
{
type: RELATION_MEMBER_OF,
diff --git a/plugins/catalog-react/src/utils/isOwnerOf.test.ts b/plugins/catalog-react/src/utils/isOwnerOf.test.ts
index d3053646d8..224550d479 100644
--- a/plugins/catalog-react/src/utils/isOwnerOf.test.ts
+++ b/plugins/catalog-react/src/utils/isOwnerOf.test.ts
@@ -32,7 +32,6 @@ describe('isOwnerOf', () => {
{
type: RELATION_OWNED_BY,
targetRef: 'user:default/user',
- target: { kind: 'user', namespace: 'default', name: 'user' },
},
],
} as Entity;
@@ -48,7 +47,6 @@ describe('isOwnerOf', () => {
{
type: RELATION_MEMBER_OF,
targetRef: 'group:default/group',
- target: { kind: 'group', namespace: 'default', name: 'group' },
},
],
} as Entity;
@@ -57,7 +55,6 @@ describe('isOwnerOf', () => {
{
type: RELATION_OWNED_BY,
targetRef: 'group:default/group',
- target: { kind: 'group', namespace: 'default', name: 'group' },
},
],
} as Entity;
diff --git a/plugins/catalog/src/components/AboutCard/AboutContent.test.tsx b/plugins/catalog/src/components/AboutCard/AboutContent.test.tsx
index cf9673eeeb..87ee8cc6ec 100644
--- a/plugins/catalog/src/components/AboutCard/AboutContent.test.tsx
+++ b/plugins/catalog/src/components/AboutCard/AboutContent.test.tsx
@@ -48,29 +48,14 @@ describe('', () => {
{
type: RELATION_OWNED_BY,
targetRef: 'user:default/o',
- target: {
- kind: 'user',
- name: 'o',
- namespace: 'default',
- },
},
{
type: RELATION_PART_OF,
targetRef: 'system:default/s',
- target: {
- kind: 'system',
- name: 's',
- namespace: 'default',
- },
},
{
type: RELATION_PART_OF,
targetRef: 'domain:default/d',
- target: {
- kind: 'domain',
- name: 'd',
- namespace: 'default',
- },
},
],
};
@@ -156,20 +141,10 @@ describe('', () => {
{
type: RELATION_OWNED_BY,
targetRef: 'user:default/guest',
- target: {
- kind: 'user',
- name: 'guest',
- namespace: 'default',
- },
},
{
type: RELATION_PART_OF,
targetRef: 'system:default/system',
- target: {
- kind: 'system',
- name: 'system',
- namespace: 'default',
- },
},
],
};
@@ -263,29 +238,14 @@ describe('', () => {
{
type: RELATION_OWNED_BY,
targetRef: 'user:default/guest',
- target: {
- kind: 'user',
- name: 'guest',
- namespace: 'default',
- },
},
{
type: RELATION_PART_OF,
targetRef: 'system:default/system',
- target: {
- kind: 'system',
- name: 'system',
- namespace: 'default',
- },
},
{
type: RELATION_PART_OF,
targetRef: 'component:default/parent-software',
- target: {
- kind: 'component',
- name: 'parent-software',
- namespace: 'default',
- },
},
],
};
@@ -378,11 +338,6 @@ describe('', () => {
{
type: RELATION_OWNED_BY,
targetRef: 'user:default/guest',
- target: {
- kind: 'user',
- name: 'guest',
- namespace: 'default',
- },
},
],
};
@@ -538,20 +493,10 @@ describe('', () => {
{
type: RELATION_OWNED_BY,
targetRef: 'user:default/guest',
- target: {
- kind: 'user',
- name: 'guest',
- namespace: 'default',
- },
},
{
type: RELATION_PART_OF,
targetRef: 'system:default/system',
- target: {
- kind: 'system',
- name: 'system',
- namespace: 'default',
- },
},
],
};
@@ -637,20 +582,10 @@ describe('', () => {
{
type: RELATION_OWNED_BY,
targetRef: 'user:default/guest',
- target: {
- kind: 'user',
- name: 'guest',
- namespace: 'default',
- },
},
{
type: RELATION_PART_OF,
targetRef: 'domain:default/domain',
- target: {
- kind: 'domain',
- name: 'domain',
- namespace: 'default',
- },
},
],
};
diff --git a/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.test.tsx b/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.test.tsx
index 07bd81b287..c3135e5697 100644
--- a/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.test.tsx
+++ b/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.test.tsx
@@ -75,7 +75,6 @@ describe('DefaultCatalogPage', () => {
{
type: RELATION_OWNED_BY,
targetRef: 'group:default/tools',
- target: { kind: 'group', name: 'tools', namespace: 'default' },
},
],
},
diff --git a/plugins/catalog/src/components/DependencyOfComponentsCard/DependencyOfComponentsCard.test.tsx b/plugins/catalog/src/components/DependencyOfComponentsCard/DependencyOfComponentsCard.test.tsx
index 05d836870f..b3f8262076 100644
--- a/plugins/catalog/src/components/DependencyOfComponentsCard/DependencyOfComponentsCard.test.tsx
+++ b/plugins/catalog/src/components/DependencyOfComponentsCard/DependencyOfComponentsCard.test.tsx
@@ -80,11 +80,6 @@ describe('', () => {
},
relations: [
{
- target: {
- kind: 'component',
- namespace: 'my-namespace',
- name: 'target-name',
- },
targetRef: 'component:my-namespace/target-name',
type: RELATION_DEPENDENCY_OF,
},
diff --git a/plugins/catalog/src/components/DependsOnComponentsCard/DependsOnComponentsCard.test.tsx b/plugins/catalog/src/components/DependsOnComponentsCard/DependsOnComponentsCard.test.tsx
index b7ef594522..57106015b2 100644
--- a/plugins/catalog/src/components/DependsOnComponentsCard/DependsOnComponentsCard.test.tsx
+++ b/plugins/catalog/src/components/DependsOnComponentsCard/DependsOnComponentsCard.test.tsx
@@ -80,11 +80,6 @@ describe('', () => {
},
relations: [
{
- target: {
- kind: 'component',
- namespace: 'my-namespace',
- name: 'target-name',
- },
targetRef: 'component:my-namespace/target-name',
type: RELATION_DEPENDS_ON,
},
diff --git a/plugins/catalog/src/components/DependsOnResourcesCard/DependsOnResourcesCard.test.tsx b/plugins/catalog/src/components/DependsOnResourcesCard/DependsOnResourcesCard.test.tsx
index b8d2801e48..bd52bfeeb8 100644
--- a/plugins/catalog/src/components/DependsOnResourcesCard/DependsOnResourcesCard.test.tsx
+++ b/plugins/catalog/src/components/DependsOnResourcesCard/DependsOnResourcesCard.test.tsx
@@ -80,11 +80,6 @@ describe('', () => {
},
relations: [
{
- target: {
- kind: 'resource',
- namespace: 'my-namespace',
- name: 'target-name',
- },
targetRef: 'resource:my-namespace/target-name',
type: RELATION_DEPENDS_ON,
},
diff --git a/plugins/catalog/src/components/HasComponentsCard/HasComponentsCard.test.tsx b/plugins/catalog/src/components/HasComponentsCard/HasComponentsCard.test.tsx
index fbb474825f..77fdb74f2f 100644
--- a/plugins/catalog/src/components/HasComponentsCard/HasComponentsCard.test.tsx
+++ b/plugins/catalog/src/components/HasComponentsCard/HasComponentsCard.test.tsx
@@ -80,11 +80,6 @@ describe('', () => {
},
relations: [
{
- target: {
- kind: 'component',
- namespace: 'my-namespace',
- name: 'target-name',
- },
targetRef: 'component:my-namespace/target-name',
type: RELATION_HAS_PART,
},
diff --git a/plugins/catalog/src/components/HasResourcesCard/HasResourcesCard.test.tsx b/plugins/catalog/src/components/HasResourcesCard/HasResourcesCard.test.tsx
index c75273e484..20830d2ccd 100644
--- a/plugins/catalog/src/components/HasResourcesCard/HasResourcesCard.test.tsx
+++ b/plugins/catalog/src/components/HasResourcesCard/HasResourcesCard.test.tsx
@@ -75,11 +75,6 @@ describe('', () => {
},
relations: [
{
- target: {
- kind: 'resource',
- namespace: 'my-namespace',
- name: 'target-name',
- },
targetRef: 'resource:my-namespace/target-name',
type: RELATION_HAS_PART,
},
diff --git a/plugins/catalog/src/components/HasSubcomponentsCard/HasSubcomponentsCard.test.tsx b/plugins/catalog/src/components/HasSubcomponentsCard/HasSubcomponentsCard.test.tsx
index e021fea2f3..7fd0273939 100644
--- a/plugins/catalog/src/components/HasSubcomponentsCard/HasSubcomponentsCard.test.tsx
+++ b/plugins/catalog/src/components/HasSubcomponentsCard/HasSubcomponentsCard.test.tsx
@@ -80,11 +80,6 @@ describe('', () => {
},
relations: [
{
- target: {
- kind: 'component',
- namespace: 'my-namespace',
- name: 'target-name',
- },
targetRef: 'component:my-namespace/target-name',
type: RELATION_HAS_PART,
},
diff --git a/plugins/catalog/src/components/HasSystemsCard/HasSystemsCard.test.tsx b/plugins/catalog/src/components/HasSystemsCard/HasSystemsCard.test.tsx
index 6a2e2a0b7f..cd11e4d3f3 100644
--- a/plugins/catalog/src/components/HasSystemsCard/HasSystemsCard.test.tsx
+++ b/plugins/catalog/src/components/HasSystemsCard/HasSystemsCard.test.tsx
@@ -78,11 +78,6 @@ describe('', () => {
},
relations: [
{
- target: {
- kind: 'system',
- namespace: 'my-namespace',
- name: 'target-name',
- },
targetRef: 'system:my-namespace/target-name',
type: RELATION_HAS_PART,
},
diff --git a/plugins/catalog/src/components/SystemDiagramCard/SystemDiagramCard.test.tsx b/plugins/catalog/src/components/SystemDiagramCard/SystemDiagramCard.test.tsx
index eb6b71c47e..18b45a84d4 100644
--- a/plugins/catalog/src/components/SystemDiagramCard/SystemDiagramCard.test.tsx
+++ b/plugins/catalog/src/components/SystemDiagramCard/SystemDiagramCard.test.tsx
@@ -102,11 +102,6 @@ describe('', () => {
},
relations: [
{
- target: {
- kind: 'domain',
- namespace: 'namespace',
- name: 'domain',
- },
targetRef: 'domain:namespace/domain',
type: RELATION_PART_OF,
},
@@ -162,11 +157,6 @@ describe('', () => {
},
relations: [
{
- target: {
- kind: 'Domain',
- namespace: 'namespace',
- name: 'alongdomainthatshouldgettruncated',
- },
targetRef: 'domain:namespace/alongdomainthatshouldgettruncated',
type: RELATION_PART_OF,
},
diff --git a/plugins/fossa/dev/index.tsx b/plugins/fossa/dev/index.tsx
index 1ce9ec58b2..78c0ad380b 100644
--- a/plugins/fossa/dev/index.tsx
+++ b/plugins/fossa/dev/index.tsx
@@ -43,7 +43,6 @@ const entity = (name?: string) =>
{
type: RELATION_OWNED_BY,
targetRef: `group:default/${name}`,
- target: { kind: 'group', namespace: 'default', name },
},
],
} as Entity);
diff --git a/plugins/org/src/components/Cards/Group/MembersList/MembersListCard.test.tsx b/plugins/org/src/components/Cards/Group/MembersList/MembersListCard.test.tsx
index cffe3e0228..6b37afec1d 100644
--- a/plugins/org/src/components/Cards/Group/MembersList/MembersListCard.test.tsx
+++ b/plugins/org/src/components/Cards/Group/MembersList/MembersListCard.test.tsx
@@ -60,11 +60,6 @@ describe('MemberTab Test', () => {
{
type: 'memberOf',
targetRef: 'group:default/team-d',
- target: {
- kind: 'group',
- name: 'team-d',
- namespace: 'default',
- },
},
],
spec: {
diff --git a/plugins/org/src/components/Cards/OwnershipCard/OwnershipCard.test.tsx b/plugins/org/src/components/Cards/OwnershipCard/OwnershipCard.test.tsx
index f6aaef6344..483cf9744f 100644
--- a/plugins/org/src/components/Cards/OwnershipCard/OwnershipCard.test.tsx
+++ b/plugins/org/src/components/Cards/OwnershipCard/OwnershipCard.test.tsx
@@ -103,11 +103,6 @@ const items = [
{
type: 'ownedBy',
targetRef: 'group:default/my-team',
- target: {
- name: 'my-team',
- namespace: 'default',
- kind: 'group',
- },
},
],
},
@@ -140,11 +135,6 @@ describe('OwnershipCard', () => {
{
type: 'memberOf',
targetRef: 'group:default/examplegroup',
- target: {
- kind: 'group',
- name: 'examplegroup',
- namespace: 'default',
- },
},
],
};
@@ -266,11 +256,6 @@ describe('OwnershipCard', () => {
{
type: 'memberOf',
targetRef: 'group:default/my-team',
- target: {
- kind: 'group',
- name: 'my-team',
- namespace: 'default',
- },
},
],
};
diff --git a/plugins/org/src/components/Cards/User/UserProfileCard/UserProfileCard.test.tsx b/plugins/org/src/components/Cards/User/UserProfileCard/UserProfileCard.test.tsx
index 3e5e595eef..68e9715b06 100644
--- a/plugins/org/src/components/Cards/User/UserProfileCard/UserProfileCard.test.tsx
+++ b/plugins/org/src/components/Cards/User/UserProfileCard/UserProfileCard.test.tsx
@@ -43,11 +43,6 @@ describe('UserSummary Test', () => {
{
type: 'memberOf',
targetRef: 'group:default/examplegroup',
- target: {
- kind: 'group',
- name: 'ExampleGroup',
- namespace: 'default',
- },
},
],
};
diff --git a/plugins/tech-insights-backend/src/service/fact/factRetrievers/entityMetadataFactRetriever.test.ts b/plugins/tech-insights-backend/src/service/fact/factRetrievers/entityMetadataFactRetriever.test.ts
index 14d0728cf6..9d5c57637d 100644
--- a/plugins/tech-insights-backend/src/service/fact/factRetrievers/entityMetadataFactRetriever.test.ts
+++ b/plugins/tech-insights-backend/src/service/fact/factRetrievers/entityMetadataFactRetriever.test.ts
@@ -58,7 +58,6 @@ const defaultEntityListResponse: GetEntitiesResponse = {
{
type: RELATION_OWNED_BY,
targetRef: 'group:default/my-team',
- target: { name: 'team-a', kind: 'group', namespace: 'default' },
},
],
},
diff --git a/plugins/tech-insights-backend/src/service/fact/factRetrievers/entityOwnershipFactRetriever.test.ts b/plugins/tech-insights-backend/src/service/fact/factRetrievers/entityOwnershipFactRetriever.test.ts
index 374bda2569..555f761ae8 100644
--- a/plugins/tech-insights-backend/src/service/fact/factRetrievers/entityOwnershipFactRetriever.test.ts
+++ b/plugins/tech-insights-backend/src/service/fact/factRetrievers/entityOwnershipFactRetriever.test.ts
@@ -58,7 +58,6 @@ const defaultEntityListResponse: GetEntitiesResponse = {
{
type: RELATION_OWNED_BY,
targetRef: 'group:default/team-a',
- target: { name: 'team-a', kind: 'group', namespace: 'default' },
},
],
},
diff --git a/plugins/tech-insights-backend/src/service/fact/factRetrievers/techdocsFactRetriever.test.ts b/plugins/tech-insights-backend/src/service/fact/factRetrievers/techdocsFactRetriever.test.ts
index b4fa8ba67c..be9397942d 100644
--- a/plugins/tech-insights-backend/src/service/fact/factRetrievers/techdocsFactRetriever.test.ts
+++ b/plugins/tech-insights-backend/src/service/fact/factRetrievers/techdocsFactRetriever.test.ts
@@ -58,7 +58,6 @@ const defaultEntityListResponse: GetEntitiesResponse = {
{
type: RELATION_OWNED_BY,
targetRef: 'group:default/team-a',
- target: { name: 'team-a', kind: 'group', namespace: 'default' },
},
],
},
diff --git a/plugins/techdocs/src/home/components/Tables/DocsTable.test.tsx b/plugins/techdocs/src/home/components/Tables/DocsTable.test.tsx
index 730354f253..098f613773 100644
--- a/plugins/techdocs/src/home/components/Tables/DocsTable.test.tsx
+++ b/plugins/techdocs/src/home/components/Tables/DocsTable.test.tsx
@@ -61,11 +61,6 @@ describe('DocsTable test', () => {
},
relations: [
{
- target: {
- kind: 'user',
- namespace: 'default',
- name: 'owned',
- },
targetRef: 'user:default/owned',
type: 'ownedBy',
},
@@ -82,11 +77,6 @@ describe('DocsTable test', () => {
},
relations: [
{
- target: {
- kind: 'user',
- namespace: 'default',
- name: 'not-owned',
- },
targetRef: 'user:default/not-owned',
type: 'ownedBy',
},
@@ -134,11 +124,6 @@ describe('DocsTable test', () => {
},
relations: [
{
- target: {
- kind: 'user',
- namespace: 'default',
- name: 'owned',
- },
targetRef: 'user:default/owned',
type: 'ownedBy',
},