Open kf6kjg opened 1 year ago
Working on a PR anyway. hotpatching my local install isn't viable for what I'm working on.
Note: I found a different way to solve my core issue - I shrunk the managed disks by copying to new smaller disks since the source disks were only ~5% full. This allowed me to just use azcopy since I didn't need to pipe the file through gzip. Thus I'm leaving this issue and PR #145 here, but I'm stepping away from maintaining them. :/
Problem Description
When given a SAS URL from the command
az disk grant-access
a ValueError is raised:ValueError: Invalid derived mode from --storage-url: z31
Steps to Reproduce
And at this point I'm breaking from your template because I've already found the code that's problematic.
Resulting error
Expected Result
The file to upload, barring other issues outside the scope of this tool.
Problematic code
See https://github.com/Azure/blobxfer/blob/0ac1212326a43dfd6cb2b8525ff95f1c4ae540af/blobxfer/util.py#LL343C5-L343C12
The format of the SAS URL coming from the one instance of
az disk grant-access
that I've been working with is:As you can see, this results in the code below incorrectly assuming the mode is in the second-from-the-left subdomain. A better assumption would be that the mode is in the 4th from the right.
My barely-adequate knowledge of snakelang and, more importantly, limited time and knowledge of your code base and practices leaves me with raising this issue ticket instead of a PR. :)