Skip to content

Conversation

@mergify
Copy link

@mergify mergify bot commented Jan 13, 2026

Summary of your changes

some aws asset discovery fetchers are not sending data due to an early return

any usage of the underlining multi region selector that returns early when it has an error, should instead check the results length, which we do in some cases:

policies, err := i.provider.GetPolicies(ctx)
if err != nil {
i.logger.Errorf("Could not list policies: %v", err)
if len(policies) == 0 {
return
}
awslib.ReportMissingPermission(i.statusHandler, err)
}

but this is the same as just removing the return, which is what this PR does for the rest of the fetchers

Related Issues

  • TODO

This is an automatic backport of pull request #3852 done by [Mergify](https://mergify.com).

### Summary of your changes

some aws asset discovery fetchers are not sending data due to an early
return

any usage of the underlining multi region selector that returns early
when it has an error, should instead check the results length, which we
do in some cases:

https://github.com/elastic/cloudbeat/blob/0d86b968927fd05a886ff71dc9b9c0f98cb9a7b0/internal/inventory/awsfetcher/fetcher_iam_policy.go#L58-L65

but this is the same as just removing the `return`, which is what this
PR does for the rest of the fetchers

### Related Issues

- TODO

(cherry picked from commit 07423da)
@mergify mergify bot added the backport label Jan 13, 2026
@mergify mergify bot requested a review from a team as a code owner January 13, 2026 17:07
@mergify mergify bot assigned orouz Jan 13, 2026
vpc:
# Don't change vpc settings
id: "vpc-6cb55a15" # (optional, must match VPC ID used for each subnet below)
id: "vpc-6cb55a15" # (optional, must match VPC ID used for each subnet below)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@orouz orouz merged commit 97113ac into 9.3 Jan 14, 2026
9 checks passed
@orouz orouz deleted the mergify/bp/9.3/pr-3852 branch January 14, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants