You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/10/19 13:07:44 UTC

[GitHub] [airflow] aa3pankaj opened a new issue, #27135: Unable to migrate from 2.2.5 to 2.3.1 - airflow db upgrade error

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

   ### Apache Airflow version
   
   Other Airflow 2 version (please specify below)
   
   ### What happened
   
   
   pip freeze result:
   
   ```
   alembic==1.5.8
   amqp==5.1.1
   anyio==3.6.2
   apache-airflow==2.3.1
   apache-airflow-providers-amazon==1.3.0
   apache-airflow-providers-ftp==1.0.1
   apache-airflow-providers-http==1.1.1
   apache-airflow-providers-imap==1.0.1
   apache-airflow-providers-postgres==1.0.1
   apache-airflow-providers-redis==1.0.1
   apache-airflow-providers-snowflake==2.3.1
   apache-airflow-providers-sqlite==1.0.2
   apispec==3.3.2
   argcomplete==1.12.3
   asgiref==3.4.1
   asn1crypto==1.4.0
   attrs==20.3.0
   Authlib==0.15.3
   azure-common==1.1.27
   azure-core==1.13.0
   azure-storage-blob==12.8.1
   azure-storage-common==2.1.0
   Babel==2.9.1
   backoff==1.10.0
   billiard==3.6.4.0
   bleach==3.3.0
   blinker==1.4
   boto3==1.17.59
   botocore==1.20.59
   cached-property==1.5.2
   cachelib==0.9.0
   cattrs==1.6.0
   celery==5.2.3
   certifi==2020.12.5
   cffi==1.14.5
   chardet==3.0.4
   click==8.0.3
   click-didyoumean==0.0.3
   click-plugins==1.1.1
   click-repl==0.2.0
   clickclick==20.10.2
   colorama==0.4.4
   colorlog==4.0.2
   commonmark==0.9.1
   configparser==3.5.3
   connexion==2.14.1
   cron-descriptor==1.2.31
   croniter==0.3.37
   cryptography==3.4.7
   decorator==4.4.0
   defusedxml==0.7.1
   Deprecated==1.2.13
   dill==0.3.3
   dnspython==1.16.0
   docutils==0.16
   dumb-init==1.2.2
   email-validator==1.1.2
   entrypoints==0.3
   eventlet==0.30.2
   flake8==3.7.8
   Flask==1.1.2
   Flask-Admin==1.5.4
   Flask-AppBuilder==3.4.5
   Flask-Babel==1.0.0
   Flask-Caching==1.10.1
   Flask-JWT-Extended==3.25.1
   Flask-Login==0.4.1
   Flask-OAuthlib==0.9.6
   Flask-OpenID==1.3.0
   Flask-Session==0.4.0
   Flask-SQLAlchemy==2.5.1
   flask-swagger==0.2.14
   Flask-WTF==0.14.3
   flower==1.0.0
   funcsigs==1.0.2
   future==0.18.2
   gevent==21.1.2
   googleapis-common-protos==1.53.0
   graphviz==0.16
   greenlet==1.0.0
   grpcio==1.41.0
   gunicorn==20.1.0
   h11==0.12.0
   httpcore==0.15.0
   httpx==0.23.0
   humanize==4.4.0
   idna==2.10
   ijson==2.4
   importlib-metadata==1.7.0
   importlib-resources==5.2.0
   inflection==0.5.1
   ipython-genutils==0.2.0
   iso8601==0.1.14
   isodate==0.6.0
   itsdangerous==1.1.0
   Jinja2==2.11.3
   jmespath==0.10.0
   json-merge-patch==0.2
   jsonschema==3.2.0
   jupyter-core==4.6.1
   kombu==5.2.3
   lazy-object-proxy==1.4.3
   lockfile==0.12.2
   Mako==1.1.4
   Markdown==3.3.4
   MarkupSafe==1.1.1
   marshmallow==3.11.1
   marshmallow-enum==1.5.1
   marshmallow-oneofschema==2.1.0
   marshmallow-sqlalchemy==0.23.1
   mccabe==0.6.1
   monotonic==1.6
   msrest==0.6.21
   mysqlclient==1.4.6
   natsort==7.1.1
   nbformat==4.4.0
   newrelic==5.2.3.131
   numpy==1.21.5
   oauthlib==2.1.0
   openapi-schema-validator==0.1.5
   openapi-spec-validator==0.3.0
   opentelemetry-api==1.5.0
   opentelemetry-distro==0.24b0
   opentelemetry-exporter-otlp==1.5.0
   opentelemetry-exporter-otlp-proto-grpc==1.5.0
   opentelemetry-instrumentation==0.24b0
   opentelemetry-instrumentation-asgi==0.24b0
   opentelemetry-instrumentation-botocore==0.24b0
   opentelemetry-instrumentation-celery==0.24b0
   opentelemetry-instrumentation-dbapi==0.24b0
   opentelemetry-instrumentation-flask==0.24b0
   opentelemetry-instrumentation-grpc==0.24b0
   opentelemetry-instrumentation-jinja2==0.24b0
   opentelemetry-instrumentation-logging==0.24b0
   opentelemetry-instrumentation-redis==0.24b0
   opentelemetry-instrumentation-requests==0.24b0
   opentelemetry-instrumentation-sqlalchemy==0.24b0
   opentelemetry-instrumentation-sqlite3==0.24b0
   opentelemetry-instrumentation-urllib==0.24b0
   opentelemetry-instrumentation-urllib3==0.24b0
   opentelemetry-instrumentation-wsgi==0.24b0
   opentelemetry-proto==1.5.0
   opentelemetry-sdk==1.5.0
   opentelemetry-semantic-conventions==0.24b0
   opentelemetry-util-http==0.24b0
   ordereddict==1.1
   oscrypto==1.2.1
   packaging==20.9
   pandas==1.2.4
   pandocfilters==1.4.2
   pathspec==0.9.0
   pdoc3==0.6.3
   pendulum==2.1.2
   pluggy==1.0.0
   prison==0.2.1
   prometheus-client==0.10.1
   prompt-toolkit==3.0.18
   protobuf==3.19.0
   psutil==5.8.0
   psycopg2-binary==2.8.6
   pycodestyle==2.5.0
   pycparser==2.20
   pycryptodomex==3.10.1
   pyflakes==2.1.1
   Pygments==2.8.1
   PyJWT==1.7.1
   PyMySQL==1.0.2
   pyOpenSSL==20.0.1
   pyparsing==2.4.7
   pyrsistent==0.17.3
   python-daemon==2.3.0
   python-dateutil==2.8.1
   python-editor==1.0.4
   python-nvd3==0.15.0
   python-slugify==5.0.0
   python3-openid==3.2.0
   pytz==2021.3
   pytzdata==2020.1
   PyYAML==5.4.1
   redis==3.5.3
   requests==2.23.0
   requests-oauthlib==1.1.0
   rfc3986==1.5.0
   rich==12.4.1
   s3transfer==0.4.2
   setproctitle==1.2.2
   six==1.15.0
   sniffio==1.3.0
   snowflake-connector-python==2.4.3
   snowflake-sqlalchemy==1.2.4
   SQLAlchemy==1.4.9
   SQLAlchemy-JSONField==1.0.0
   SQLAlchemy-Utils==0.37.0
   swagger-ui-bundle==0.0.8
   tabulate==0.8.9
   tenacity==6.2.0
   termcolor==1.1.0
   testpath==0.4.2
   text-unidecode==1.3
   thrift==0.13.0
   tornado==5.1.1
   traitlets==4.3.3
   typing_extensions==4.0.0
   tzlocal==1.5.1
   unicodecsv==0.14.1
   urllib3==1.25.11
   vine==5.0.0
   watchtower==0.7.3
   wcwidth==0.2.5
   webencodings==0.5.1
   Werkzeug==1.0.1
   wrapt==1.13.2
   WTForms==2.3.3
   zipp==3.4.1
   zope.deprecation==4.4.0
   zope.event==4.5.0
   zope.interface==5.5.0
   ```
   
   
   `airflow db upgrade` returns below error:
   
   ```
   Traceback (most recent call last):
     File "/Users/panksingh/Documents/workspace/airflow-plugins/venv/bin/airflow", line 8, in <module>
       sys.exit(main())
     File "/Users/panksingh/Documents/workspace/airflow-plugins/venv/lib/python3.7/site-packages/airflow/__main__.py", line 38, in main
       args.func(args)
     File "/Users/panksingh/Documents/workspace/airflow-plugins/venv/lib/python3.7/site-packages/airflow/cli/cli_parser.py", line 51, in command
       return func(*args, **kwargs)
     File "/Users/panksingh/Documents/workspace/airflow-plugins/venv/lib/python3.7/site-packages/airflow/utils/cli.py", line 99, in wrapper
       return f(*args, **kwargs)
     File "/Users/panksingh/Documents/workspace/airflow-plugins/venv/lib/python3.7/site-packages/airflow/cli/commands/db_command.py", line 82, in upgradedb
       db.upgradedb(to_revision=to_revision, from_revision=from_revision, show_sql_only=args.show_sql_only)
     File "/Users/panksingh/Documents/workspace/airflow-plugins/venv/lib/python3.7/site-packages/airflow/utils/session.py", line 71, in wrapper
       return func(*args, session=session, **kwargs)
     File "/Users/panksingh/Documents/workspace/airflow-plugins/venv/lib/python3.7/site-packages/airflow/utils/db.py", line 1446, in upgradedb
       command.upgrade(config, revision=to_revision or 'heads')
     File "/Users/panksingh/Documents/workspace/airflow-plugins/venv/lib/python3.7/site-packages/alembic/command.py", line 294, in upgrade
       script.run_env()
     File "/Users/panksingh/Documents/workspace/airflow-plugins/venv/lib/python3.7/site-packages/alembic/script/base.py", line 490, in run_env
       util.load_python_file(self.dir, "env.py")
     File "/Users/panksingh/Documents/workspace/airflow-plugins/venv/lib/python3.7/site-packages/alembic/util/pyfiles.py", line 97, in load_python_file
       module = load_module_py(module_id, path)
     File "/Users/panksingh/Documents/workspace/airflow-plugins/venv/lib/python3.7/site-packages/alembic/util/compat.py", line 182, in load_module_py
       spec.loader.exec_module(module)
     File "<frozen importlib._bootstrap_external>", line 728, in exec_module
     File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
     File "/Users/panksingh/Documents/workspace/airflow-plugins/venv/lib/python3.7/site-packages/airflow/migrations/env.py", line 107, in <module>
       run_migrations_online()
     File "/Users/panksingh/Documents/workspace/airflow-plugins/venv/lib/python3.7/site-packages/airflow/migrations/env.py", line 101, in run_migrations_online
       context.run_migrations()
     File "<string>", line 8, in run_migrations
     File "/Users/panksingh/Documents/workspace/airflow-plugins/venv/lib/python3.7/site-packages/alembic/runtime/environment.py", line 813, in run_migrations
       self.get_context().run_migrations(**kw)
     File "/Users/panksingh/Documents/workspace/airflow-plugins/venv/lib/python3.7/site-packages/alembic/runtime/migration.py", line 548, in run_migrations
       for step in self._migrations_fn(heads, self):
     File "/Users/panksingh/Documents/workspace/airflow-plugins/venv/lib/python3.7/site-packages/alembic/command.py", line 283, in upgrade
       return script._upgrade_revs(revision, rev)
     File "/Users/panksingh/Documents/workspace/airflow-plugins/venv/lib/python3.7/site-packages/alembic/script/base.py", line 365, in _upgrade_revs
       revs = list(revs)
     File "/Users/panksingh/Documents/workspace/airflow-plugins/venv/lib/python3.7/site-packages/alembic/script/revision.py", line 1040, in _iterate_revisions
       total_space.remove(rev.revision)
   KeyError: '75d5ed6c2b43'
   ```
   
   
   `select * from alembic_version` returns:
   587bdf053233
   
   
   
   ### What you think should happen instead
   
   upgrade process should be seamless
   
   ### How to reproduce
   
   _No response_
   
   ### Operating System
   
   macOS 12.5 (21G72) - Darwin 21.6.0
   
   ### 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


[GitHub] [airflow] boring-cyborg[bot] commented on issue #27135: Unable to migrate from 2.2.5 to 2.3.1 - airflow db upgrade error

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #27135:
URL: https://github.com/apache/airflow/issues/27135#issuecomment-1283987330

   Thanks for opening your first issue here! Be sure to follow the issue template!
   


-- 
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


[GitHub] [airflow] aa3pankaj commented on issue #27135: Unable to migrate from 2.2.5 to 2.3.1 - airflow db upgrade error

Posted by GitBox <gi...@apache.org>.
aa3pankaj commented on issue #27135:
URL: https://github.com/apache/airflow/issues/27135#issuecomment-1286776786

   @potiuk @uranusjr @ashb 


-- 
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


[GitHub] [airflow] potiuk closed issue #27135: Unable to migrate from 2.2.5 to 2.3.1 - airflow db upgrade error

Posted by GitBox <gi...@apache.org>.
potiuk closed issue #27135: Unable to migrate from 2.2.5 to 2.3.1 - airflow db upgrade error
URL: https://github.com/apache/airflow/issues/27135


-- 
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