Skip to content

fix(azure): handle DatastoreType ImportError from azure-ai-ml>=1.33.0#4187

Open
Vitaliy-Pikalo wants to merge 2 commits into
microsoft:mainfrom
Vitaliy-Pikalo:patch-1
Open

fix(azure): handle DatastoreType ImportError from azure-ai-ml>=1.33.0#4187
Vitaliy-Pikalo wants to merge 2 commits into
microsoft:mainfrom
Vitaliy-Pikalo:patch-1

Conversation

@Vitaliy-Pikalo

@Vitaliy-Pikalo Vitaliy-Pikalo commented Jun 21, 2026

Copy link
Copy Markdown

Description

azure-ai-ml 1.33.0 removed the private module azure.ai.ml._restclient.v2022_10_01, causing a ModuleNotFoundError when importing DatastoreType in two files:

  • promptflow/azure/_storage/blob/client.py
  • promptflow/azure/operations/_artifact_utilities.py

Fix: wrap the import in a try/except ImportError and fall back to a locally-defined DatastoreType class. The string values are stable Azure REST API constants unchanged across versions.

Fixes #4176.

All Promptflow Contribution checklist:

  • The pull request does not introduce [breaking changes].
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.
  • I confirm that all new dependencies are compatible with the MIT license.

… (blob/client.py)

Handle ImportError for DatastoreType and define constants locally.
… (_artifact_utilities.py)

Handle ImportError for DatastoreType and define constants locally if the import fails.
@Vitaliy-Pikalo

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

Hi, thank you for your interest in helping to improve the prompt flow experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment.

@github-actions github-actions Bot added the no-recent-activity There has been no recent activity on this issue/pull request label Jul 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external no-recent-activity There has been no recent activity on this issue/pull request promptflow-azure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] promptflow-azure fails with azure-ai-ml 1.33.0 due to private DatastoreType import

1 participant