az storage blob upload-batch flag --if-unmodified-since being ignored due to ModuleNotFoundError under storagev2 #28153
Labels
Auto-Assign
Auto assign by bot
Azure CLI Team
The command of the issue is owned by Azure CLI team
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Installation
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Storage
az storage
Milestone
Describe the bug
Following https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-macos
For M1 macintosh az is not installed by brew in /opt/homebrew/bin/az per web instructions
I have Python 3.10.10 and az version 2.55 under
$HOMEDIR/miniconda3/bin as the base install before anything is defined.
I expected when I ran my command to upload-batch files from a local directory that the flag
--if-unmodified-since
would not go through the list of previously loaded files based on a timestamp that is one day past the last file transfer.It appears that it is being ignored because it can't find the path to the models in Python 3.10 or 3.11 and I get variations on
ModuleNotFoundError: No module named
For Python 3.10 I get
ModuleNotFoundError: No module named 'azure.multiapi.storagev2.blob.v2022_11_02.file'
For env
CONDA_PYTHON_EXE=$HOME/miniconda3/bin/python
PYTHONPATH=/opt/homebrew/bin/python3.10:$HOME/miniconda3/bin/python
I do have the directory under blob as $HOME/miniconda3/lib/python3.10/site-packages/azure/multiapi/storagev2/blob/v2022_11_02 -- see env and version info below.
Thanks,
Heidi
Related command
AZURE_CLI_DISABLE_CONNECTION_VERIFICATION=1; az storage blob upload-batch --destination $DESTDIR --account-name $STORAGE_BUCKET --source $SOURCE_DIR --sas-token "$SAS_TOKEN" --if-unmodified-since 2023-12-31T12:59:59Z --debug
Errors
and
Issue script & Debug output
I obscured the values for the flags, the hostname in the url, sas token and left the rest of the debug information.
Expected behavior
The behavior I was hoping for was the command to return with no new files to be loaded and the previous loaded files would not be pre-processed again with
ErrorCode:BlobAlreadyExists
Is there a test I can run to see if the erroring modules are imported properly?
Thanks! Heidi
Environment Summary
and in the miniconda base the pip list includes the following azure modules
and in the Python 3.10 site-packages under storagev2/blob/v2022_11_02 directory
Additional context
No response
The text was updated successfully, but these errors were encountered: