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

tox -e generate fails #1334

Closed
ymotongpoo opened this issue Sep 15, 2022 · 2 comments
Closed

tox -e generate fails #1334

ymotongpoo opened this issue Sep 15, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@ymotongpoo
Copy link

Describe your environment

Automated GitHub Action task called generate and my local (M1 MBP, macOS 12.6 + Python 3.9.13 & 3.10.6)

Steps to reproduce
Describe exactly how to reproduce the error. Include a code sample if applicable.

  1. Run tox -e generate at the project root

What is the expected behavior?
What did you expect to see?

tox -e generate succeeds or fails with my relevant plugin (in my case, opentelemetry-instrumentation-grpc).

What is the actual behavior?
What did you see instead?

tox -e generate fails with irrelevant plugin. (opentelemetry-instrumentation-aio-pika)

Additional context

I am working on #1241 and first I thought this is just a flakiness of GitHub Action, but I reproduced the issue on my local environment and then I doublechecked the error message for the first time. Then I found that the issue sounds being caused by the incorrect configuration in opentelemetry-instrumentation-aio-pika.

Error messages from tox -e generate.

...(omit)...
Fixing /Users/yoshifumi/personal/opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-urllib/setup.py
Fixing /Users/yoshifumi/personal/opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-pyramid/setup.py
Fixing /Users/yoshifumi/personal/opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-dbapi/setup.py
Fixing /Users/yoshifumi/personal/opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-asgi/setup.py
Fixing /Users/yoshifumi/personal/opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-pymongo/setup.py
Fixing /Users/yoshifumi/personal/opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-grpc/setup.py
generate run-test: commands[1] | /Users/yoshifumi/personal/opentelemetry-python-contrib/scripts/generate_instrumentation_bootstrap.py
configuration error: `project.license` must be valid exactly by one definition (2 matches found):

    - keys:
        'file': {type: string}
      required: ['file']
    - keys:
        'text': {type: string}
      required: ['text']

Traceback (most recent call last):
  File "/Users/yoshifumi/personal/opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-aio-pika/setup.py", line 95, in <module>
    setuptools.setup(
  File "/Users/yoshifumi/personal/opentelemetry-python-contrib/.tox/generate/lib/python3.9/site-packages/setuptools/__init__.py", line 87, in setup
    return distutils.core.setup(**attrs)
  File "/Users/yoshifumi/personal/opentelemetry-python-contrib/.tox/generate/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 159, in setup
    dist.parse_config_files()
  File "/Users/yoshifumi/personal/opentelemetry-python-contrib/.tox/generate/lib/python3.9/site-packages/_virtualenv.py", line 21, in parse_config_files
    result = old_parse_config_files(self, *args, **kwargs)
  File "/Users/yoshifumi/personal/opentelemetry-python-contrib/.tox/generate/lib/python3.9/site-packages/setuptools/dist.py", line 868, in parse_config_files
    pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)
  File "/Users/yoshifumi/personal/opentelemetry-python-contrib/.tox/generate/lib/python3.9/site-packages/setuptools/config/pyprojecttoml.py", line 58, in apply_configuration
    config = read_configuration(filepath, True, ignore_option_errors, dist)
  File "/Users/yoshifumi/personal/opentelemetry-python-contrib/.tox/generate/lib/python3.9/site-packages/setuptools/config/pyprojecttoml.py", line 122, in read_configuration
    validate(subset, filepath)
  File "/Users/yoshifumi/personal/opentelemetry-python-contrib/.tox/generate/lib/python3.9/site-packages/setuptools/config/pyprojecttoml.py", line 47, in validate
    raise error from None
ValueError: invalid pyproject.toml config: `project.license`
Traceback (most recent call last):
  File "/Users/yoshifumi/personal/opentelemetry-python-contrib/scripts/generate_instrumentation_bootstrap.py", line 109, in <module>
    main()
  File "/Users/yoshifumi/personal/opentelemetry-python-contrib/scripts/generate_instrumentation_bootstrap.py", line 67, in main
    for pkg in get_instrumentation_packages():
  File "/Users/yoshifumi/personal/opentelemetry-python-contrib/scripts/otel_packaging.py", line 30, in get_instrumentation_packages
    out = subprocess.check_output(
  File "/Users/yoshifumi/.pyenv/versions/3.9.13/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/Users/yoshifumi/.pyenv/versions/3.9.13/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'python setup.py meta' returned non-zero exit status 1.
ERROR: InvocationError for command /Users/yoshifumi/personal/opentelemetry-python-contrib/scripts/generate_instrumentation_bootstrap.py (exited with code 1)
__________________________________________________________________________ summary ___________________________________________________________________________
ERROR:   generate: commands failed
@ymotongpoo ymotongpoo added the bug Something isn't working label Sep 15, 2022
@srikanthccv
Copy link
Member

@ymotongpoo sorry for the tooling issues, I have fixed this and many other things in #1330.

@srikanthccv
Copy link
Member

This is fixed on the main and shouldn't be an issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants