Code to set prefix mode based on account type#11
Conversation
saxenapranav
left a comment
There was a problem hiding this comment.
LGTM! Thanks for taking previous comments.
As discussed, we dont need to do getAcl and setAcl because they are required to fail in non-hns. At present as well it gives 400.
| throw ex; | ||
| } | ||
| } | ||
| if (!isNamespaceEnabled && uri.toString().contains(FileSystemUriSchemes.WASB_DNS_PREFIX)) { |
There was a problem hiding this comment.
Is the value of isNamespaceEnabled getting initialized anywhere before the getIsNamespaceEnabled call happens?
There was a problem hiding this comment.
This is the first call to determine, it's not getting called before this.
|
+1, approving! |
| abfsUriQueryBuilder.addQuery(QUERY_FS_ACTION, rwx); | ||
| appendSASTokenToQuery(path, SASTokenProvider.CHECK_ACCESS_OPERATION, abfsUriQueryBuilder); | ||
| URL url = createRequestUrl(path, abfsUriQueryBuilder.toString()); | ||
| final URL url = createRequestUrl(path, abfsUriQueryBuilder.toString()); |
There was a problem hiding this comment.
lets check if if blob endpoint API and dfs endpoint API gives same exception -> statusCode, exceptionMessage.
There was a problem hiding this comment.
2023-04-02 22:49:55,061 DEBUG [JUnit-testFsActionEXECUTE]: services.AbfsIoUtils (AbfsIoUtils.java:dumpHeadersToDebugLog(64)) - HTTP Response=HTTP/1.1 403 This request is not authorized to perform this operation using this permission.
The status code for blob endpoint is 403
There was a problem hiding this comment.
The response code and message is same for both blob and dfs endpoint.
Code to set prefix mode based on account type #11
…ements_pr_review Abfs 3.3.2 dev rename improvements pr review
The code changes made are :-
If the account is FNS and has blob endpoint in uri, set the prefix mode to BLOB.
For other API's change the blob endpoint to dfs endpoint