TypeScript SDK: Fixes sharedKey signature creation for ADLS access #160
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.
Fixes a number of issues as reported yesterday in #159 with generating signatures when using shared key to access Azure Datalake Gen2 which in turn leads to all requests using the CDM ADLS adapter being denied.
401 Unauthorized Errors are not straightforward to recognize, as there seems to be unhandled promise rejections:
(node:24839) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'defaultShortestTimeWait' of undefined at defaultWaitTimeCallback (/Users/jho/BuildingMinds/BMCL_Adf/CDM/Typescript/bmcl_cdm/libs/CDM-master/objectModel/TypeScript/lib/Storage/NetworkAdapter.js:123:66) at CdmHttpClient.<anonymous> (/Users/jho/BuildingMinds/BMCL_Adf/CDM-Typescript/bmcl_cdm/libs/CDM-master/objectModel/TypeScript/lib/Utilities/Network/CdmHttpClient.js:106:48) at Generator.next (<anonymous>) at fulfilled (/Users/jho/BuildingMinds/BMCL_Adf/CDM-Typescript/bmcl_cdm/libs/CDM-master/objectModel/TypeScript/lib/Utilities/Network/CdmHttpClient.js:7:58) at process._tickCallback (internal/process/next_tick.js:68:7)
When debugging one quickly comes to a point where the builtin retry policy of the SDK reaches
the maximum number of retries (due to all requests being denied as unauthorized due to invalid signature). Future improvement to retry policy should probably exclude requests which result in 401/Unauthorized responses.