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

[CI][Python] Lint jobs are failing due to Cython #34513

Closed
raulcd opened this issue Mar 9, 2023 · 2 comments · Fixed by #34514
Closed

[CI][Python] Lint jobs are failing due to Cython #34513

raulcd opened this issue Mar 9, 2023 · 2 comments · Fixed by #34514

Comments

@raulcd
Copy link
Member

raulcd commented Mar 9, 2023

Describe the bug, including details regarding any error messages, version, and platform.

Since the cython lint was merged our PR lint jobs seem to be failing:

[1/1] cd /tmp/arrow-lint-r70so48y/cpp-build && /usr/local/bin/python /arrow/cpp/build-support/lint_cpp_cli.py /arrow/cpp/src
INFO:archery:Running Python linter (flake8)
INFO:archery:Running Cython linter (cython-lint)
/arrow/python/pyarrow/_acero.pyx:28:34: 'check_status' imported but unused
/arrow/python/pyarrow/_acero.pyx:32:29: 'field' imported but unused
Traceback (most recent call last):
  File "/usr/local/bin/archery", line 11, in <module>
    load_entry_point('archery', 'console_scripts', 'archery')()
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/arrow/dev/archery/archery/cli.py", line 301, in lint
    linter(src, fix, iwyu_all=iwyu_all, **checks)
  File "/arrow/dev/archery/archery/utils/lint.py", line 436, in linter
    results.extend(python_linter(src, fix=fix))
  File "/arrow/dev/archery/archery/utils/lint.py", line 259, in python_linter
    yield LintResult.from_cmd(cython_lint(*args))
  File "/arrow/dev/archery/archery/utils/command.py", line 89, in __call__
    return self.run(*argv, **kwargs)
  File "/arrow/dev/archery/archery/utils/command.py", line 78, in run
    return subprocess.run(invocation, **kwargs)
  File "/usr/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['cython-lint', '--no-pycodestyle', '/arrow/python/examples/plasma/sorting/multimerge.pyx', '/arrow/python/pyarrow/__init__.pxd', '/arrow/python/pyarrow/_acero.pxd', '/arrow/python/pyarrow/_acero.pyx', '/arrow/python/pyarrow/_compute.pxd', '/arrow/python/pyarrow/_compute.pyx', '/arrow/python/pyarrow/_csv.pxd', '/arrow/python/pyarrow/_csv.pyx', '/arrow/python/pyarrow/_cuda.pxd', '/arrow/python/pyarrow/_cuda.pyx', '/arrow/python/pyarrow/_dataset.pxd', '/arrow/python/pyarrow/_dataset.pyx', '/arrow/python/pyarrow/_dataset_orc.pyx', '/arrow/python/pyarrow/_dataset_parquet.pyx', '/arrow/python/pyarrow/_exec_plan.pyx', '/arrow/python/pyarrow/_feather.pyx', '/arrow/python/pyarrow/_flight.pyx', '/arrow/python/pyarrow/_fs.pxd', '/arrow/python/pyarrow/_fs.pyx', '/arrow/python/pyarrow/_gcsfs.pyx', '/arrow/python/pyarrow/_hdfs.pyx', '/arrow/python/pyarrow/_hdfsio.pyx', '/arrow/python/pyarrow/_json.pyx', '/arrow/python/pyarrow/_orc.pxd', '/arrow/python/pyarrow/_orc.pyx', '/arrow/python/pyarrow/_parquet.pxd', '/arrow/python/pyarrow/_parquet.pyx', '/arrow/python/pyarrow/_parquet_encryption.pxd', '/arrow/python/pyarrow/_parquet_encryption.pyx', '/arrow/python/pyarrow/_plasma.pyx', '/arrow/python/pyarrow/_pyarrow_cpp_tests.pxd', '/arrow/python/pyarrow/_pyarrow_cpp_tests.pyx', '/arrow/python/pyarrow/_s3fs.pyx', '/arrow/python/pyarrow/_substrait.pyx', '/arrow/python/pyarrow/array.pxi', '/arrow/python/pyarrow/benchmark.pxi', '/arrow/python/pyarrow/builder.pxi', '/arrow/python/pyarrow/compat.pxi', '/arrow/python/pyarrow/config.pxi', '/arrow/python/pyarrow/error.pxi', '/arrow/python/pyarrow/gandiva.pyx', '/arrow/python/pyarrow/includes/__init__.pxd', '/arrow/python/pyarrow/includes/common.pxd', '/arrow/python/pyarrow/includes/libarrow.pxd', '/arrow/python/pyarrow/includes/libarrow_cuda.pxd', '/arrow/python/pyarrow/includes/libarrow_dataset.pxd', '/arrow/python/pyarrow/includes/libarrow_dataset_parquet.pxd', '/arrow/python/pyarrow/includes/libarrow_feather.pxd', '/arrow/python/pyarrow/includes/libarrow_flight.pxd', '/arrow/python/pyarrow/includes/libarrow_fs.pxd', '/arrow/python/pyarrow/includes/libarrow_python.pxd', '/arrow/python/pyarrow/includes/libarrow_substrait.pxd', '/arrow/python/pyarrow/includes/libgandiva.pxd', '/arrow/python/pyarrow/includes/libplasma.pxd', '/arrow/python/pyarrow/io.pxi', '/arrow/python/pyarrow/ipc.pxi', '/arrow/python/pyarrow/lib.pxd', '/arrow/python/pyarrow/lib.pyx', '/arrow/python/pyarrow/memory.pxi', '/arrow/python/pyarrow/pandas-shim.pxi', '/arrow/python/pyarrow/public-api.pxi', '/arrow/python/pyarrow/scalar.pxi', '/arrow/python/pyarrow/serialization.pxi', '/arrow/python/pyarrow/table.pxi', '/arrow/python/pyarrow/tensor.pxi', '/arrow/python/pyarrow/tests/bound_function_visit_strings.pyx', '/arrow/python/pyarrow/tests/extensions.pyx', '/arrow/python/pyarrow/tests/pyarrow_cython_example.pyx', '/arrow/python/pyarrow/types.pxi']' returned non-zero exit status 1.

Component(s)

Continuous Integration, Python

@MarcoGorelli
Copy link
Contributor

I think it's just that when #14662 was merged, it hadn't been updated in a week, and so some other issues had crept in via other PRs

Was going to make a PR to fix it, but it looks like that's already happened, thanks!

@raulcd
Copy link
Member Author

raulcd commented Mar 9, 2023

Thanks @MarcoGorelli ! Yes, I've realised the change is quite minor so I pushed the PR! Thanks for adding the Cython linter!

raulcd added a commit that referenced this issue Mar 9, 2023
…inting failures (#34514)

### Rationale for this change

PR linting jobs are failing

### What changes are included in this PR?

Lint fixes :)

### Are these changes tested?

On CI

### Are there any user-facing changes?

No
* Closes: #34513

Authored-by: Raúl Cumplido <raulcumplido@gmail.com>
Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
@raulcd raulcd added this to the 12.0.0 milestone Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment