aipatr opened a new issue, #33887:
URL: https://github.com/apache/airflow/issues/33887
### Apache Airflow version
2.7.0
### What happened
I try to execute airflow db migrate
/opt/miniconda3/envs/pytorch/lib/python3.8/site-packages/airflow/configuration.py:751
UserWarning: Config scheduler.max_tis_per_query (value: 512) should NOT be
greater than core.parallelism (value: 32). Will now use core.parallelism as the
max task instances per query instead of specified value.
/opt/miniconda3/envs/pytorch/lib/python3.8/site-packages/airflow/configuration.py:857
FutureWarning: The 'log_id_template' setting in [elasticsearch] has the old
default value of '{dag_id}-{task_id}-{execution_date}-{try_number}'. This value
has been changed to '{dag_id}-{task_id}-{run_id}-{map_index}-{try_number}' in
the running config, but please update your config before Apache Airflow 3.0.
/opt/miniconda3/envs/pytorch/lib/python3.8/site-packages/airflow/cli/cli_config.py:974
DeprecationWarning: The namespace option in [kubernetes] has been moved to the
namespace option in [kubernetes_executor] - the old setting has been used, but
please update your config.
DB: postgresql+psycopg2://airflow:***@localhost/airflow
Performing upgrade to the metadata database
postgresql+psycopg2://airflow:***@localhost/airflow
Traceback (most recent call last):
File "/opt/miniconda3/envs/pytorch/bin/airflow", line 8, in <module>
sys.exit(main())
File
"/opt/miniconda3/envs/pytorch/lib/python3.8/site-packages/airflow/__main__.py",
line 60, in main
args.func(args)
File
"/opt/miniconda3/envs/pytorch/lib/python3.8/site-packages/airflow/cli/cli_config.py",
line 49, in command
return func(*args, **kwargs)
File
"/opt/miniconda3/envs/pytorch/lib/python3.8/site-packages/airflow/utils/cli.py",
line 113, in wrapper
return f(*args, **kwargs)
File
"/opt/miniconda3/envs/pytorch/lib/python3.8/site-packages/airflow/utils/providers_configuration_loader.py",
line 56, in wrapped_function
return func(*args, **kwargs)
File
"/opt/miniconda3/envs/pytorch/lib/python3.8/site-packages/airflow/cli/commands/db_command.py",
line 104, in migratedb
db.upgradedb(
File
"/opt/miniconda3/envs/pytorch/lib/python3.8/site-packages/airflow/utils/session.py",
line 77, in wrapper
return func(*args, session=session, **kwargs)
File
"/opt/miniconda3/envs/pytorch/lib/python3.8/site-packages/airflow/utils/db.py",
line 1616, in upgradedb
for err in _check_migration_errors(session=session):
File
"/opt/miniconda3/envs/pytorch/lib/python3.8/site-packages/airflow/utils/db.py",
line 1499, in _check_migration_errors
yield from check_fn(session=session)
File
"/opt/miniconda3/envs/pytorch/lib/python3.8/site-packages/airflow/utils/db.py",
line 979, in check_conn_id_duplicates
dups = session.scalars(
AttributeError: 'Session' object has no attribute 'scalars'
### What you think should happen instead
_No response_
### How to reproduce
Execute airflow db migrate with PostgresSql existing database
### Operating System
Ubuntu
### Versions of Apache Airflow Providers
_No response_
### Deployment
Other
### 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]