Skip to content

Commit

Permalink
fix: Added additional value types to UI parser and removed references…
Browse files Browse the repository at this point in the history
… to registry-bq.json (feast-dev#2361)

Signed-off-by: Yun Nan Liu <yunnanl@twitter.com>

Co-authored-by: Yun Nan Liu <yunnanl@twitter.com>
Signed-off-by: Achal Shah <achals@gmail.com>
  • Loading branch information
2 people authored and achals committed Mar 8, 2022
1 parent 10d96fc commit 5fe123b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 19 deletions.
4 changes: 1 addition & 3 deletions ui/src/components/ProjectSelector.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ import App from "../App";
import {
projectsListWithDefaultProject,
creditHistoryRegistry,
bigQueryProjectRegistry,
} from "../mocks/handlers";

// declare which API requests to mock
const server = setupServer(
projectsListWithDefaultProject,
creditHistoryRegistry,
bigQueryProjectRegistry
creditHistoryRegistry
);

// establish API mocking before all tests
Expand Down
17 changes: 1 addition & 16 deletions ui/src/mocks/handlers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { rest } from "msw";
import registry from "../../public/registry.json";
import registry_bq from "../../public/registry_bq.json";

const projectsListWithDefaultProject = rest.get(
"/projects-list.json",
Expand All @@ -17,12 +16,6 @@ const projectsListWithDefaultProject = rest.get(
id: "credit_score_project",
registryPath: "/registry.json",
},
{
name: "Big Query Project",
xxxdescription: "Doing stuff in Google Big Query",
id: "big_query_project",
registryPath: "/registry_bq.json",
},
],
})
);
Expand All @@ -33,15 +26,7 @@ const creditHistoryRegistry = rest.get("/registry.json", (req, res, ctx) => {
return res(ctx.status(200), ctx.json(registry));
});

const bigQueryProjectRegistry = rest.get(
"/registry_bq.json",
(req, res, ctx) => {
return res(ctx.status(200), ctx.json(registry_bq));
}
);

export {
projectsListWithDefaultProject,
creditHistoryRegistry,
bigQueryProjectRegistry,
creditHistoryRegistry
};
4 changes: 4 additions & 0 deletions ui/src/parsers/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ enum FEAST_FEATURE_VALUE_TYPES {
INT64 = "INT64",
STRING = "STRING",
BOOL = "BOOL",
BYTES = "BYTES",
INT32 = "INT32",
DOUBLE = "DOUBLE",
UNIX_TIMESTAMP = "UNIX_TIMESTAMP"
}

export { FEAST_FCO_TYPES, FEAST_FEATURE_VALUE_TYPES };

0 comments on commit 5fe123b

Please sign in to comment.