You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(app-studio): route tenant access through the GraphQL gateway
Activate the GraphQL path: clientFor now builds a tenant.Scope from the
X-Kedge-Cluster header (the hub-injected workspace cluster ID) and the caller
token, so App Studio reaches its workspace through the hub's gateway — which
serves any workspace the caller has access to, unlike the DefaultCluster-gated
kcp user-proxy.
- http.go reads X-Kedge-Cluster into identity.clusterID
- server.go/main.go construct the GraphQL client from KEDGE_HUB_URL
- all ~18 c.Dynamic().Resource(gvr) call sites move to c.Resource(descriptor),
backed by the GraphQL Scope (prod) or a dynamic client (tests)
- tenant_resources.go holds the GraphQL descriptors (Kind/Plural) for Project,
Secret, SandboxRunner, and code-provider Connection/Repository
- isProjectAPIInitializingError recognises the gateway "schema not ready"
shapes (no schema for cluster / Project type missing) for the 503 path
Module builds, vets, and the full test suite passes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
klog.V(2).Infof("development sandbox sync after %s skipped for project %s: tenant client factory is not configured", projectToolBaseName(name), p.Name)
460
+
ifs.gql==nil {
461
+
klog.V(2).Infof("development sandbox sync after %s skipped for project %s: tenant GraphQL client is not configured", projectToolBaseName(name), p.Name)
// requireProjectClient resolves the caller identity and a workspace-scoped
@@ -210,8 +211,12 @@ func (s *Server) requireProjectClient(w http.ResponseWriter, r *http.Request) (*
210
211
writeStatus(w, http.StatusBadRequest, "BadRequest", "a workspace is required for this endpoint — select an organization and workspace first")
211
212
returnnil, identity{}, false
212
213
}
213
-
ifs.clients==nil {
214
-
writeStatus(w, http.StatusNotImplemented, "NotImplemented", "tenant client factory not configured — provider has no kubeconfig")
214
+
ifs.gql==nil {
215
+
writeStatus(w, http.StatusNotImplemented, "NotImplemented", "tenant GraphQL client not configured — provider has no hub URL")
216
+
returnnil, identity{}, false
217
+
}
218
+
ifid.clusterID=="" {
219
+
writeStatus(w, http.StatusBadRequest, "BadRequest", "no workspace cluster on request (X-Kedge-Cluster missing) — the hub did not resolve a cluster for this workspace")
0 commit comments