Repository navigation
feat(settings): configure clusters once in a Compute tab - #478
Merged
Merged
Conversation
A Kubernetes workspace carried its cluster's context, namespace and provider keys, once per workspace, and the Workspaces tab mixed cluster setup with computers. Settings gains a Compute tab that edits the clusters of ~/.infer/compute.yaml, the CLI's compute context. Each cluster is checked once for what sessions need and shows the sessions every workspace on it runs. Detect clusters and Provision local cluster move there and create clusters, the local one with its ubuntu-desktop workspace on it. A workspace picks its cluster with `compute`. It reads the cluster's context, namespace and provider keys, and saving drops those keys from it, which the CLI refuses to see repeated. Renaming a cluster moves its workspaces along, and a cluster a workspace runs on cannot be deleted. Workspaces that carry their own connection keep working and stay editable as "Its own connection". A workspace's running badge now counts only its own sessions. Every cluster action first checks that the installed infer has the compute commands, so the desktop never writes compute.yaml or a compute key an older CLI cannot read. On one, the Compute tab says to install updates. Refs #474
Contributor
|
🎉 This PR is included in version 0.60.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #474
Summary
A Kubernetes workspace carried its cluster's context, namespace and provider keys, once per workspace, and the Workspaces tab mixed cluster setup with the computers themselves. Settings gains a Compute tab where clusters are configured once, in
~/.infer/compute.yaml, the CLI's compute context (inference-gateway/cli#1761). A workspace then picks its cluster.Merge after a CLI release that has compute. The CLI side is inference-gateway/cli#1762, which is merged, and inference-gateway/cli#1763, which is open. Until then every cluster action first checks that the installed
inferhas the compute commands. On an older CLI the Compute tab says to install updates and never writescompute.yamlor acomputekey, which that CLI would refuse at startup.Changes
frontend/components/ComputeTab.tsx,backend/src/compute_settings.rs)compute.yaml. Machines, GPU settings and every key the tab does not know stay as they are.inference-gateway.com/computelabel.infer-k3scluster and theubuntu-desktopworkspace on it.frontend/components/WorkspacesTab.tsx,backend/src/workspace_settings.rs)inference-gateway.com/workspacelabel. It used to count the whole namespace.frontend/components/ClusterParts.tsxholds what both tabs share: the prerequisite list, the running badge, the restart notice and a check hook.AGENTS.md: the DOM contract gainsNew cluster,Save cluster,Check cluster <name>,Edit cluster <name>,Delete cluster <name>, the cluster form ids andworkspace-compute, and says where Detect clusters and Provision local cluster live now.Verification
cargo testpasses 245 tests. The new ones cover compute.yaml reads and edits keeping unknown keys and${VAR}references, label-safe names, renames moving workspaces, cluster detection, a workspace on a cluster reading its connection and saving without the cluster's keys, and the local cluster with its workspace.bun testpasses 224 tests, including the cluster form and a workspace on a cluster.bun run build,cargo fmt --checkandcargo clippy --all-targets -- -D warningspass, and so does the pre-commit hook.tests/compute-settings.yamladds a cluster, andtests/workspace-provision.yamlnow provisions from the Compute tab.cargo test -p desktop-e2evalidates them. Not run on macOS yet, because the suite drives the real UI.Not done here
compute.yaml.desktop.mdon the docs site still describes Detect clusters and Provision local cluster under Workspaces. Docs follow-up: [DOCS] Desktop Compute tab: clusters configured once, workspaces pick one docs#1132.