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

Unexpected logging output #2084

Closed
ptitzler opened this issue Aug 31, 2021 · 1 comment · Fixed by #2090
Closed

Unexpected logging output #2084

ptitzler opened this issue Aug 31, 2021 · 1 comment · Fixed by #2090
Assignees
Labels
kind:bug Something isn't working
Milestone

Comments

@ptitzler
Copy link
Member

Describe the issue

$ elyra-metadata list runtimes               
[I 2021-08-31 09:08:54,919.919] Generating grammar tables from /opt/anaconda3/envs/upstream/lib/python3.7/site-packages/blib2to3/Grammar.txt
[I 2021-08-31 09:08:54,943.943] Writing grammar tables to /Users/patti/Library/Caches/black/21.8b0/Grammar3.7.10.final.0.pickle
[I 2021-08-31 09:08:54,943.943] Writing failed: [Errno 2] No such file or directory: '/Users/patti/Library/Caches/black/21.8b0/tmp96ys8emh'
[I 2021-08-31 09:08:54,943.943] Generating grammar tables from /opt/anaconda3/envs/upstream/lib/python3.7/site-packages/blib2to3/PatternGrammar.txt
[I 2021-08-31 09:08:54,945.945] Writing grammar tables to /Users/patti/Library/Caches/black/21.8b0/PatternGrammar3.7.10.final.0.pickle
[I 2021-08-31 09:08:54,945.945] Writing failed: [Errno 2] No such file or directory: '/Users/patti/Library/Caches/black/21.8b0/tmproc0yvz4'
Available metadata instances for runtimes (includes invalid):
...

To Reproduce
Steps to reproduce the behavior:

  1. Run one of the elyra-metadata CLI commands OR launch jupyter lab

Expected behavior
A clear and concise description of what you expected to happen.

Deployment information
Describe what you've deployed and how:

  • Elyra version: 3.0.1/master
@ptitzler ptitzler added kind:bug Something isn't working status:Needs Triage labels Aug 31, 2021
@kevin-bates
Copy link
Member

This issue is happening for elyra-metadata when it loads the namespace schemas. In doing so, it wants to load the KfpSchemaFilter which triggers the import statements in elyra/pipeline/processor_kfp.py.

from black import FileMode
from black import format_str

Those modules are used on one line of code:

with open(absolute_pipeline_export_path, "w") as fh:
autopep_output = autopep8.fix_code(python_output)
output_to_file = format_str(autopep_output, mode=FileMode())
fh.write(output_to_file)

If I remove that line and write out autopep_output (and remove the import statements), then elyra-metadata list.. is clean.

However, processor_airflow.py has the exact same code, so jupyter lab still produces the messages. If I perform the same steps in processor_airflow.py then even jupyter lab starts cleanly...

[I 2021-08-31 11:06:18.900 ServerApp] elyra | extension was successfully linked.
[I 2021-08-31 11:06:18.900 ServerApp] jupyter_resource_usage | extension was successfully linked.
[I 2021-08-31 11:06:18.912 ServerApp] jupyterlab | extension was successfully linked.
[I 2021-08-31 11:06:18.912 ServerApp] jupyterlab_git | extension was successfully linked.
[I 2021-08-31 11:06:18.953 ElyraApp] Config {'ServerApp': {'jpserver_extensions': <LazyConfigValue value={'jupyterlab': True, 'elyra': True, 'jupyter_lsp': False, 'jupyter_resource_usage': True, 'jupyter_server_mathjax': False, 'jupyterlab_git': True, 'nbclassic': False, 'nbdime': False}>}}
[I 2021-08-31 11:06:19.061 ServerApp] Creating new registry using /opt/anaconda3/envs/elyra-dev/share/jupyter/components/airflow_component_catalog.json
[I 2021-08-31 11:06:19.472 ElyraApp] Registering processor "EntryPoint('airflow', 'elyra.pipeline.processor_airflow', 'AirflowPipelineProcessor', Distribution('elyra', '3.1.0.dev0'))" with type -> airflow
[I 2021-08-31 11:06:19.928 ServerApp] Creating new registry using /opt/anaconda3/envs/elyra-dev/share/jupyter/components/kfp_component_catalog.json
[I 2021-08-31 11:06:19.941 ElyraApp] Registering processor "EntryPoint('kfp', 'elyra.pipeline.processor_kfp', 'KfpPipelineProcessor', Distribution('elyra', '3.1.0.dev0'))" with type -> kfp
[I 2021-08-31 11:06:20.028 ElyraApp] Registering processor "EntryPoint('local', 'elyra.pipeline.processor_local', 'LocalPipelineProcessor', Distribution('elyra', '3.1.0.dev0'))" with type -> local
[I 2021-08-31 11:06:20.034 ServerApp] elyra | extension was successfully loaded.
[I 2021-08-31 11:06:20.034 ServerApp] jupyter_resource_usage | extension was successfully loaded.
[I 2021-08-31 11:06:20.035 LabApp] JupyterLab extension loaded from /opt/anaconda3/envs/elyra-dev/lib/python3.8/site-packages/jupyterlab
[I 2021-08-31 11:06:20.035 LabApp] JupyterLab application directory is /opt/anaconda3/envs/elyra-dev/share/jupyter/lab
[I 2021-08-31 11:06:20.039 ServerApp] jupyterlab | extension was successfully loaded.
[I 2021-08-31 11:06:20.043 ServerApp] jupyterlab_git | extension was successfully loaded.
[I 2021-08-31 11:06:20.044 ServerApp] Serving notebooks from local directory: /Users/kbates/repos/oss/elyra-ai/elyra
[I 2021-08-31 11:06:20.044 ServerApp] Jupyter Server 1.9.0 is running at:
[I 2021-08-31 11:06:20.044 ServerApp] http://localhost:8888/lab?token=403247d6ead9a672d67c8cc091c970a0b521f0157a76f1d5
[I 2021-08-31 11:06:20.044 ServerApp]  or http://127.0.0.1:8888/lab?token=403247d6ead9a672d67c8cc091c970a0b521f0157a76f1d5
[I 2021-08-31 11:06:20.044 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

These changes were added as part of #1529. If we can figure out a way to format the file such that black is not necessary, then we can remove our dependency and avoid this mess. That said, it's clearly related to an issue in black and we could wait for a fix (and release), or just move on from using black.

Personally, I would prefer we try to get the formatting we need using standard python library stuff if that's possible.

cc: @akchinSTC

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

Successfully merging a pull request may close this issue.

2 participants