Skip to content

[Asset Inventory][EC2] Add timeout handler to IAM resolver - #7919

Merged
kubasobon merged 1 commit into
elastic:mainfrom
kubasobon:fix/timeout-iam-resolver
Aug 13, 2026
Merged

[Asset Inventory][EC2] Add timeout handler to IAM resolver#7919
kubasobon merged 1 commit into
elastic:mainfrom
kubasobon:fix/timeout-iam-resolver

Conversation

@kubasobon

@kubasobon kubasobon commented Aug 13, 2026

Copy link
Copy Markdown
Member

Summary of your changes

Add 10s timeout to GetInstanceProfile calls in EC2 instance fetcher

The IAM client uses the default HTTP transport with no timeout. If GetInstanceProfile hangs, the fetch loop blocks before sending any asset to the channel, so zero EC2 assets are published. Errors are already handled gracefully (falls back to the profile ARN), so a timeout is enough to resolve any issues.

Related Issues

Resolves error for integration tests.

@kubasobon
kubasobon requested a review from a team as a code owner August 13, 2026 13:00
@kubasobon kubasobon self-assigned this Aug 13, 2026
@kubasobon
kubasobon enabled auto-merge August 13, 2026 13:02
@kubasobon
kubasobon added this pull request to the merge queue Aug 13, 2026
@mergify

mergify Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

Merged via the queue into elastic:main with commit e1ea204 Aug 13, 2026
17 checks passed
@kubasobon
kubasobon deleted the fix/timeout-iam-resolver branch August 13, 2026 13:59
@github-actions

Copy link
Copy Markdown

@Mergifyio backport 9.5 9.4 8.19

@mergify

mergify Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

backport 9.5 9.4 8.19

✅ Backports have been created

Details

Cherry-pick of e1ea204 has failed:

On branch mergify/bp/9.4/pr-7919
Your branch is up to date with 'origin/9.4'.

You are currently cherry-picking commit e1ea204a.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   internal/inventory/awsfetcher/fetcher_ec2_instance.go

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

Cherry-pick of e1ea204 has failed:

On branch mergify/bp/8.19/pr-7919
Your branch is up to date with 'origin/8.19'.

You are currently cherry-picking commit e1ea204a.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   internal/inventory/awsfetcher/fetcher_ec2_instance.go

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

kubasobon added a commit that referenced this pull request Aug 17, 2026
…AM resolver (#7920)

### Summary of your changes

Add 10s timeout to `GetInstanceProfile` calls in EC2 instance fetcher

The IAM client uses the default HTTP transport with no timeout. If
`GetInstanceProfile` hangs, the fetch loop blocks before sending any
asset to the channel, so zero EC2 assets are published. Errors are
already handled gracefully (falls back to the profile ARN), so a timeout
is enough to resolve any issues.


### Related Issues

Resolves error for integration tests.

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

Co-authored-by: Kuba Soboń <wtty.fool@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants