dotnet/runtime · error · RuntimeError

Missing azure storage or identity packages.

Error message

Missing azure storage or identity packages.

What it means

Raised by upload_command in jitrollingbuild.py inside a bare try/except wrapping `from azure.storage.blob import ...` and `from azure.identity import AzureCliCredential`. If either import fails, the except block logs install hints and raises this error. Upload requires the Azure SDK packages to authenticate and write blobs.

Solutions

  1. Install both packages: `pip install azure-storage-blob azure-identity`.
  2. Confirm you are installing into the same interpreter that runs the script (`python -m pip install ...` or `py -3 -m pip install ...` on Windows).
  3. Activate the correct virtualenv before re-running upload.

Example fix

// before
python jitrollingbuild.py upload -git_hash abc   # 'Missing azure storage or identity packages.'
// after
python -m pip install azure-storage-blob azure-identity
python jitrollingbuild.py upload -git_hash abc
Defensive patterns

Strategy: validation

Validate before calling

import importlib.util
for mod in ("azure.storage.blob", "azure.identity"):
    if importlib.util.find_spec(mod) is None:
        raise SystemExit(f"Missing {mod}; run: pip install azure-storage-blob azure-identity")

Prevention

When it happens

Trigger: Running `jitrollingbuild.py upload` in a Python environment that lacks azure-storage-blob or azure-identity, or where they are installed in a different interpreter than the one running the script.

Common situations: Fresh checkout without pip-installing dependencies; using the system python3 while packages were pip-installed for a venv; CI image missing the Azure SDK.

Related errors


AI-assisted analysis of dotnet/runtime@60108ba66e (2026-08-10). Data as JSON: /api/errors/0a26ec1bcc2cf8b8. Report an issue: GitHub.

Appendix: source

Thrown at src/coreclr/scripts/jitrollingbuild.py:467

                logging.warning("Couldn't find any JIT changes! Just using the argument git_hash")
            else:
                jit_git_hash = change_list_hashes[0]
                logging.info("Using git_hash {}".format(jit_git_hash))

    logging.info("Uploading:")
    for item in files:
        logging.info("  {}".format(item))

    try:
        from azure.storage.blob import BlobServiceClient
        from azure.identity import AzureCliCredential

    except:
        logging.warning("Please install:")
        logging.warning("  pip install azure-storage-blob")
        logging.warning("  pip install azure-identiy")
        logging.warning("See also https://learn.microsoft.com/azure/storage/blobs/storage-quickstart-blobs-python")
        raise RuntimeError("Missing azure storage or identity packages.")

    default_credential = AzureCliCredential()

    blob_service_client = BlobServiceClient(account_url=az_blob_storage_account_uri, credential=default_credential)
    blob_folder_name = "{}/{}/{}/{}/{}".format(az_builds_root_folder, jit_git_hash, coreclr_args.host_os, coreclr_args.arch, coreclr_args.build_type)

    total_bytes_uploaded = 0

    # Should we compress the JIT on upload? It would save space, but it makes it slightly more complicated to use
    # because you can't just "wget" or otherwise download the file and use it immediately -- you need to unzip first.
    # So for now, don't compress it.
    compress_jit = False

    with TempDir() as temp_location:
        for file in files:
            if compress_jit:
                # Zip compress the file we will upload
                zip_name = os.path.basename(file) + ".zip"

View on GitHub (pinned to 60108ba66e)