Conversation
❌ 2 Tests Failed:
View the top 2 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
remyleone
marked this pull request as ready for review
July 2, 2026 15:45
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new CLI command, scw account project list-resources, intended to list a project’s resources across zones/regions by calling multiple product APIs and aggregating the results into a unified fetch.ResourceResult view.
Changes:
- Added
account project list-resourcescommand implementation (zone/region de-duplication, concurrency limiting, sorting, and output view). - Introduced a new
internal/fetchabstraction plus many per-product “custom fetcher” implementations to list resources per service. - Added documentation and usage golden test fixtures for the new command.
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/namespaces/account/v3/custom.go | Registers the new list-resources command under account project. |
| internal/namespaces/account/v3/custom_list_resources.go | Implements the new command, including fetcher registry, concurrency, de-duplication, and sorting. |
| internal/namespaces/account/v3/custom_list_resources_test.go | Adds unit tests for helper functions (query key building, resolvers, sorting). |
| internal/fetch/fetch.go | Adds generic/non-generic fetcher abstractions, result type, and error-ignoring helper. |
| internal/namespaces/instance/v1/custom_fetcher.go | Adds instance resource fetchers (servers, IPs, volumes, snapshots). |
| internal/namespaces/baremetal/v1/custom_fetcher.go | Adds baremetal server fetcher. |
| internal/namespaces/applesilicon/v1alpha1/custom_fetcher.go | Adds Apple Silicon server fetcher. |
| internal/namespaces/block/v1alpha1/custom_fetcher.go | Adds block volumes and snapshots fetchers. |
| internal/namespaces/object/v1/custom_fetcher.go | Adds S3-based bucket listing fetcher for Object Storage. |
| internal/namespaces/ipam/v1/custom_fetcher.go | Adds IPAM IP listing fetcher. |
| internal/namespaces/vpc/v2/custom_fetcher.go | Adds VPC listing fetcher. |
| internal/namespaces/vpcgw/v2/custom_fetcher.go | Adds VPC Gateway and Gateway IPs fetchers. |
| internal/namespaces/lb/v1/custom_fetcher.go | Adds load balancer listing fetcher. |
| internal/namespaces/k8s/v1/custom_fetcher.go | Adds Kubernetes cluster listing fetcher. |
| internal/namespaces/redis/v1/custom_fetcher.go | Adds Redis cluster listing fetcher. |
| internal/namespaces/rdb/v1/custom_fetcher.go | Adds RDB instance listing fetcher. |
| internal/namespaces/mongodb/v1alpha1/custom_fetcher.go | Adds MongoDB instance and snapshot listing fetchers. |
| internal/namespaces/registry/v1/custom_fetcher.go | Adds registry namespace listing fetcher. |
| internal/namespaces/container/v1/custom_fetcher.go | Adds container namespace listing fetcher. |
| internal/namespaces/function/v1beta1/custom_fetcher.go | Adds function namespace listing fetcher. |
| internal/namespaces/secret/v1beta1/custom_fetcher.go | Adds secret listing fetcher. |
| internal/namespaces/key_manager/v1alpha1/custom_fetcher.go | Adds key manager key listing fetcher. |
| internal/namespaces/file/v1alpha1/custom_fetcher.go | Adds file system listing fetcher. |
| internal/namespaces/webhosting/v1/custom_fetcher.go | Adds webhosting hosting listing fetcher. |
| internal/namespaces/inference/v1/custom_fetcher.go | Adds inference deployment listing fetcher. |
| internal/namespaces/cockpit/v1/custom_fetcher.go | Adds cockpit token and datasource listing fetchers. |
| internal/namespaces/flexibleip/v1alpha1/custom_fetcher.go | Adds flexible IP listing fetcher. |
| internal/namespaces/searchdb/v1alpha1/custom_fetcher.go | Adds SearchDB deployment listing fetcher. |
| docs/commands/account.md | Documents the new account project list-resources command. |
| cmd/scw/testdata/test-all-usage-account-project-usage.golden | Updates account project usage listing to include list-resources. |
| cmd/scw/testdata/test-all-usage-account-project-list-resources-usage.golden | Adds the usage golden file for account project list-resources. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
scw account project list-resources-> helpful if you context is a given project and you would like to understand what is inside