Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/run_and_upload_unit_tests/action.yml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PEP517 build of a dependency failed

Backend subprocess exited when trying to invoke get_requires_for_build_wheel

    | Command '['/var/folders/w0/cd8qgn052r16zsblrrxl1gxw0000gn/T/tmpdj847907/.venv/bin/python', '/Users/runner/work/_temp/poetry/home/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py', 'get_requires_for_build_wheel', '/var/folders/w0/cd8qgn052r16zsblrrxl1gxw0000gn/T/tmp57oskubd']' returned non-zero exit status 1.
    | 
    | Traceback (most recent call last):
    |   File "/Users/runner/work/_temp/poetry/home/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
    |     main()
    |   File "/Users/runner/work/_temp/poetry/home/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in main
    |     json_out["return_val"] = hook(**hook_input["kwargs"])
    |   File "/Users/runner/work/_temp/poetry/home/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel
    |     return hook(config_settings)
    |   File "/private/var/folders/w0/cd8qgn052r16zsblrrxl1gxw0000gn/T/tmpdj847907/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 333, in get_requires_for_build_wheel
    |     return self._get_build_requires(config_settings, requirements=[])
    |   File "/private/var/folders/w0/cd8qgn052r16zsblrrxl1gxw0000gn/T/tmpdj847907/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
    |     self.run_setup()
    |   File "/private/var/folders/w0/cd8qgn052r16zsblrrxl1gxw0000gn/T/tmpdj847907/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 520, in run_setup
    |     super().run_setup(setup_script=setup_script)
    |   File "/private/var/folders/w0/cd8qgn052r16zsblrrxl1gxw0000gn/T/tmpdj847907/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 317, in run_setup
    |     exec(code, locals())
    |   File "<string>", line 30, in <module>
    | ModuleNotFoundError: No module named 'pkg_resources'

Note: This error originates from the build backend, and is likely not a problem with poetry but one of the following issues with grpcio-tools (1.49.1)

  - not supporting PEP 517 builds
  - not specifying PEP 517 build requirements correctly
  - the build requirements are incompatible with your operating system or Python version
  - the build requirements are missing system dependencies (eg: compilers, libraries, headers).

You can verify this by running pip wheel --no-cache-dir --use-pep517 "grpcio-tools (==1.49.1)".

@dixonjoel @jfriedri-ni @mshafer-NI

Poetry is trying to rebuild grpcio-tools from source on macOS, and it's failing because setuptools v82.0.0 removed the pkg_resources module, which grpcio-tools v1.49.1's setup.py used: https://github.com/grpc/grpc/blob/v1.49.1/tools/distrib/python/grpcio_tools/setup.py

Locking package versions in poetry.lock should prevent upgrading setuptools, but maybe this is using an unlocked version of setuptools?

  • Our Poetry venv itself does not have a lock file
  • Perhaps PEP 517 builds are using unlocked setuptools?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, why are we rebuilding from source? Because grpcio-tools 1.49.1 has a binary wheel for macOS x64 and the GitHub-hosted runner is macOS arm64 now.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we have 3 options:

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ runs:
run: echo "osVersion=$ImageOS" >> "$GITHUB_ENV"
shell: bash
- name: Cache ${{ inputs.package-name }} virtualenv
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ${{ github.workspace }}/${{ inputs.package-basepath }}/${{ inputs.package-name }}/.venv
key: ${{ inputs.package-name }}-${{ runner.os }}-py${{ env.pythonVersion }}-${{ hashFiles(format('{0}/{1}/poetry.lock', inputs.package-basepath, inputs.package-name)) }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Check for lock changes
run: poetry check --lock
- name: Cache virtualenv
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ${{ github.workspace }}/tools/grpc_generator/.venv
key: grpc_generator-only-main-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('tools/grpc_generator/poetry.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Check for lock changes
run: poetry check --lock
- name: Cache virtualenv (with docs)
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ${{ github.workspace }}/${{ inputs.package-basepath }}/${{ inputs.package-name }}/.venv
key: ${{ inputs.package-name }}-with-docs-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles(format('{0}/{1}/poetry.lock', inputs.package-basepath, inputs.package-name)) }}
Expand Down
Loading