Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
1f14d4b
feat: improve namespace selector
wilsonrivera Jul 1, 2025
aeb21c3
Merge branch 'main' into wilson/eng-7026-default-namespace-is-causing…
wilsonrivera Aug 12, 2025
aacc4fb
chore: improve namespace selector
wilsonrivera Aug 13, 2025
a73bf0e
Merge branch 'main' into wilson/eng-7026-default-namespace-is-causing…
wilsonrivera Aug 14, 2025
7d2f5b9
chore: improve namespace selector
wilsonrivera Aug 15, 2025
5711cc6
Merge branch 'main' into wilson/eng-7026-default-namespace-is-causing…
wilsonrivera Aug 21, 2025
cd74921
Merge branch 'refs/heads/main' into wilson/eng-7026-default-namespace…
wilsonrivera Aug 22, 2025
cb43135
chore: improve selector and filter
wilsonrivera Aug 22, 2025
fad7c34
Merge branch 'main' into wilson/eng-7026-default-namespace-is-causing…
wilsonrivera Sep 9, 2025
81a2bfa
feat: improve the namespace/graph selector
wilsonrivera Sep 10, 2025
a28b6e0
chore: restore deleted file
wilsonrivera Sep 10, 2025
f6936e4
chore: sanitize urls
wilsonrivera Sep 10, 2025
57667db
chore: fix an issue that caused double navigation
wilsonrivera Sep 10, 2025
7836e78
Merge branch 'main' into wilson/eng-7026-default-namespace-is-causing…
wilsonrivera Sep 10, 2025
e6a1131
chore: generate connect
wilsonrivera Sep 10, 2025
54fc118
chore: linting
wilsonrivera Sep 10, 2025
5382072
chore: make `setNamespace` explicit
wilsonrivera Sep 10, 2025
d71e85f
chore: solve some comments from CodeRabbit
wilsonrivera Sep 10, 2025
8c32c8c
chore: apply suggestions
wilsonrivera Sep 11, 2025
ae1fb1f
chore: update spacing
wilsonrivera Sep 11, 2025
a0c2e3c
Merge branch 'main' into wilson/eng-7026-default-namespace-is-causing…
wilsonrivera Sep 11, 2025
2ba0df3
Merge branch 'main' into wilson/eng-7026-default-namespace-is-causing…
wilsonrivera Sep 12, 2025
45d1a5c
Merge branch 'main' into wilson/eng-7026-default-namespace-is-causing…
wilsonrivera Sep 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6,003 changes: 3,208 additions & 2,795 deletions connect-go/gen/proto/wg/cosmo/platform/v1/platform.pb.go

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

13 changes: 12 additions & 1 deletion connect/src/wg/cosmo/platform/v1/platform_connect.ts

Large diffs are not rendered by default.

233 changes: 233 additions & 0 deletions connect/src/wg/cosmo/platform/v1/platform_pb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20142,6 +20142,239 @@ export class GetNamespaceResponse extends Message<GetNamespaceResponse> {
}
}

/**
* @generated from message wg.cosmo.platform.v1.WorkspaceNamespace
*/
export class WorkspaceNamespace extends Message<WorkspaceNamespace> {
/**
* @generated from field: string id = 1;
*/
id = "";

/**
* @generated from field: string name = 2;
*/
name = "";

/**
* @generated from field: repeated wg.cosmo.platform.v1.WorkspaceFederatedGraph graphs = 3;
*/
graphs: WorkspaceFederatedGraph[] = [];

constructor(data?: PartialMessage<WorkspaceNamespace>) {
super();
proto3.util.initPartial(data, this);
}

static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "wg.cosmo.platform.v1.WorkspaceNamespace";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "graphs", kind: "message", T: WorkspaceFederatedGraph, repeated: true },
]);

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): WorkspaceNamespace {
return new WorkspaceNamespace().fromBinary(bytes, options);
}

static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): WorkspaceNamespace {
return new WorkspaceNamespace().fromJson(jsonValue, options);
}

static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): WorkspaceNamespace {
return new WorkspaceNamespace().fromJsonString(jsonString, options);
}

static equals(a: WorkspaceNamespace | PlainMessage<WorkspaceNamespace> | undefined, b: WorkspaceNamespace | PlainMessage<WorkspaceNamespace> | undefined): boolean {
return proto3.util.equals(WorkspaceNamespace, a, b);
}
}

/**
* @generated from message wg.cosmo.platform.v1.WorkspaceFederatedGraph
*/
export class WorkspaceFederatedGraph extends Message<WorkspaceFederatedGraph> {
/**
* @generated from field: string id = 1;
*/
id = "";

/**
* @generated from field: string targetId = 2;
*/
targetId = "";

/**
* @generated from field: string name = 3;
*/
name = "";

/**
* @generated from field: bool isContract = 4;
*/
isContract = false;

/**
* @generated from field: repeated wg.cosmo.platform.v1.WorkspaceSubgraph subgraphs = 5;
*/
subgraphs: WorkspaceSubgraph[] = [];

constructor(data?: PartialMessage<WorkspaceFederatedGraph>) {
super();
proto3.util.initPartial(data, this);
}

static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "wg.cosmo.platform.v1.WorkspaceFederatedGraph";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "targetId", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "isContract", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 5, name: "subgraphs", kind: "message", T: WorkspaceSubgraph, repeated: true },
]);

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): WorkspaceFederatedGraph {
return new WorkspaceFederatedGraph().fromBinary(bytes, options);
}

static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): WorkspaceFederatedGraph {
return new WorkspaceFederatedGraph().fromJson(jsonValue, options);
}

static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): WorkspaceFederatedGraph {
return new WorkspaceFederatedGraph().fromJsonString(jsonString, options);
}

static equals(a: WorkspaceFederatedGraph | PlainMessage<WorkspaceFederatedGraph> | undefined, b: WorkspaceFederatedGraph | PlainMessage<WorkspaceFederatedGraph> | undefined): boolean {
return proto3.util.equals(WorkspaceFederatedGraph, a, b);
}
}

/**
* @generated from message wg.cosmo.platform.v1.WorkspaceSubgraph
*/
export class WorkspaceSubgraph extends Message<WorkspaceSubgraph> {
/**
* @generated from field: string id = 1;
*/
id = "";

/**
* @generated from field: string targetId = 2;
*/
targetId = "";

/**
* @generated from field: string name = 3;
*/
name = "";

constructor(data?: PartialMessage<WorkspaceSubgraph>) {
super();
proto3.util.initPartial(data, this);
}

static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "wg.cosmo.platform.v1.WorkspaceSubgraph";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "targetId", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): WorkspaceSubgraph {
return new WorkspaceSubgraph().fromBinary(bytes, options);
}

static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): WorkspaceSubgraph {
return new WorkspaceSubgraph().fromJson(jsonValue, options);
}

static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): WorkspaceSubgraph {
return new WorkspaceSubgraph().fromJsonString(jsonString, options);
}

static equals(a: WorkspaceSubgraph | PlainMessage<WorkspaceSubgraph> | undefined, b: WorkspaceSubgraph | PlainMessage<WorkspaceSubgraph> | undefined): boolean {
return proto3.util.equals(WorkspaceSubgraph, a, b);
}
}

/**
* @generated from message wg.cosmo.platform.v1.GetWorkspaceRequest
*/
export class GetWorkspaceRequest extends Message<GetWorkspaceRequest> {
constructor(data?: PartialMessage<GetWorkspaceRequest>) {
super();
proto3.util.initPartial(data, this);
}

static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "wg.cosmo.platform.v1.GetWorkspaceRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetWorkspaceRequest {
return new GetWorkspaceRequest().fromBinary(bytes, options);
}

static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetWorkspaceRequest {
return new GetWorkspaceRequest().fromJson(jsonValue, options);
}

static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetWorkspaceRequest {
return new GetWorkspaceRequest().fromJsonString(jsonString, options);
}

static equals(a: GetWorkspaceRequest | PlainMessage<GetWorkspaceRequest> | undefined, b: GetWorkspaceRequest | PlainMessage<GetWorkspaceRequest> | undefined): boolean {
return proto3.util.equals(GetWorkspaceRequest, a, b);
}
}

/**
* @generated from message wg.cosmo.platform.v1.GetWorkspaceResponse
*/
export class GetWorkspaceResponse extends Message<GetWorkspaceResponse> {
/**
* @generated from field: wg.cosmo.platform.v1.Response response = 1;
*/
response?: Response;

/**
* @generated from field: repeated wg.cosmo.platform.v1.WorkspaceNamespace namespaces = 2;
*/
namespaces: WorkspaceNamespace[] = [];

constructor(data?: PartialMessage<GetWorkspaceResponse>) {
super();
proto3.util.initPartial(data, this);
}

static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "wg.cosmo.platform.v1.GetWorkspaceResponse";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "response", kind: "message", T: Response },
{ no: 2, name: "namespaces", kind: "message", T: WorkspaceNamespace, repeated: true },
]);

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetWorkspaceResponse {
return new GetWorkspaceResponse().fromBinary(bytes, options);
}

static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetWorkspaceResponse {
return new GetWorkspaceResponse().fromJson(jsonValue, options);
}

static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetWorkspaceResponse {
return new GetWorkspaceResponse().fromJsonString(jsonString, options);
}

static equals(a: GetWorkspaceResponse | PlainMessage<GetWorkspaceResponse> | undefined, b: GetWorkspaceResponse | PlainMessage<GetWorkspaceResponse> | undefined): boolean {
return proto3.util.equals(GetWorkspaceResponse, a, b);
}
}

/**
* @generated from message wg.cosmo.platform.v1.PushCacheWarmerOperationRequest
*/
Expand Down
5 changes: 5 additions & 0 deletions controlplane/src/core/bufservices/PlatformService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ import { getClientsFromAnalytics } from './federated-graph/getClientsFromAnalyti
import { validateAndFetchPluginData } from './plugin/validateAndFetchPluginData.js';
import { linkSubgraph } from './subgraph/linkSubgraph.js';
import { unlinkSubgraph } from './subgraph/unlinkSubgraph.js';
import { getWorkspace } from './workspace/getWorkspace.js';

export default function (opts: RouterOptions): Partial<ServiceImpl<typeof PlatformService>> {
return {
Expand Down Expand Up @@ -790,6 +791,10 @@ export default function (opts: RouterOptions): Partial<ServiceImpl<typeof Platfo
return getNamespace(opts, req, ctx);
},

getWorkspace: (req, ctx) => {
return getWorkspace(opts, req, ctx);
},

listRouterCompatibilityVersions: () => {
return listRouterCompatibilityVersions();
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export function getFederatedGraphById(
const list = await subgraphRepo.listByFederatedGraph({
federatedGraphTargetId: federatedGraph.targetId,
published: false,
rbac: authContext.rbac,
});
Comment thread
wilsonrivera marked this conversation as resolved.

const featureFlags = await featureFlagRepo.getFeatureFlagsByFederatedGraph({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function getFederatedGraphs(
const list: FederatedGraphDTO[] = await fedGraphRepo.list({
limit: req.limit,
offset: req.offset,
namespaceId,
namespaceIds: namespaceId ? [namespaceId] : undefined,
supportsFederation: req.supportsFederation,
rbac: authContext.rbac,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,15 @@ export function deleteNamespace(
const namespaceRepo = new NamespaceRepository(tx, authContext.organizationId);
const auditLogRepo = new AuditLogRepository(tx);

const namespaceIds = [ns.id];
const federatedGraphs = await federatedGraphRepo.list({
namespaceId: ns.id,
namespaceIds,
offset: 0,
limit: 0,
});

const subgraphs = await subgraphRepo.list({
namespaceId: ns.id,
namespaceIds,
offset: 0,
limit: 0,
excludeFeatureSubgraphs: false,
Expand Down
Loading
Loading