-
Notifications
You must be signed in to change notification settings - Fork 2
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
S3UTILS-146: Recover from specific listing parsing errors #302
S3UTILS-146: Recover from specific listing parsing errors #302
Conversation
Hello tmacro,My role is to assist you with the merge of this Status report is not available. |
tests/unit/utils/safeList.js
Outdated
}); | ||
}); | ||
|
||
it('should pass through original error if the XML fails to parse', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you need a done
callback to make this test async as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
strangely it seems to work without, but I'll add one anyway for consistency.
* extractKeys - extract keys from data using the provided extractors | ||
* | ||
* @param {object} data - data to extract keys from | ||
* @param {object<string, Extractor>} keys - Mapping of keys to extractors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since Extractor
is a function type, we could want to document here what the function should take as arguments, and what it should return.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extractor
and ExtractResult
are defined above using JSDoc typdefs
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
|
tests/unit/utils/safeList.js
Outdated
{ | ||
description: 'should parse empty response', | ||
response: { | ||
ListVersionsResult: { | ||
Name: 'my-bucket', | ||
IsTruncated: false, | ||
MaxKeys: 1000, | ||
}, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a test with an empty response would make sense here, to make sure we respond correctly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (maybe you want to bump the version before merging?)
9c841bd
to
10e3739
Compare
10e3739
to
3f11858
Compare
/approve |
In the queueThe changeset has received all authorizations and has been added to the The changeset will be merged in:
The following branches will NOT be impacted:
There is no action required on your side. You will be notified here once IMPORTANT Please do not attempt to modify this pull request.
If you need this pull request to be removed from the queue, please contact a The following options are set: approve |
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
Please check the status of the associated issue S3UTILS-146. Goodbye tmacro. |
Adds a util function that will attempt to reparse a listing response to recover from specific errors.
If a value fails to parse (only timestamps and ints presently) then the original string value is returned.