Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): Fix "poetry could not find a pyproject.toml" in import lint workflow #3935

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kdestin
Copy link
Contributor

@kdestin kdestin commented Jan 22, 2025

Description

This pull request fixes an issue with the import lint PR workflow, which errors out with message:

Poetry could not find a pyproject.toml file in /home/runner/work/promptflow/promptflow or its parents

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.
  • Create an issue and link to the pull request to get dedicated review from promptflow team. Learn more: suggested workflow.

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.

         Option ordering seems to matter for poetry, which was trying
         to run the install before changing directories.
@kdestin kdestin requested a review from a team as a code owner January 22, 2025 19:43
@kdestin
Copy link
Contributor Author

kdestin commented Jan 22, 2025

Run fails with a separate error: https://github.com/microsoft/promptflow/actions/runs/12915843614/job/36018641808?pr=3935

  File "/home/runner/.cache/pypoetry/virtualenvs/promptflow-azure--uht9Cw5-py3.11/lib/python3.11/site-packages/azure/monitor/opentelemetry/_configure.py", line 25, in <module>
    from pkg_resources import iter_entry_points  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'pkg_resources'	

A fix for this might've landed in azure-monitor-opentelemetry might've landed in 1.6.4
but an overly restrictive version requirement on azure-monitor-opentelemetry-exporter
is forcing poetry to resolve to 1.4.2. PR with fix: Azure/azure-sdk-for-python#39354

@kdestin kdestin changed the title fix(ci): Fix import lint fix(ci): Fix "poetry could not find a pyproject.toml" in import lint workflow Jan 22, 2025
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