Repository navigation
Migrate to AWS library to v2 - #6671
Conversation
8174125 to
407a116
Compare
3d387e7 to
27dc626
Compare
wallrj
left a comment
There was a problem hiding this comment.
Thanks Tim,
I asked a couple of questions below.
|
/retest |
wallrj
left a comment
There was a problem hiding this comment.
I think the modified unit test for removeReqID is wrong:
Signed-off-by: Tim Ramlot <[email protected]>
Signed-off-by: Tim Ramlot <[email protected]>
Signed-off-by: Tim Ramlot <[email protected]>
Signed-off-by: Tim Ramlot <[email protected]>
Signed-off-by: Tim Ramlot <[email protected]>
| // we have a non-nil error coming from an aws-sdk-go func. The passed error | ||
| // is modified in place. This function does not work in case the full error | ||
| // message is pre-generated at construction time (instead of when Error() is | ||
| // called), which is the case for eg. fmt.Errorf("error message: %w", err). |
There was a problem hiding this comment.
As far as I know it creates a new error with an Unwrap method that allows the underlying error to be accessed.
Perhaps I misunderstood how %w works.
There was a problem hiding this comment.
This is the message string that is created when you call the function: https://cs.opensource.google/go/go/+/refs/tags/go1.22.0:src/fmt/errors.go;l=55
If you change the wrapped error afterwards, the message will still be the same.
There was a problem hiding this comment.
Ah, I think I understand. I hadn't looked at the implementation of fmt.Errorf until now.
And I see that it sets the error message string when it is called, so any subsequent changes to the wrapped error are not reflected in the error string....like you said in that comment:
| // we have a non-nil error coming from an aws-sdk-go func. The passed error | ||
| // is modified in place. This function does not work in case the full error | ||
| // message is pre-generated at construction time (instead of when Error() is | ||
| // called), which is the case for eg. fmt.Errorf("error message: %w", err). |
There was a problem hiding this comment.
Ah, I think I understand. I hadn't looked at the implementation of fmt.Errorf until now.
And I see that it sets the error message string when it is called, so any subsequent changes to the wrapped error are not reflected in the error string....like you said in that comment:
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wallrj The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Migrate from
github.com/aws/aws-sdk-gotogithub.com/aws/aws-sdk-go-v2.Fixes CVE alerts in the
.trivyignorefile.Kind
/kind cleanup
Release Note