Skip to content

Conversation

@pjbull
Copy link
Member

@pjbull pjbull commented Oct 12, 2024

Issues #470 and #476 report problems with credentials being used that cannot determine if HNS is enabled on the storage account.

This fix does two things:

  • First, we only create a new credential if it is of the type in _shared that is implemented in both libraries (SharedKeyCredentialPolicy). Other kinds of credentials are properly isolated to a shared underlying library in the Azure SDK codebase.
  • Second, if the call to get_account_information results in ResourceNotFound, which indicates the credential does not have permission to get this metadata, we fall back to trying to see if the root dir in the container exists and has hdi_folder=True which should only be the case when HNS is enabled.

Closes #470

@github-actions
Copy link
Contributor

github-actions bot commented Oct 12, 2024

@github-actions github-actions bot temporarily deployed to pull request October 12, 2024 21:48 Inactive
@codecov
Copy link

codecov bot commented Oct 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.2%. Comparing base (8207b3d) to head (5a6f116).
Report is 1 commits behind head on master.

Additional details and impacted files
@@          Coverage Diff           @@
##           master    #478   +/-   ##
======================================
  Coverage    94.2%   94.2%           
======================================
  Files          23      23           
  Lines        1745    1753    +8     
======================================
+ Hits         1645    1653    +8     
  Misses        100     100           
Files with missing lines Coverage Δ
cloudpathlib/azure/azblobclient.py 96.9% <100.0%> (+0.1%) ⬆️
cloudpathlib/azure/azblobpath.py 93.6% <100.0%> (ø)

@github-actions github-actions bot temporarily deployed to pull request October 12, 2024 23:40 Inactive
@github-actions github-actions bot temporarily deployed to pull request October 12, 2024 23:48 Inactive
@github-actions github-actions bot temporarily deployed to pull request October 13, 2024 05:28 Inactive
@github-actions github-actions bot temporarily deployed to pull request October 14, 2024 04:19 Inactive
@pjbull pjbull requested a review from jayqi October 14, 2024 05:55
@github-actions github-actions bot temporarily deployed to pull request October 17, 2024 17:49 Inactive
@github-actions github-actions bot temporarily deployed to pull request October 17, 2024 18:52 Inactive
Copy link
Member

@jayqi jayqi left a comment

Choose a reason for hiding this comment

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

@pjbull looks good except for how this is documented in the changelog. I don't need to review again once you address that.

@github-actions github-actions bot temporarily deployed to pull request October 17, 2024 22:07 Inactive
@pjbull pjbull merged commit 68774bf into master Oct 18, 2024
@pjbull pjbull deleted the 476-azure-creds-adls branch October 18, 2024 16:41
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.

Detection of Azure hierarchical namespaces fails with ResourceNotFoundError

3 participants