Skip to content

fix(compute): inspect AMIs from the image listing instead of DescribeInstances - #468

Merged
fredpena merged 1 commit into
floci-io:mainfrom
irodotos7:fix/compute-ami-inspector
Nov 16, 2026
Merged

fredpena merged 1 commit into
floci-io:mainfrom
irodotos7:fix/compute-ami-inspector

Conversation

@irodotos7

Copy link
Copy Markdown
Contributor

Summary

Selecting an AMI in the AWS Compute Cloud Explorer sent its id to DescribeInstances.
GET /api/clouds/aws/services/compute/resources/ami-... answered 404 The instance ID 'ami-...' does not exist for an AMI that is in the list, the frontend retried it once, and the inspector fell back to the list row.

  • AwsComputeAdapter.get looks an ami- id up in the same DescribeImages listing the row came from, and returns null (404) when it is not there.
  • It does not call DescribeImages with ImageIds: 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.
  • Instance ids take the same path as before.

Delete for AMIs is a separate problem, handled in #464; the two do not overlap.

Type of change

  • Bug fix (fix:)
  • New feature / service UI (feat:)
  • Breaking change (feat!: or fix!:)
  • Docs / chore

Area

  • Frontend (packages/frontend)
  • API / Cloud Proxy (packages/api)
  • Cloud Explorer adapter / schema
  • Build / CI / Docker

Verification

AWS EC2 via Floci core built from floci-io/floci main at 0eef65385, EC2 mock mode, in-memory storage.
Fixture: an instance and an AMI created from it with CreateImage.

Request main this branch
GET .../compute/resources/<own AMI> 404 The instance ID 'ami-...' does not exist 200 type: image with architecture, owner, root device
GET .../compute/resources/<unknown AMI> 404 404 resource_not_found
GET .../compute/resources/<instance> 200 200
Select the AMI in Chrome (1440x1000) two 404s, inspector shows the list row one 200

AwsComputeAdapter.test.ts adds two cases (an AMI is found in the listing without calling DescribeInstances; an unlisted AMI is null); the first fails on main.

Checklist

  • pnpm lint, pnpm type-check, pnpm test, and pnpm build pass locally (API 2,797 pass, frontend 305 pass)
  • New or updated tests added where it makes sense (bun test in packages/api)
  • No fake/mock data added - unwired states stay empty or show an explicit placeholder
  • Commit messages / PR title follow Conventional Commits
  • Layout or look-and-feel changes close an issue that came from an accepted Discussion (UI and Design Changes), or this PR has none (new services through the existing views, bug fixes that restore the intended layout, and accessibility fixes are exempt)
  • I have no more than 2 open, non-draft pull requests and no more than 4 open pull requests in total (drafts included) in this repository (maintainers and dependency bots are exempt).

…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.
@greptile-apps

greptile-apps Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge.

Summary

AMI inspection now finds the requested image in listAmis() instead of sending its ID to describeInstance.

  • AWS Compute inspection finds AMIs in the image listing.

The requested greptile_confidence label could not be added because GitHub credentials are unavailable.

Reviews (1) · Last reviewed commit: "fix(compute): inspect AMIs from the imag..." · Reviewed by Greptile

@fredpena

Copy link
Copy Markdown
Contributor

Thank you @irodotos7

No blockers from my side.

@fredpena
fredpena merged commit 860b222 into floci-io:main Nov 16, 2026
8 checks passed
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.

2 participants