You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "vatsrahul1001 (via GitHub)" <gi...@apache.org> on 2025/03/30 05:40:29 UTC

[I] Upgrade migration failing from 2.10.5 to 3.0.0 [airflow]

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

   ### Apache Airflow version
   
   2.10.5
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   Getting below error when we are trying to upgrade from `2.10.5` to `3.0.0`
   
   
   ```
   File "/opt/airflow/airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py", line 154, in upgrade
       batch_op.create_foreign_key(
     File "/usr/local/lib/python3.9/contextlib.py", line 126, in __exit__
       next(self.gen)
     File "/usr/local/lib/python3.9/site-packages/alembic/operations/base.py", line 397, in batch_alter_table
       impl.flush()
     File "/usr/local/lib/python3.9/site-packages/alembic/operations/batch.py", line 115, in flush
       fn(*arg, **kw)
     File "/usr/local/lib/python3.9/site-packages/alembic/ddl/impl.py", line 447, in drop_index
       self._exec(schema.DropIndex(index, **kw))
     File "/usr/local/lib/python3.9/site-packages/alembic/ddl/impl.py", line 247, in _exec
       return conn.execute(construct, params)
     File "/usr/local/lib/python3.9/site-packages/sqlalchemy/future/engine.py", line 286, in execute
       return self._execute_20(
     File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1710, in _execute_20
       return meth(self, args_10style, kwargs_10style, execution_options)
     File "/usr/local/lib/python3.9/site-packages/sqlalchemy/sql/ddl.py", line 80, in _execute_on_connection
       return connection._execute_ddl(
     File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1477, in _execute_ddl
       ret = self._execute_context(
     File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1953, in _execute_context
       self._handle_dbapi_exception(
     File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 2134, in _handle_dbapi_exception
       util.raise_(
     File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
       raise exception
     File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1910, in _execute_context
       self.dialect.do_execute(
     File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
       cursor.execute(statement, parameters)
     File "/usr/local/lib/python3.9/site-packages/MySQLdb/cursors.py", line 179, in execute
       res = self._query(mogrified_query)
     File "/usr/local/lib/python3.9/site-packages/MySQLdb/cursors.py", line 330, in _query
       db.query(q)
     File "/usr/local/lib/python3.9/site-packages/MySQLdb/connections.py", line 280, in query
       _mysql.connection.query(self, query)
   sqlalchemy.exc.OperationalError: (MySQLdb.OperationalError) (1553, "Cannot drop index 'idx_dataset_alias_dataset_alias_dataset_id': needed in a foreign key constraint")
   [SQL:
   DROP INDEX idx_dataset_alias_dataset_alias_dataset_id ON asset_alias_asset]
   (Background on this error at: https://sqlalche.me/e/14/e3q8)
   ```
   
   ### What you think should happen instead?
   
   _No response_
   
   ### How to reproduce
   
   Steps:
   
   1. breeze --backend mysql start-airflow --use-airflow-version 2.10.5 --load-example-dags
   2. After running that, exit breeze with stop_airflow
   3. and run: breeze --backend mysql
   4. Once on the terminal, run : airflow db migrate
   
   ### Operating System
   
   Linux
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### 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] Upgrade migration failing from 2.10.5 to 3.0.0 [airflow]

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

   Related PRs which could solve this, testing is currently in progress
   
   https://github.com/apache/airflow/pull/48779
   https://github.com/apache/airflow/pull/48778


-- 
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] Upgrade migration failing from 2.10.5 to 3.0.0 [airflow]

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

   Hii can i work on this?


-- 
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] [MYSQL]Upgrade migration failing from 2.10.5 to 3.0.0 [airflow]

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

   Closing this verified.


-- 
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] [MYSQL]Upgrade migration failing from 2.10.5 to 3.0.0 [airflow]

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

   https://github.com/apache/airflow/pull/48512 will be fixing this.


-- 
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] Upgrade migration failing from 2.10.5 to 3.0.0 [airflow]

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

   Thanks for offering @aryaaniket008, but we we going to have @ephraimbuddy pick this one up instead. Given the timing for 3.0.0rc1, having someone who is intimately familiar with our migrations will make our lives easier.
   
   I encourage you to pick up another issue though!


-- 
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] [MYSQL]Upgrade migration failing from 2.10.5 to 3.0.0 [airflow]

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

   #48512 is merged now, would you like to test once before we close this @vatsrahul1001 ?


-- 
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] [MYSQL]Upgrade migration failing from 2.10.5 to 3.0.0 [airflow]

Posted by "vatsrahul1001 (via GitHub)" <gi...@apache.org>.
vatsrahul1001 closed issue #48542: [MYSQL]Upgrade migration failing from 2.10.5 to 3.0.0
URL: https://github.com/apache/airflow/issues/48542


-- 
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] Upgrade migration failing from 2.10.5 to 3.0.0 [airflow]

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

   Looks linked to https://github.com/apache/airflow/pull/48512


-- 
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] [MYSQL]Upgrade migration failing from 2.10.5 to 3.0.0 [airflow]

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

   Yes, I will test and close this.


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