Skip to content
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

Missing AWS platforms / servers for several instance references #284

Open
bpetit opened this issue Apr 8, 2024 · 0 comments
Open

Missing AWS platforms / servers for several instance references #284

bpetit opened this issue Apr 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@bpetit
Copy link
Collaborator

bpetit commented Apr 8, 2024

Bug description

Querying the cloud/instance route with the following instances returns a 500 error, because of missing server/platform in servers.csv:

Instance Platform
g3.4xlarge platform_aws_g3
g3.8xlarge platform_aws_g3
g3.16xlarge platform_aws_g3
g3s.xlarge platform_aws_g3
m7gd.medium platform_aws_g3
m7gd.large m7gd.metal
m7gd.xlarge m7gd.metal
m7gd.2xlarge m7gd.metal
m7gd.4xlarge m7gd.metal
m7gd.8xlarge m7gd.metal
m7gd.12xlarge m7gd.metal
m7gd.16xlarge m7gd.metal
db.m1.medium platform_aws_m1
m1.medium platform_aws_m1
db.m1.small platform_aws_m1
m1.small platform_aws_m1
db.m1.large platform_aws_m1
m1.large platform_aws_m1
db.m1.xlarge platform_aws_m1

Trace in the API is :

'NoneType' object is not subscriptable
Traceback (most recent call last):
File "/app/boaviztapi/main.py", line 45, in catch_exceptions_middleware
return await call_next(request)
File "/usr/local/lib/python3.9/site-packages/starlette/middleware/base.py", line 84, in call_next
raise app_exc
File "/usr/local/lib/python3.9/site-packages/starlette/middleware/base.py", line 70, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "/usr/local/lib/python3.9/site-packages/starlette/middleware/exceptions.py", line 79, in call
raise exc
File "/usr/local/lib/python3.9/site-packages/starlette/middleware/exceptions.py", line 68, in call
await self.app(scope, receive, sender)
File "/usr/local/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in call
raise e
File "/usr/local/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call
await self.app(scope, receive, send)
File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 718, in call
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 66, in app
response = await func(request)
File "/usr/local/lib/python3.9/site-packages/fastapi/routing.py", line 237, in app
raw_response = await run_endpoint_function(
File "/usr/local/lib/python3.9/site-packages/fastapi/routing.py", line 163, in run_endpoint_function
return await dependant.call(**values)
File "/app/boaviztapi/routers/cloud_router.py", line 48, in instance_cloud_impact
instance_model = mapper_cloud_instance(cloud_instance, archetype=instance_archetype)
File "/app/boaviztapi/dto/device/device.py", line 82, in mapper_cloud_instance
complete_components_usage(model_cloud_instance.platform, model_cloud_instance.usage)
File "/app/boaviztapi/dto/device/device.py", line 59, in complete_components_usage
for disk_unit in model.disk:
File "/app/boaviztapi/model/device/server.py", line 53, in disk
if get_arch_component(self.archetype, "SSD")["units"] not in [{}, {'default':0}]:
TypeError: 'NoneType' object is not subscriptable

To Reproduce

query cloud/instance route with provider aws and instance_type equals one of the above instances

Expected behavior

200 OK with a result

@bpetit bpetit added the bug Something isn't working label Apr 8, 2024
@bpetit bpetit changed the title Missing AWS platform / server for G3 instances references Missing AWS platforms / servers for several instance references Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant