Skip to content

Update sample_routines_with_dispatch.py to demonstrate timer-triggere… - #48578

Open
Howie Leung (howieleung) wants to merge 1 commit into
feature/azure-ai-projects/vnextfrom
howie/dispatch
Open

Update sample_routines_with_dispatch.py to demonstrate timer-triggere…#48578
Howie Leung (howieleung) wants to merge 1 commit into
feature/azure-ai-projects/vnextfrom
howie/dispatch

Conversation

@howieleung

Copy link
Copy Markdown
Member

…d routines

Description

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.

All SDK 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.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
9 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@github-actions

Copy link
Copy Markdown
Contributor
[Pilot] PR Pipeline Failure Analysis

A CI pipeline failed on this pull request. Here is an automated analysis of what went wrong and how to get the build green.

What failed

Two checks failed on commit f86e328c805b54f8884f770c2574b50186fbe89b, both caused by the same root issue:

Root cause — validation: The apistub check for azure-ai-projects fails because sdk/ai/azure-ai-projects/azure/ai/projects/_patch.py does a top-level import httpx at module load time (line 15), but httpx is not installed in the apistub virtual environment. The apistub tool installs only the package's declared dependencies, and httpx is not among them (the installed openai dependency appears to have pulled in httpx2, not httpx). This causes a ModuleNotFoundError and aborts stub generation on both Python 3.10 and 3.12.

ModuleNotFoundError: No module named 'httpx'
  File "azure/ai/projects/_patch.py", line 15, in <module>
      import httpx

Recommended next steps

  • Option A (preferred): Ensure httpx is listed as an explicit package dependency in sdk/ai/azure-ai-projects/pyproject.toml (or setup.py/setup.cfg) so it is available at import time. Verify the installed openai version correctly brings in httpx (not just httpx2).
  • Option B: Move the import httpx inside the function(s) that use it (lazy import) so that the package can be imported without httpx present — this is necessary if httpx is only an optional dependency.
  • After fixing, re-run the apistub check locally: azpysdk apistub azure-ai-projects from the sdk/ai/azure-ai-projects directory.
  • See the CI troubleshooting guide: https://aka.ms/ci-fix
  • Push new commits to address the failures; this comment updates automatically on the next failing run.
Raw pipeline analysis (azsdk ci analyze)
Build: 6700148 Project: public
PipelineUrl: https://dev.azure.com/azure-sdk/public/_build/results?buildId=6700148

[azure-ai-projects :: apistub] Traceback (most recent call last):
  File "apistub/_stub_generator.py", line 369, in _generate_tokens
    module_obj = importlib.import_module(m)
  File "azure/ai/projects/__init__.py", line 25, in <module>
    from ._patch import patch_sdk as _patch_sdk
  File "azure/ai/projects/_patch.py", line 15, in <module>
    import httpx  # pylint: disable=networking-import-outside-azure-core-transport
ModuleNotFoundError: No module named 'httpx'

[ERROR] azure-sdk-tools: azure-ai-projects exited with error 1
Total checks: 1 | Failed: 1 | Worst exit code: 1
##[error]The process '.../venv-api-stub/bin/python' failed with exit code 1

Workflow: API.md Consistency  Status: completed  Conclusion: failure
  Url: https://github.com/Azure/azure-sdk-for-python/actions/runs/31738979206
  ModuleNotFoundError: No module named 'httpx'
  ##[error]Unhandled error: Error: Command failed: node .github/workflows/src/api-md-consistency/regenerate.js

Failing checks:
  consistency [FAILURE] https://github.com/Azure/azure-sdk-for-python/actions/runs/31738979206/job/94577402280
  python - pullrequest [FAILURE] https://dev.azure.com/azure-sdk/29ec6040-b234-4e31-b139-33dc4287b756/_build/results?buildId=6700148
  python - pullrequest (Build Extended) [FAILURE] https://dev.azure.com/azure-sdk/29ec6040-b234-4e31-b139-33dc4287b756/_build/results?buildId=6700148&view=logs&jobId=4259cd7e-6a4b-5ca5-581a-0ae020cd9d20

Copilot detected the failing pipeline and generated the analysis above. To have it attempt a fix automatically, reply with @copilot please fix the failing pipeline on this PR.

Generated by Pipeline Analysis - Next Steps · 30.2 AIC · ⌖ 6.41 AIC · ⊞ 6.6K ·

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants