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

Inherit AirflowNotFound from connextion.NotFound to make the code simpler #11851

Closed
kaxil opened this issue Oct 26, 2020 · 6 comments · Fixed by #18523
Closed

Inherit AirflowNotFound from connextion.NotFound to make the code simpler #11851

kaxil opened this issue Oct 26, 2020 · 6 comments · Fixed by #18523
Assignees
Labels
area:API Airflow's REST/HTTP API area:serialization good first issue kind:task A task that needs to be completed as part of a larger issue

Comments

@kaxil
Copy link
Member

kaxil commented Oct 26, 2020

If we made AirflowNotFound inherit from connextion.NotFound this code could be a simpler here.

Originally posted by @ashb in #11335 (comment)

@kaxil kaxil added area:API Airflow's REST/HTTP API area:serialization labels Oct 26, 2020
@vikramkoka vikramkoka added the kind:task A task that needs to be completed as part of a larger issue label Feb 9, 2021
@ankh6
Copy link

ankh6 commented Mar 30, 2021

Hey @kaxil I'd like to make my first contribution here. Is this issue free ?
It is out of the issue scope but what do you think about slicing the post_set_task_instances_state(dag_id, session) with one method that would load the dag (line 290-297) ? Would it impact the design ?

@kaxil
Copy link
Member Author

kaxil commented Apr 2, 2021

I have assigned this issue to you @ankh6 -- please go for it :)

re your other point, I am not exactly sure what you mean -- can you raise a new Github Issue as a feature request please where you can add more details about it, thanks.

@ankh6
Copy link

ankh6 commented Apr 7, 2021

@kaxil
I ran pre-commit hooks before submitting a PR. Hooks exited with status code 1.
It seems to be linked to the compiler. Can you confirm ? How can I resolve it ?
Here's the stack trace:
n unexpected error has occurred: CalledProcessError: command: ('/home/andy/.cache/pre-commit/repoqtbnjhpl/py_env-python3/bin/python', '-mpip', 'install', '.')
return code: 1
expected return code: 0
stdout:
Processing /home/andy/.cache/pre-commit/repoqtbnjhpl
Collecting fuzzywuzzy
Using cached fuzzywuzzy-0.18.0-py2.py3-none-any.whl (18 kB)
Collecting python-Levenshtein
Using cached python-Levenshtein-0.12.2.tar.gz (50 kB)
Requirement already satisfied: setuptools in ./py_env-python3/lib/python3.8/site-packages (from python-Levenshtein->pre-commit-hooks==1.1.9) (54.1.2)
Building wheels for collected packages: pre-commit-hooks, python-Levenshtein
Building wheel for pre-commit-hooks (setup.py): started
Building wheel for pre-commit-hooks (setup.py): finished with status 'done'
Created wheel for pre-commit-hooks: filename=pre_commit_hooks-1.1.9-py3-none-any.whl size=12894 sha256=fc2c42332d478b74b77a4012ed86a8c51ef31f8fd5028c38c0cc06c668cf7523
Stored in directory: /tmp/pip-ephem-wheel-cache-4d5cnbpe/wheels/54/fb/96/b8ec4580389bc404d8c82207404a585471fc382178fa9ccef0
Building wheel for python-Levenshtein (setup.py): started
Building wheel for python-Levenshtein (setup.py): finished with status 'error'
Running setup.py clean for python-Levenshtein
Successfully built pre-commit-hooks
Failed to build python-Levenshtein
Installing collected packages: python-Levenshtein, fuzzywuzzy, pre-commit-hooks
Running setup.py install for python-Levenshtein: started
Running setup.py install for python-Levenshtein: finished with status 'error'

stderr:
ERROR: Command errored out with exit status 1:
command: /home/andy/.cache/pre-commit/repoqtbnjhpl/py_env-python3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-47wy09t9/python-levenshtein_830405ef8926471bbcc145f1daaa2797/setup.py'"'"'; file='"'"'/tmp/pip-install-47wy09t9/python-levenshtein_830405ef8926471bbcc145f1daaa2797/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-sz80c6t4
cwd: /tmp/pip-install-47wy09t9/python-levenshtein_830405ef8926471bbcc145f1daaa2797/
Complete output (34 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/Levenshtein
copying Levenshtein/StringMatcher.py -> build/lib.linux-x86_64-3.8/Levenshtein
copying Levenshtein/init.py -> build/lib.linux-x86_64-3.8/Levenshtein
running egg_info
writing python_Levenshtein.egg-info/PKG-INFO
writing dependency_links to python_Levenshtein.egg-info/dependency_links.txt
writing entry points to python_Levenshtein.egg-info/entry_points.txt
writing namespace_packages to python_Levenshtein.egg-info/namespace_packages.txt
writing requirements to python_Levenshtein.egg-info/requires.txt
writing top-level names to python_Levenshtein.egg-info/top_level.txt
reading manifest file 'python_Levenshtein.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*pyc' found anywhere in distribution
warning: no previously-included files matching '*so' found anywhere in distribution
warning: no previously-included files matching '.project' found anywhere in distribution
warning: no previously-included files matching '.pydevproject' found anywhere in distribution
writing manifest file 'python_Levenshtein.egg-info/SOURCES.txt'
copying Levenshtein/_levenshtein.c -> build/lib.linux-x86_64-3.8/Levenshtein
copying Levenshtein/_levenshtein.h -> build/lib.linux-x86_64-3.8/Levenshtein
running build_ext
building 'Levenshtein._levenshtein' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/Levenshtein
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/andy/.cache/pre-commit/repoqtbnjhpl/py_env-python3/include -I/usr/include/python3.8 -c Levenshtein/_levenshtein.c -o build/temp.linux-x86_64-3.8/Levenshtein/_levenshtein.o
Levenshtein/_levenshtein.c:99:10: fatal error: Python.h: No such file or directory
99 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

@kaxil
Copy link
Member Author

kaxil commented Apr 7, 2021

@mattwang44
Copy link
Contributor

I would like to take this one during PyCon Taiwan contribution workshop!

@potiuk
Copy link
Member

potiuk commented Sep 26, 2021

Go for it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:API Airflow's REST/HTTP API area:serialization good first issue kind:task A task that needs to be completed as part of a larger issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants