Add ECS management source detection and improve container tracking - #86
Merged
Conversation
Implements full ECS container visualization with a new "managed by" concept that supports multiple management sources (Terraform, GitHub Actions, unmanaged). Backend changes: - Add ManagedBy enum and managed_by field to ECS schemas and database model - Add image_tag field to ECSContainer for CI/CD deployment detection - Add management source detection in ECS collector using image tag patterns (git SHA, semver) and resource tags (deployed-by, managed-by) - Add /ecs/summary API endpoint for dashboard counts - Update topology endpoint to include all ECS containers (not just TF-managed) with managed_by field - Update resource sync to persist managed_by and image_tag fields - Add ECS read permissions to IAM task role policy Frontend changes: - Create ManagedByBadge component with Terraform/GitHub Actions/Unmanaged states - Add ManagedBy type and ECSSummaryResponse to TypeScript types - Update ECS list page and detail panels to use ManagedByBadge - Add ECS Containers entry to sidebar navigation - Add /ecs route to App.tsx router - Add ECS summary card to dashboard with cluster/task counts - Update topology ECS node to show TF/GHA badge based on managed_by - Add useECSSummary hook and getECSSummary API function https://claude.ai/code/session_016ZmpvrW3h5SFZ3LGyRPXCr
🐳 Docker Build Results
|
- Add ECSListPage mock to App.test.tsx vi.mock("@/pages")
- Add useECSSummary mock to Dashboard.test.tsx vi.mock("@/hooks")
- Fix Prettier formatting in ManagedByBadge.tsx
https://claude.ai/code/session_016ZmpvrW3h5SFZ3LGyRPXCr
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
This PR enhances ECS container tracking by detecting and displaying the management source (Terraform, GitHub Actions, or unmanaged) for each container. It also adds a new ECS summary endpoint and improves the frontend UI with dedicated ECS list page and management badges.
Key Changes
Backend
managed_byfield toECSContainermodel to track whether containers are managed by Terraform, GitHub Actions, or unmanaged_detect_managed_by()method that identifies CI/CD deployments based on:deployed-by,managed-by)/ecs/summaryendpoint returning cluster count, task counts by status, and total tasksimage_tagandmanaged_bycolumns toECSContainertableFrontend
ManagedByBadgecomponent replacingTerraformBadgewith support for:ManagedBytype and updated all ECS-related interfacesInfrastructure
Implementation Details
managed_byvalue for backward compatibilityimage:tag)https://claude.ai/code/session_016ZmpvrW3h5SFZ3LGyRPXCr