Skip to content

[8.19](backport #7919) [Asset Inventory][EC2] Add timeout handler to IAM resolver - #7922

Open
mergify[bot] wants to merge 1 commit into
8.19from
mergify/bp/8.19/pr-7919
Open

[8.19](backport #7919) [Asset Inventory][EC2] Add timeout handler to IAM resolver#7922
mergify[bot] wants to merge 1 commit into
8.19from
mergify/bp/8.19/pr-7919

Conversation

@mergify

@mergify mergify Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

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.


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

### 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.

(cherry picked from commit e1ea204)

# Conflicts:
#	internal/inventory/awsfetcher/fetcher_ec2_instance.go
@mergify
mergify Bot requested a review from a team as a code owner August 13, 2026 14:00
@mergify

mergify Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

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

@mergify

mergify Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

This pull request has not been merged yet. Could you please review and merge it @kubasobon? 🙏

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.

1 participant