From 98b02c0a593758d3b67f639b7faeb7c2dfcbde61 Mon Sep 17 00:00:00 2001 From: boliri Date: Wed, 20 Nov 2024 12:24:30 +0100 Subject: [PATCH 1/3] fix: Read project data from the 'projects' key while loading the registry state in the Feast UI Signed-off-by: boliri --- ui/src/FeastUISansProviders.test.tsx | 2 +- ui/src/queries/useLoadRegistry.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/FeastUISansProviders.test.tsx b/ui/src/FeastUISansProviders.test.tsx index 4af9490e10..8f13ae50a2 100644 --- a/ui/src/FeastUISansProviders.test.tsx +++ b/ui/src/FeastUISansProviders.test.tsx @@ -55,7 +55,7 @@ test("full app rendering", async () => { expect(screen.getByText(/Explore this Project/i)).toBeInTheDocument(); const projectNameRegExp = new RegExp( - parsedRegistry.projectMetadata[0].project!, + parsedRegistry.projects[0].spec.name!, "i" ); diff --git a/ui/src/queries/useLoadRegistry.ts b/ui/src/queries/useLoadRegistry.ts index be8ab65a8c..29409cc918 100644 --- a/ui/src/queries/useLoadRegistry.ts +++ b/ui/src/queries/useLoadRegistry.ts @@ -52,7 +52,7 @@ const useLoadRegistry = (url: string) => { // }); return { - project: objects.projectMetadata[0].project!, + project: objects.projects[0].spec.name!, objects, mergedFVMap, mergedFVList, From c5d0dffa577ee529748080e8b51a5b5a123d33c8 Mon Sep 17 00:00:00 2001 From: boliri Date: Wed, 20 Nov 2024 17:16:00 +0100 Subject: [PATCH 2/3] fix: regenerate registry file so that UI tests can parse the 'projects' object Signed-off-by: boliri --- ui/public/registry.db | Bin 5527 -> 6812 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/ui/public/registry.db b/ui/public/registry.db index 617771999c7e43ef6bdb1e6acf9eed18b06b1dae..ae9a05a4a97c6553d43cacf28eade1ec8da791b8 100644 GIT binary patch literal 6812 zcmeHLZ)hCV7T?+3W;Zu!vKjkFSH*c-(IjLy$=0@ZF;bIKc;=B0ZFzzv40mVlX2;Gy z=iW_RX+=bfgj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non-undefined spec of a project to mitigate errors in UI builds Signed-off-by: boliri --- ui/src/FeastUISansProviders.test.tsx | 2 +- ui/src/queries/useLoadRegistry.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/FeastUISansProviders.test.tsx b/ui/src/FeastUISansProviders.test.tsx index 8f13ae50a2..4b1446f889 100644 --- a/ui/src/FeastUISansProviders.test.tsx +++ b/ui/src/FeastUISansProviders.test.tsx @@ -55,7 +55,7 @@ test("full app rendering", async () => { expect(screen.getByText(/Explore this Project/i)).toBeInTheDocument(); const projectNameRegExp = new RegExp( - parsedRegistry.projects[0].spec.name!, + parsedRegistry.projects[0].spec?.name!, "i" ); diff --git a/ui/src/queries/useLoadRegistry.ts b/ui/src/queries/useLoadRegistry.ts index 29409cc918..88274b4713 100644 --- a/ui/src/queries/useLoadRegistry.ts +++ b/ui/src/queries/useLoadRegistry.ts @@ -52,7 +52,7 @@ const useLoadRegistry = (url: string) => { // }); return { - project: objects.projects[0].spec.name!, + project: objects.projects[0].spec?.name!, objects, mergedFVMap, mergedFVList,