Repository navigation
fix(compute): inspect AMIs from the image listing instead of DescribeInstances - #468
Merged
Merged
Conversation
…Instances The AWS compute list mixes instances and AMIs, but get() sent every id to DescribeInstances, so selecting an AMI in the Cloud Explorer answered 404 "The instance ID 'ami-...' does not exist" and the inspector fell back to the list row after a retried 404. An AMI id is now looked up in the same DescribeImages listing the row came from. DescribeImages with ImageIds is not used because Floci answers any well-formed AMI id with a fallback image, which would show a deregistered AMI as still existing.
Contributor
[Medium impact] This PR appears safe to merge.
|
Contributor
|
Thank you @irodotos7 No blockers from my side. |
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.
Summary
Selecting an AMI in the AWS Compute Cloud Explorer sent its id to
DescribeInstances.GET /api/clouds/aws/services/compute/resources/ami-...answered 404The instance ID 'ami-...' does not existfor an AMI that is in the list, the frontend retried it once, and the inspector fell back to the list row.AwsComputeAdapter.getlooks anami-id up in the sameDescribeImageslisting the row came from, and returnsnull(404) when it is not there.DescribeImageswithImageIds: Floci answers any well-formed AMI id with a "fallback image for launchable AMI", so a deregistered or mistyped AMI would show up as existing.Delete for AMIs is a separate problem, handled in #464; the two do not overlap.
Type of change
fix:)feat:)feat!:orfix!:)Area
packages/frontend)packages/api)Verification
AWS EC2 via Floci core built from
floci-io/flocimain at0eef65385, EC2 mock mode, in-memory storage.Fixture: an instance and an AMI created from it with
CreateImage.mainGET .../compute/resources/<own AMI>The instance ID 'ami-...' does not existtype: imagewith architecture, owner, root deviceGET .../compute/resources/<unknown AMI>resource_not_foundGET .../compute/resources/<instance>AwsComputeAdapter.test.tsadds two cases (an AMI is found in the listing without callingDescribeInstances; an unlisted AMI isnull); the first fails onmain.Checklist
pnpm lint,pnpm type-check,pnpm test, andpnpm buildpass locally (API 2,797 pass, frontend 305 pass)bun testinpackages/api)