Skip to content

fix(azure): update DatastoreType import - #4181

Closed
冯基魁 (fengjikui) wants to merge 1 commit into
microsoft:mainfrom
fengjikui:fix-azure-datastore-type-import
Closed

fix(azure): update DatastoreType import#4181
冯基魁 (fengjikui) wants to merge 1 commit into
microsoft:mainfrom
fengjikui:fix-azure-datastore-type-import

Conversation

@fengjikui

Copy link
Copy Markdown

Summary

  • Stop importing DatastoreType from the removed azure.ai.ml._restclient.v2022_10_01 namespace.
  • Add a small promptflow-azure compat module that uses the available v2022_10_01_preview namespace and falls back to the old namespace for older SDK layouts.
  • Update the two promptflow-azure call sites to share the compat import.

Fixes #4176.

Verification

  • uv run --with azure-ai-ml==1.33.0 python - <<'PY' ... verified the compat module resolves AzureBlob, AzureDataLakeGen2, and AzureFile under azure-ai-ml==1.33.0.
  • python3 -m py_compile src/promptflow-azure/promptflow/azure/_utils/_datastore_type.py src/promptflow-azure/promptflow/azure/operations/_artifact_utilities.py src/promptflow-azure/promptflow/azure/_storage/blob/client.py src/promptflow-azure/tests/sdk_cli_azure_test/unittests/test_blob_client.py
  • uvx black --check src/promptflow-azure/promptflow/azure/_utils/_datastore_type.py src/promptflow-azure/promptflow/azure/operations/_artifact_utilities.py src/promptflow-azure/promptflow/azure/_storage/blob/client.py src/promptflow-azure/tests/sdk_cli_azure_test/unittests/test_blob_client.py
  • git diff --check

I also tried the repository's poetry install --with ci,test from src/promptflow-azure, but dependency resolution did not complete locally after several minutes, so I kept local validation focused on the import compatibility path.

@fengjikui

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@github-actions

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 Jun 21, 2026
@fengjikui

Copy link
Copy Markdown
Author

Still active from my side. I rechecked that the PR is mergeable and the visible checks are green; happy to adjust if the DatastoreType compatibility import should follow a different preferred path.

@github-actions github-actions Bot removed the no-recent-activity There has been no recent activity on this issue/pull request label Jun 22, 2026
@github-actions

github-actions Bot commented Jul 7, 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 7, 2026
@fengjikui

Copy link
Copy Markdown
Author

Still active from my side. The visible checks are still green, and I am happy to rebase or adjust the compatibility import path if maintainers prefer a different approach.

@github-actions github-actions Bot removed the no-recent-activity There has been no recent activity on this issue/pull request label Jul 8, 2026
@github-actions

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 23, 2026
@fengjikui

Copy link
Copy Markdown
Author

Still active. I rechecked this against current main@3928a727b406e66d64ff42621534bb58e0ca18ce: both promptflow-azure call sites still import the removed azure.ai.ml._restclient.v2022_10_01 namespace.

Fresh validation on exact PR head 371fe67b1aa8e584f0a92dac68a815d2ad8b6232:

  • with azure-ai-ml==1.33.0, the old namespace raises ModuleNotFoundError, while the preview namespace and this compatibility shim load successfully with the expected datastore enum values;
  • the focused test_datastore_type_compat pytest passed (1 passed);
  • py_compile for all changed Python files and git diff --check origin/main...HEAD passed.

The PR remains mergeable, so no branch refresh appears necessary. Happy to adjust if maintainers prefer a different compatibility boundary.

@github-actions github-actions Bot removed the no-recent-activity There has been no recent activity on this issue/pull request label Jul 24, 2026
@github-actions

github-actions Bot commented Aug 8, 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 Aug 8, 2026
@fengjikui

Copy link
Copy Markdown
Author

Still active. The target branch is unchanged since the July 23 validation, the PR remains mergeable, and the visible checks are green. The two promptflow-azure call sites still need the compatibility import for current azure-ai-ml releases; happy to adjust if maintainers prefer a different boundary.

@github-actions github-actions Bot removed the no-recent-activity There has been no recent activity on this issue/pull request label Aug 9, 2026
@github-actions

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 Aug 24, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Hi, thank you for your contribution. Since there has not been recent engagement, we are going to close this out. Feel free to reopen if you'd like to continue working on these changes. Please be sure to remove the no-recent-activity label; otherwise, this is likely to be closed again with the next cleanup pass.

@github-actions github-actions Bot closed this Sep 1, 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