fix: ECS IMDS v2 to v1 fallback after token; enableIMDSv2=false - #47
Merged
Conversation
Also allow enableIMDSv2=false (or ALIBABA_CLOUD_ECS_IMDSV2_ENABLE=false) to skip the IMDSv2 probe on private clouds without hardening mode.
Codecov Report❌ Patch coverage is
❌ Your project status has failed because the head coverage (95.34%) is below the target coverage (99.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #47 +/- ##
============================================
- Coverage 95.36% 95.34% -0.02%
- Complexity 749 757 +8
============================================
Files 34 34
Lines 1983 1998 +15
============================================
+ Hits 1891 1905 +14
- Misses 92 93 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Review feedback: remove the newly added enable-V2 request switch. Always try IMDSv2 by default; on any V2-path failure (token or later metadata GET), fall back to IMDSv1 unless disableIMDSv1 is true.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
disableIMDSv1=false).disableIMDSv1=trueas fail-fast without V1 retry.