Skip to content

Conversation

@ziirish
Copy link
Contributor

@ziirish ziirish commented Feb 20, 2024

The default values for 'server.routed-ip-enabled' and 'ip.type' will change in a near future.
This fix ensures we always set the ip.type accordingly with the context.

Without this change, users will end up with the following error:

❯ scw instance server create routed-ip-enabled=false
Cannot create the server: scaleway-sdk-go: http error 400 Bad Request: cannot attach ip of type 'routed'

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates OR Closes #0000

Release note for CHANGELOG:

- fix: explicitly set IP type based on routed-ip-enabled value

The default values for 'server.routed-ip-enabled' and 'ip.type' will
change in a near future.
This fix ensures we always set the ip.type accordingly with the context.

Without this change, users will end up with the following error:
```
❯ scw instance server create routed-ip-enabled=false
Cannot create the server: scaleway-sdk-go: http error 400 Bad Request: cannot attach ip of type 'routed'
```
@NoSuchCommand NoSuchCommand requested review from Codelax and quantumsheep and removed request for quantumsheep February 20, 2024 16:11
@codecov-commenter
Copy link

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (fd9f90a) 75.87% compared to head (83ffbda) 75.87%.

Files Patch % Lines
...nal/namespaces/instance/v1/custom_server_create.go 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3668   +/-   ##
=======================================
  Coverage   75.87%   75.87%           
=======================================
  Files         189      189           
  Lines       42597    42599    +2     
=======================================
+ Hits        32319    32321    +2     
+ Misses       9091     9090    -1     
- Partials     1187     1188    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Codelax Codelax changed the title fix: explicitly set IP type based on routed-ip-enabled value fix(instance): explicitly set IP type based on routed-ip-enabled value Feb 21, 2024
@Codelax Codelax added this pull request to the merge queue Feb 21, 2024
Merged via the queue into scaleway:master with commit 187fcc1 Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants