fix(create): include Shadeform instance types - #435
Open
robobryce wants to merge 3 commits into
Open
Conversation
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.
Why
brev search -g RTXPro6000can list Shadeform-backed types such asverda_RTXPro6000, butbrev create NAME -g RTXPro6000 --min-disk 1 --detachedrejects that same type as "not a recognized type".This started when the CLI moved instance catalogs to the dev-plane API. Search reads the public catalog, while create reads the authenticated organization catalog so it can choose the cloud credential to send with the workspace request. The create request left dev-plane's resource-access and reserved-pool filtering enabled. That filtering can remove Shadeform types from the organization response even though the public search response advertises them. The CLI then mistakes the missing entry for an invalid instance type before it ever attempts creation.
How
The authenticated organization catalog request now sets
skip_access_filterto true. This returns the raw instance types associated with the organization's cloud credentials, including types that would otherwise be removed by reserved-pool filtering. Create can therefore findverda_RTXPro6000, resolve itscloudCredId, and submit the workspace request.The request still sets
include_unavailableto false. That is intentional: bypassing access filtering fixes catalog consistency and cloud-credential resolution, while the existing availability filter continues to prevent create from selecting entries with no current capacity.I kept this change at the organization-catalog boundary instead of weakening create's validation. Unknown type names are still rejected, known types without a usable cloud credential are still reported as unavailable, and all create paths continue to use the same catalog and placement logic.
Tests
verda_RTXPro6000whenskip_access_filteris true, and verifies that its Shadeform cloud credential is mapped.go test ./pkg/store ./pkg/cmd/gpucreate ./pkg/cmd/gpusearch -count=1go test ./... -count=1passed for all normal packages. The repository'se2etest/setuppackage failed during initialization because it assumes the checkout is at/home/ubuntu/brev-cli; this checkout is/home/ubuntu/brev-cli-src.