Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
can you fix the and rebase/remake the go.mod/sum |
internal/nebius/v1/README.md
Outdated
| - ✅ **Terminate Instance**: `InstanceService.Delete` | ||
| - ✅ **Stop Instance**: `InstanceService.Stop` | ||
| - ✅ **Start Instance**: `InstanceService.Start` | ||
| - ✅ **Update Instance**: `InstanceService.Update` |
There was a problem hiding this comment.
what do you update the instance for? Changing name/metadata? how does this fit into the v1/interface
internal/nebius/v1/README.md
Outdated
|
|
||
| ### Instance Updates | ||
| - ✅ **Update Instance Tags**: Maps to `UpdateInstanceTags` in CloudClient interface | ||
| - ✅ **Change Instance Type**: Maps to `ChangeInstanceType` in CloudClient interface (if supported by Nebius API) |
|
@theFong I've verified this by examining the Nebius API documentation: ✅ Change Instance Type IS supported:
Evidence: https://github.com/nebius/api/blob/main/nebius/compute/v1/instance.proto
I've updated the README to correctly show this as supported and removed the contradictory entry from unsupported features. The latest commit (b98cf90) reflects these corrections. |
- Add NebiusCredential and NebiusClient structs following Lambda Labs pattern - Implement all CloudClient interface methods as stubs returning ErrNotImplemented - Add comprehensive capabilities declaration for Nebius features - Update documentation with setup and security implementation details - Add github.com/nebius/gosdk dependency Features implemented: - Instance management (Create, Get, List, Terminate, Stop, Start, Reboot) - Instance types and quotas - Image management - Location management - Firewall/Security Group management - Volume management - Tag management All methods are currently stubs that return ErrNotImplemented, ready for actual API implementation in future iterations. Co-Authored-By: Alec Fong <alecsanf@usc.edu>
- Replace unused 'ctx context.Context' parameters with '_' in all stub methods - Run gofumpt formatting to fix code formatting issues - Addresses CI linting failures in Test and Lint job All stub methods now properly handle unused context parameters according to Go linting standards while maintaining interface compliance. Co-Authored-By: Alec Fong <alecsanf@usc.edu>
- Replace unused 'args' parameters with '_' in all stub methods - Replace unused 'instanceID' parameters with '_' in RebootInstance and ListInstances - Fix unused parameters in networking.go, storage.go, quota.go, instancetype.go - Ensures complete compliance with Go linting standards for all stub methods - Addresses all remaining CI Test and Lint failures from job 47393947029 Co-Authored-By: Alec Fong <alecsanf@usc.edu>
- Document supported features based on Nebius API research - Include instance management, GPU clusters, images, and quotas - List unsupported features with explanations - Follow Lambda Labs README structure for consistency - Reference official Nebius API documentation and Go SDK Co-Authored-By: Alec Fong <alecsanf@usc.edu>
- Add missing github.com/kr/text v0.2.0 dependency found by go mod tidy - Move github.com/nebius/gosdk from indirect to direct dependency - Resolves dependency management issues identified in PR review Co-Authored-By: Alec Fong <alecsanf@usc.edu>
- Remove misleading 'Update Instance' entry that doesn't map to CloudClient interface - Add specific 'Instance Updates' section with UpdateInstanceTags and ChangeInstanceType - Clarify in unsupported features why general instance updates aren't supported - Addresses GitHub comment about how instance updates fit into v1 interface Resolves theFong's question about what instance updates are for and how they map to the CloudClient interface methods. Co-Authored-By: Alec Fong <alecsanf@usc.edu>
- Mark 'Change Instance Type' as supported based on API verification - ResourcesSpec.preset field has no IMMUTABLE annotation in Nebius API - Remove contradictory entry from unsupported features section - Add TODO item to verify implementation works correctly Addresses theFong's verification request on GitHub PR comment. Co-Authored-By: Alec Fong <alecsanf@usc.edu>
b98cf90 to
8724ea7
Compare
Implement Nebius provider boilerplate
Summary
This PR implements the foundational boilerplate for the Nebius cloud provider in the Brev Cloud SDK, following the established Lambda Labs pattern. The implementation adds complete stub implementations for all CloudClient interface methods, proper credential handling, and updated documentation.
Key Changes:
github.com/nebius/gosdkdependencyinternal/nebius/v1/NebiusCredentialandNebiusClientstructs with all required interface methodsErrNotImplementedas stubs, ready for actual API implementationCapabilities Declared:
Review & Testing Checklist for Human
gosdk.New()andgosdk.IAMToken()are the correct way to initialize the SDK with service account credentials. The API may have changed since research.make lintandmake testto ensure no dependency or build issues (linting failed in dev environment due to testify package issues)pkg/v1/client.goto ensure all required interface methods are implementedSECURITY.mdmatches actual Nebius SDK patternsNewNebiusClient()can be called without errors (even with dummy credentials)Recommended Test Plan:
go build ./internal/nebius/v1/...NebiusCredentialin a test fileNebiusClientsatisfiesCloudClientDiagram
%%{ init : { "theme" : "default" }}%% graph TB subgraph "Core SDK" client["pkg/v1/client.go<br/>CloudClient interface"]:::context instance["pkg/v1/instance.go<br/>Instance types"]:::context capabilities["pkg/v1/capabilities.go<br/>Capability definitions"]:::context end subgraph "Nebius Provider (NEW)" nclient["internal/nebius/v1/client.go<br/>NebiusClient + NebiusCredential"]:::major-edit ninst["internal/nebius/v1/instance.go<br/>Instance management stubs"]:::major-edit ncap["internal/nebius/v1/capabilities.go<br/>Nebius capabilities"]:::major-edit nnet["internal/nebius/v1/networking.go<br/>Firewall stubs"]:::major-edit nimg["internal/nebius/v1/image.go<br/>Image management stubs"]:::major-edit nstor["internal/nebius/v1/storage.go<br/>Volume management stubs"]:::major-edit end subgraph "Documentation" security["internal/nebius/SECURITY.md<br/>Auth implementation details"]:::minor-edit contrib["internal/nebius/CONTRIBUTE.md<br/>Setup instructions"]:::minor-edit end subgraph "Dependencies" gomod["go.mod<br/>Added nebius/gosdk"]:::minor-edit gosdk["github.com/nebius/gosdk<br/>External dependency"]:::context end client --> nclient instance --> ninst capabilities --> ncap nclient --> gosdk gomod --> gosdk subgraph Legend L1["Major Edit"]:::major-edit L2["Minor Edit"]:::minor-edit L3["Context/No Edit"]:::context end classDef major-edit fill:#90EE90 classDef minor-edit fill:#87CEEB classDef context fill:#FFFFFFNotes
NotImplCloudClientembedding for graceful handling of unsupported featuresAPITypeLocationalbased on Nebius architecture researchErrNotImplementedThis is foundational work that establishes the complete provider structure. All interface methods are implemented as stubs, making it safe to integrate while actual Nebius API calls are developed incrementally.