Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add time-bounded contexts to AWS API calls #35425

Merged
merged 8 commits into from
May 16, 2023

Conversation

girodav
Copy link
Contributor

@girodav girodav commented May 11, 2023

What does this PR do?

This PR adds a time-limit to each AWS API call that is used in metricbeat

Why is it important?

Two main reasons:

  • If we encounter a failure in any API we call, we should fail fast.
  • Some non-blocking APIs (e.g GetResourceTags) might not work in specific environments (e.g private subnets) and may delay or block the data collection.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Related issues

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label May 11, 2023
@girodav girodav added the Team:Cloud-Monitoring Label for the Cloud Monitoring team label May 11, 2023
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label May 11, 2023
@mergify
Copy link
Contributor

mergify bot commented May 11, 2023

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @girodav? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@elasticmachine
Copy link
Collaborator

elasticmachine commented May 11, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-05-15T16:48:47.080+0000

  • Duration: 77 min 34 sec

Test stats 🧪

Test Results
Failed 0
Passed 1465
Skipped 110
Total 1575

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@girodav girodav force-pushed the aws-add-context-with-timeout branch from f69a64f to 7f8c45c Compare May 11, 2023 15:48
@girodav girodav marked this pull request as ready for review May 12, 2023 10:52
@girodav girodav requested a review from a team as a code owner May 12, 2023 10:52
Copy link
Contributor

@kaiyan-sheng kaiyan-sheng left a comment

Choose a reason for hiding this comment

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

Do we need to backport this fix into any branch?

@kaiyan-sheng kaiyan-sheng added the backport-v8.8.0 Automated backport with mergify label May 15, 2023
@girodav girodav added the backport-v8.7.0 Automated backport with mergify label May 16, 2023
@girodav girodav merged commit d0a51dc into elastic:main May 16, 2023
@girodav girodav deleted the aws-add-context-with-timeout branch May 16, 2023 13:02
mergify bot pushed a commit that referenced this pull request May 16, 2023
mergify bot pushed a commit that referenced this pull request May 16, 2023
girodav added a commit that referenced this pull request May 16, 2023
(cherry picked from commit d0a51dc)

Co-authored-by: Davide Girardi <[email protected]>
girodav added a commit that referenced this pull request May 16, 2023
(cherry picked from commit d0a51dc)

Co-authored-by: Davide Girardi <[email protected]>
@reakaleek reakaleek mentioned this pull request Jul 19, 2023
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.7.0 Automated backport with mergify backport-v8.8.0 Automated backport with mergify Team:Cloud-Monitoring Label for the Cloud Monitoring team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[AWS Metrics] Add timeout to AWS API calls
5 participants