Conversation
* feat: add SFC V2 cloud provider integration Introduces the sfcomputev2 provider package that talks to the V2 SFC API via github.com/sfcompute/sfc-go. Uses capacity-based slot tracking to report availability and native tags for instance metadata instead of name encoding. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor(sfcomputev2): consolidate Brev-specific constants into brev_constants.go Moves tag keys, SSH defaults, and adds production capacity/image IDs to a dedicated file to separate Brev-specific config from generated SDK usage. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor(sfcomputev2): clean up provider for correctness and consistency - Store user tags from attrs.Tags as real SFC V2 instance tags; populate v1.Instance.Tags on read, filtering internal Brev metadata keys - Remove CapacityID/ImageID from SFCCredentialV2 — pull from constants instead, with a TODO to source from env vars - Replace procurementTarget (Procurements.List) with currentCapacityAllocation (Capacities.Fetch + AllocationSchedule.Total) for available slot counting - Count all non-terminated instances (including failed) against capacity - Fix sfcInstanceToBrevInstance to use sfcLocation constant instead of c.location - Add CapabilityTags to declared capabilities - Remove legacy sfcNameToBrevData fallback logic (V1 and V2 are mutually exclusive) - Remove speculative stageTesting/stageProduction normalization; pass stage through raw - Add validation_test.go following the same pattern as the V1 provider Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore: swap sfc-go local replace for tagged release v0.1.0-preview Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
||
| // BrevProductionImageID is the SFCompute image for Brev production instances | ||
| // (ubuntu-24.04.4-cuda-12.8, vm_images.vm_image_id). | ||
| BrevProductionImageID = "vmi_4GwEvmclFURy7ztFQjOdr" |
Contributor
There was a problem hiding this comment.
manually tested that this image works for us? Docker, UFW, etc?
| sfc "github.com/sfcompute/sfc-go" | ||
| ) | ||
|
|
||
| const CloudProviderID = "sfcompute" |
Contributor
There was a problem hiding this comment.
ok if this collides with the existing cloudcred?
patelspratik
previously approved these changes
May 18, 2026
patelspratik
approved these changes
May 19, 2026
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.
Introduces the sfcomputev2 provider package that talks to the V2 SFC API via github.com/sfcompute/sfc-go. Uses capacity-based slot tracking to report availability and native tags for instance metadata instead of name encoding.
Moves tag keys, SSH defaults, and adds production capacity/image IDs to a dedicated file to separate Brev-specific config from generated SDK usage.