Skip to content

Commit

Permalink
chore: Remove service metadata (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjcsmith authored Dec 1, 2024
1 parent f339c48 commit 6e6e4a2
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 125 deletions.
17 changes: 0 additions & 17 deletions control-plane/src/modules/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -756,23 +756,6 @@ export const definition = {
messageId: z.string(),
}),
},
storeServiceMetadata: {
method: "PUT",
path: "/clusters/:clusterId/services/:service/keys/:key",
headers: z.object({ authorization: z.string() }),
body: z.object({
value: z.string(),
}),
pathParams: z.object({
clusterId: z.string(),
service: z.string(),
key: z.string(),
}),
responses: {
204: z.undefined(),
401: z.undefined(),
},
},
getClusterExport: {
method: "GET",
path: "/clusters/:clusterId/export",
Expand Down
20 changes: 0 additions & 20 deletions control-plane/src/modules/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,26 +220,6 @@ export const integrations = pgTable(
}),
);

export const serviceMetadata = pgTable(
"service_metadata",
{
cluster_id: varchar("cluster_id")
.references(() => clusters.id)
.notNull(),
service: varchar("service", { length: 1024 }).notNull(),
key: text("status", {
enum: ["incoming-webhook-token"],
}).notNull(),
value: text("value").notNull(),
},
(table) => ({
pk: primaryKey({
columns: [table.cluster_id, table.service, table.key],
name: "service_metadata_cluster_id_service_key",
}),
}),
);

export const workflowMetadata = pgTable(
"workflow_metadata",
{
Expand Down
25 changes: 0 additions & 25 deletions control-plane/src/modules/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { contract } from "./contract";
import * as data from "./data";
import * as management from "./management";
import * as events from "./observability/events";
import { storeServiceMetadata } from "./service-metadata";
import {
assertGenericMessage,
editHumanMessage,
Expand Down Expand Up @@ -339,30 +338,6 @@ export const router = initServer().router(contract, {
body: messages.upserted,
};
},
storeServiceMetadata: async (request) => {
const machine = request.request.getAuth().isMachine();

const { clusterId, service, key } = request.params;
const { value } = request.body;

if (machine.clusterId !== clusterId) {
return {
status: 401,
};
}

await storeServiceMetadata({
clusterId,
key,
value,
service,
});

return {
status: 204,
body: undefined,
};
},
getClusterExport: async (request) => {
const { clusterId } = request.params;

Expand Down
63 changes: 0 additions & 63 deletions control-plane/src/modules/service-metadata.ts

This file was deleted.

0 comments on commit 6e6e4a2

Please sign in to comment.