You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Bedoonraj (via GitHub)" <gi...@apache.org> on 2023/11/04 07:26:34 UTC

[I] Throwing issue on executing airflow db init code [airflow]

Bedoonraj opened a new issue, #35434:
URL: https://github.com/apache/airflow/issues/35434

   ### Apache Airflow version
   
   2.7.2
   
   ### What happened
   
   When i executed **_airflow db init_** command on Python 3.10.12 environment, i got below error. Any particular reason for this or i misses anything from my side? 
   
   /home/user/airflow_env/lib/python3.10/site-packages/airflow/cli/commands/db_command.py:43 DeprecationWarning: `db init` is deprecated.  Use `db migrate` instead to migrate the db and/or airflow connections create-default-connections to create the default connections
   DB: sqlite:////home/user/airflow/airflow.db
   [2023-11-04T12:50:20.914+0530] {migration.py:213} INFO - Context impl SQLiteImpl.
   [2023-11-04T12:50:20.915+0530] {migration.py:216} INFO - Will assume non-transactional DDL.
   INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
   INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
   Traceback (most recent call last):
     File "/home/user/airflow_env/bin/airflow", line 8, in <module>
       sys.exit(main())
     File "/home/user/airflow_env/lib/python3.10/site-packages/airflow/__main__.py", line 59, in main
       args.func(args)
     File "/home/user/airflow_env/lib/python3.10/site-packages/airflow/cli/cli_config.py", line 49, in command
       return func(*args, **kwargs)
     File "/home/user/airflow_env/lib/python3.10/site-packages/airflow/utils/providers_configuration_loader.py", line 55, in wrapped_function
       return func(*args, **kwargs)
     File "/home/user/airflow_env/lib/python3.10/site-packages/airflow/cli/commands/db_command.py", line 49, in initdb
       db.initdb()
     File "/home/user/airflow_env/lib/python3.10/site-packages/airflow/utils/session.py", line 77, in wrapper
       return func(*args, session=session, **kwargs)
     File "/home/user/airflow_env/lib/python3.10/site-packages/airflow/utils/db.py", line 739, in initdb
       _create_db_from_orm(session=session)
     File "/home/user/airflow_env/lib/python3.10/site-packages/airflow/utils/db.py", line 727, in _create_db_from_orm
       command.stamp(config, "head")
     File "/home/user/airflow_env/lib/python3.10/site-packages/alembic/command.py", line 685, in stamp
       script.run_env()
     File "/home/user/airflow_env/lib/python3.10/site-packages/alembic/script/base.py", line 579, in run_env
       util.load_python_file(self.dir, "env.py")
     File "/home/user/airflow_env/lib/python3.10/site-packages/alembic/util/pyfiles.py", line 93, in load_python_file
       module = load_module_py(module_id, path)
     File "/home/user/airflow_env/lib/python3.10/site-packages/alembic/util/pyfiles.py", line 109, in load_module_py
       spec.loader.exec_module(module)  # type: ignore
     File "<frozen importlib._bootstrap_external>", line 883, in exec_module
     File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
     File "/home/user/airflow_env/lib/python3.10/site-packages/airflow/migrations/env.py", line 117, in <module>
       run_migrations_online()
     File "/home/user/airflow_env/lib/python3.10/site-packages/airflow/migrations/env.py", line 111, in run_migrations_online
       context.run_migrations()
     File "<string>", line 8, in run_migrations
     File "/home/user/airflow_env/lib/python3.10/site-packages/alembic/runtime/environment.py", line 938, in run_migrations
       self.get_context().run_migrations(**kw)
     File "/home/user/airflow_env/lib/python3.10/site-packages/alembic/runtime/migration.py", line 612, in run_migrations
       for step in self._migrations_fn(heads, self):
     File "/home/user/airflow_env/lib/python3.10/site-packages/alembic/command.py", line 673, in do_stamp
       return script._stamp_revs(util.to_tuple(destination_revs), rev)
     File "/home/user/airflow_env/lib/python3.10/site-packages/alembic/script/base.py", line 494, in _stamp_revs
       self.revision_map.filter_for_lineage(
     File "/home/user/airflow_env/lib/python3.10/site-packages/alembic/script/revision.py", line 680, in filter_for_lineage
       id_, branch_label = self._resolve_revision_number(check_against)
     File "/home/user/airflow_env/lib/python3.10/site-packages/alembic/script/revision.py", line 754, in _resolve_revision_number
       self._revision_map
     File "/home/user/airflow_env/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 1113, in __get__
       obj.__dict__[self.__name__] = result = self.fget(obj)
     File "/home/user/airflow_env/lib/python3.10/site-packages/alembic/script/revision.py", line 197, in _revision_map
       for revision in self._generator():
     File "/home/user/airflow_env/lib/python3.10/site-packages/alembic/script/base.py", line 149, in _load_revisions
       script = Script._from_filename(self, dir_name, filename)
     File "/home/user/airflow_env/lib/python3.10/site-packages/alembic/script/base.py", line 1035, in _from_filename
       module = util.load_python_file(dir_, filename)
     File "/home/user/airflow_env/lib/python3.10/site-packages/alembic/util/pyfiles.py", line 93, in load_python_file
       module = load_module_py(module_id, path)
     File "/home/user/airflow_env/lib/python3.10/site-packages/alembic/util/pyfiles.py", line 109, in load_module_py
       spec.loader.exec_module(module)  # type: ignore
     File "<frozen importlib._bootstrap_external>", line 883, in exec_module
     File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
     File "/home/user/airflow_env/lib/python3.10/site-packages/airflow/migrations/versions/0074_2_0_0_resource_based_permissions.py", line 30, in <module>
       from airflow.www.app import cached_app
     File "/home/user/airflow_env/lib/python3.10/site-packages/airflow/www/app.py", line 50, in <module>
       from airflow.www.extensions.init_views import (
     File "/home/user/airflow_env/lib/python3.10/site-packages/airflow/www/extensions/init_views.py", line 27, in <module>
       from connexion.decorators.validation import RequestBodyValidator
   ModuleNotFoundError: No module named 'connexion.decorators.validation'
   
   
   ### What you think should happen instead
   
   _No response_
   
   ### How to reproduce
   
   When you install airflow on Python version 3.10.12, you will encounter this.
   
   ### Operating System
   
   Ubuntu
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Virtualenv installation
   
   ### Deployment details
   
   _No response_
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Throwing issue on executing airflow db init code [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on issue #35434:
URL: https://github.com/apache/airflow/issues/35434#issuecomment-1793421217

   And usual reminder. If you want released airflow to install reproducibly, just follow our (the only recommended) way of installing airflow in reproducible way https://airflow.apache.org/docs/apache-airflow/stable/installation/installing-from-pypi.html 
   
   So (also information for others who might stumble upon this issue) it might and WILL happen that released airlfow will stop installing in the future because of 3rd-party breaking changes similarly as in case of connexion. The ONLY way to prevent it is to follow our instructions on how to install airflow in reproducible way, so it makes very little sense to open issues that suddently airflow stops installling (if you don't follow the instructions of course).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Throwing issue on executing airflow db init code [airflow]

Posted by "Taragolis (via GitHub)" <gi...@apache.org>.
Taragolis commented on issue #35434:
URL: https://github.com/apache/airflow/issues/35434#issuecomment-1793392696

   Duplicate of many connexion 3 incompatibility issues:
   - https://github.com/apache/airflow/issues/35234
   - https://github.com/apache/airflow/issues/35375
   - https://github.com/apache/airflow/issues/35390
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Throwing issue on executing airflow db init code [airflow]

Posted by "Taragolis (via GitHub)" <gi...@apache.org>.
Taragolis closed issue #35434: Throwing issue on executing airflow db init code
URL: https://github.com/apache/airflow/issues/35434


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Throwing issue on executing airflow db init code [airflow]

Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on issue #35434:
URL: https://github.com/apache/airflow/issues/35434#issuecomment-1793369847

   Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org