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

fix(ec2-metadata-service): set timeout for requests #6072

Merged
merged 3 commits into from May 10, 2024

Conversation

siddsriv
Copy link
Contributor

@siddsriv siddsriv commented May 7, 2024

Issue

#6042

Description

set the timeout for requests to ec2-mds.

Testing

E2E tests for the package pass.

 PASS  src/MetadataService.e2e.spec.ts
  MetadataService E2E Tests
    ✓ should fetch metadata token successfully (6 ms)
    ✓ should fetch metadata successfully with token (4 ms)
    ✓ should fetch metadata successfully (without token -- disableFetchToken set to true) (2 ms)
    ✓ should handle TimeoutError by falling back to IMDSv1 (3 ms)
    ✓ should handle specific error codes by falling back to IMDSv1 (6 ms)
    ✓ should timeout as expected when a request exceeds the specified duration (4 ms)

Test Suites: 1 passed, 1 total
Tests:       6 passed, 6 total
Snapshots:   0 total
Time:        3.358 s, estimated 4 s
Ran all test suites.
Done in 4.34s.

Checklist

  • If you wrote E2E tests, are they resilient to concurrent I/O?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@siddsriv siddsriv requested a review from a team as a code owner May 7, 2024 20:50
@siddsriv siddsriv marked this pull request as draft May 7, 2024 20:50
@siddsriv siddsriv marked this pull request as ready for review May 8, 2024 20:08
@siddsriv siddsriv merged commit 8f310ec into aws:main May 10, 2024
5 checks passed
@siddsriv siddsriv deleted the mds-timeout branch May 16, 2024 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants