Skip to content

Code to set prefix mode based on account type#11

Merged
anmolanmol1234 merged 5 commits into
ABFS_3.3.2_mainfrom
common_code
Apr 3, 2023
Merged

Code to set prefix mode based on account type#11
anmolanmol1234 merged 5 commits into
ABFS_3.3.2_mainfrom
common_code

Conversation

@anmolanmol1234
Copy link
Copy Markdown
Collaborator

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

@anmolanmol1234 anmolanmol1234 self-assigned this Mar 28, 2023
@anmolanmol1234 anmolanmol1234 changed the title Common code Code to set prefix mode based on account type Mar 28, 2023
Copy link
Copy Markdown
Collaborator

@saxenapranav saxenapranav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the value of isNamespaceEnabled getting initialized anywhere before the getIsNamespaceEnabled call happens?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the first call to determine, it's not getting called before this.

@sreeb-msft
Copy link
Copy Markdown

+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());
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets check if if blob endpoint API and dfs endpoint API gives same exception -> statusCode, exceptionMessage.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The response code and message is same for both blob and dfs endpoint.

@saxenapranav saxenapranav self-requested a review March 31, 2023 04:34
Copy link
Copy Markdown
Collaborator

@saxenapranav saxenapranav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@anmolanmol1234 anmolanmol1234 merged commit 9dfb46a into ABFS_3.3.2_main Apr 3, 2023
anmolanmol1234 added a commit that referenced this pull request Apr 3, 2023
Code to set prefix mode based on account type #11
saxenapranav added a commit that referenced this pull request Jun 23, 2023
…ements_pr_review

Abfs 3.3.2 dev rename improvements pr review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants