Merged
Conversation
… significantly improving collection speed
Contributor
|
Important Installation incomplete: to start using Gemini Code Assist, please ask the organization owner(s) to visit the Gemini Code Assist Admin Console and sign the Terms of Services. |
Reviewer's GuideThis PR removes goroutine-based worker pools and sync primitives from collector modules in favor of simple sequential loops, inlines and consolidates detail-fetching logic, updates AWS and AliCloud service client imports and initialization, and adds support for Cognito Identity Pools. Sequence diagram for detail aggregation after goroutine removalsequenceDiagram
participant Collector
participant AWSServiceClient
participant ResourceDetail
Collector->>AWSServiceClient: List resources (e.g., ListUsers)
AWSServiceClient-->>Collector: Return resource list
loop For each resource
Collector->>AWSServiceClient: Fetch details (e.g., list policies, tags)
AWSServiceClient-->>Collector: Return details
Collector->>ResourceDetail: Aggregate details
end
Collector->>ResourceDetail: Send aggregated detail to result channel
Class diagram for updated Cognito Identity Pool supportclassDiagram
class IdentityPoolDetail {
+IdentityPool: IdentityPoolShortDescription
+Tags: map[string]string
}
class CognitoIdentityPoolShortDescription {
<<external>>
}
IdentityPoolDetail --> CognitoIdentityPoolShortDescription: contains
Class diagram for refactored detail aggregation typesclassDiagram
class UserPoolDetail {
+UserPool: UserPoolDescriptionType
+UserPoolClients: []UserPoolClientDescription
+Users: []UserType
+Tags: map[string]string
}
class RoleDetail {
+Role: Role
+AttachedPolicies: []AttachedPolicy
+InlinePolicies: []string
+Tags: []Tag
}
class UserDetail {
+User: User
+AttachedPolicies: []AttachedPolicy
+InlinePolicies: []string
+MFADevices: []MFADevice
+AccessKeys: []AccessKeyMetadata
+LoginProfile: GetLoginProfileOutput
+Tags: []Tag
}
class PolicyDetail {
+Policy: Policy
+Version: PolicyVersion
+Tags: []Tag
}
class TableDetail {
+Table: TableDescription
+ContinuousBackups: ContinuousBackupsDescription
}
class LogGroupDetail {
+LogGroup: LogGroup
+MetricFilters: []MetricFilter
+ResourcePolicies: []ResourcePolicy
+Tags: map[string]string
}
class AlarmDetail {
+MetricAlarm: MetricAlarm
+Tags: []Tag
}
class FleetDetail {
+Fleet: Fleet
+Tags: []Tag
}
class RecorderDetail {
+Recorder: ConfigurationRecorder
+Status: ConfigurationRecorderStatus
+DeliveryChannel: DeliveryChannel
}
class SecretDetail {
+Secret: SecretListEntry
+Policy: map[string]interface
}
class SQSQueueDetail {
+Url: string
+Attributes: map[string]string
+Policy: map[string]interface
+Tags: map[string]string
}
class SNSTopicDetail {
+Topic: Topic
+Attributes: map[string]string
+Policy: map[string]interface
+Subscriptions: []Subscription
+Tags: []Tag
}
class DetectorDetail {
+Detector: Detector
+Administrator: Administrator
+Tags: map[string]string
}
class APIV2Detail {
+API: Api
+Stages: []Stage
+Authorizers: []Authorizer
+Tags: map[string]string
}
class ClusterDetail {
+Cluster: Cluster
+Services: []Service
+Tasks: []Task
}
class FunctionDetail {
+Function: FunctionConfiguration
+Policy: map[string]interface
+UrlConfigs: []FunctionUrlConfig
+Tags: map[string]string
}
class CertificateDetail {
+Certificate: CertificateDetail
+Tags: []Tag
}
class FirewallDetail {
+Firewall: Firewall
+FirewallStatus: FirewallStatus
+UpdateToken: string
}
class RuleGroupDetail {
+RuleGroupResponse: RuleGroupResponse
+UpdateToken: string
+RuleGroup: RuleGroup
}
class DomainDetail {
+DomainStatus: DomainStatus
}
class InstanceDetail {
+Instance: InstanceVO
+InstanceBaseInfo: InstanceBaseInfo
}
class BastionhostDetail {
+Instance: Instances
+InstanceAttribute: InstanceAttribute
}
class CoverageDetail {
+Coverage: CoveredResource
}
class ClassificationJobDetail {
+Job: JobSummary
+Tags: map[string]string
}
class FindingDetail {
+Finding: Finding
+Tags: map[string]string
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
jietian-sts
approved these changes
Sep 2, 2025
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.
Thank you for your contribution to CloudRec!
What About:
java)go)opa)Description:
fix: remove goroutine concurrency as it increased complexity without significantly improving collection speed
Summary by Sourcery
Remove unnecessary goroutine concurrency from multiple collector modules and simplify resource detail loops, add dedicated Cognito Identity Pool collector, and upgrade AliCloud SWAS client to the new swas-open-20200601 SDK with a helper initializer.
New Features:
Enhancements: