Add EKS container host in ContainerCredentialsProvider , also validate the resolved endpoint for RelativeURI#4695
Merged
Conversation
…e the resolved endpoint for RelativeURI
b7ea4dd to
ad6d6cb
Compare
dagnir
reviewed
Nov 15, 2023
Comment on lines
+240
to
+243
| if (!Files.exists(path)) { | ||
| throw SdkClientException.create( | ||
| String.format("Failed to read authorization token from '%s': no such file or directory", filePath)); | ||
| } |
Contributor
There was a problem hiding this comment.
I don't think this check is necessary; it's also not atomic since the file could exist during this check but not exist when we try to run it. Can we just to Files.readAllBytes below and catch the exception for file not exists?
Contributor
Author
There was a problem hiding this comment.
The Specs mentioned
"reason": "failed to read authorization token from '/full/path/to/token/file': no such file or directory"
Thus I had added this specific case.
But , I think we can let user use the sdkException.getCause() which will give NoSuchFileException. Updated the code
Contributor
There was a problem hiding this comment.
Gotcha. I think without this change, we will still meet that requirement
|
Kudos, SonarCloud Quality Gate passed! |
dagnir
approved these changes
Nov 16, 2023
aws-sdk-java-automation
added a commit
that referenced
this pull request
Jan 27, 2026
…d93dc17b1 Pull request: release <- staging/064f0d85-e0a4-4c4b-b942-fdfd93dc17b1
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.
Motivation and Context
Modifications
Testing
Screenshots (if appropriate)
Types of changes
License