- 
                Notifications
    You must be signed in to change notification settings 
- Fork 155
fix(instance): add zone to update volume request #4710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
        
      
    
                
     Merged
            
            
          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
    
  
  
    
    Co-authored-by: Jonathan R. <jremy@scaleway.com>
Co-authored-by: Jonathan R. <jremy@scaleway.com>
Co-authored-by: Jonathan R. <jremy@scaleway.com>
Co-authored-by: Jonathan R. <jremy@scaleway.com>
| Codecov ReportAll modified and coverable lines are covered by tests ✅ 
 
 Additional details and impacted files@@             Coverage Diff             @@
##           master    #4710       +/-   ##
===========================================
- Coverage   75.45%   55.20%   -20.26%     
===========================================
  Files         202      311      +109     
  Lines       44323    79242    +34919     
===========================================
+ Hits        33444    43743    +10299     
- Misses       9653    34095    +24442     
- Partials     1226     1404      +178     ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
 | 
            
                  remyleone
  
            
            approved these changes
            
                
                  May 12, 2025 
                
            
            
          
          
    
  Laure-di 
      added a commit
        to scaleway-bot/scaleway-cli
      that referenced
      this pull request
    
      May 15, 2025 
    
    
      
  
    
      
    
  
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Scaleway Bot <github@scaleway.com> Co-authored-by: Jonathan R. <jremy@scaleway.com>
  
    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.
  
    
  
    
Issue cmd
scw instance server create name=test image=ubuntu_noble type=PLAY2-NANO zone=fr-par-2 root-volume=sbs:10G:15000 additional-volumes.0=sbs:10G:15000 --wait -ojson --debug
Response
---------- Scaleway SDK REQUEST 10 (a24063ba) : ----------
PATCH /block/v1alpha1/zones/fr-par-1/volumes/xxxxxxxxx HTTP/1.1
Host: api.scaleway.com
User-Agent: scaleway-sdk-go/v1.0.0-beta.33.0.20250422095315-6f998f4655ec (go1.24.1; darwin; arm64) scaleway-cli/2.0.0+dev
Content-Length: 19
Content-Type: application/json
X-Auth-Token: dd0f2cd8-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Accept-Encoding: gzip
{"perf_iops":15000}
---------- Scaleway SDK RESPONSE 10 (a24063ba) : ----------
HTTP/2.0 500 Internal Server Error
Content-Length: 28
Content-Security-Policy: default-src 'none'; frame-ancestors 'none'
Content-Type: application/json
Date: Mon, 12 May 2025 09:18:36 GMT
Server: Scaleway API Gateway (fr-par-1;edge03)
Strict-Transport-Security: max-age=63072000
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Request-Id: 57432a0a-7048-45d8-80d9-bb36a60c7efd
{"message":"internal error"}
Root Cause
The CLI command targets zone=fr-par-2, but a volume operation is mistakenly attempted in fr-par-1. This zone mismatch triggers a 500 Internal Server Error.
Expected behavior: The API should return a 404 Not Found when attempting to operate on a resource in the wrong zone. This will be corrected in a future update.