jason810496 commented on PR #49470:
URL: https://github.com/apache/airflow/pull/49470#issuecomment-3049840906

   I just test with the following setup with `breeze k8s` and it works smooth! 
And I re-build the k8s image before running the manual test for sure.
   
   I will keep on testing setup with remote logging as well tomorrow. 
   
   **Without remote logging**
   
   1. **KubernetesExecutor** ( with no log persistent setup ): can only show 
logs when TI is in running state ( as expected )
   2. **CeleryExecutor**: can show logs no matter TI is in running or success, 
which means get get `serve_logs` well after the refactor
   
   **With romote logging setup**:
   
   1. **KubernetesExecutor**: TODO
   2. **CeleryExecutor**: TODO
   
   > If you have any problems- let me know .. It could be that this recipe 
needs a bit of fixes and adjustments after recent changes ;)
   
   All good until the last `start-airflow` command.
   
   I didn't dig into it to find the root cause so far; I just use `breeze k8s` 
to test the behavior as workaround ( IMO, with `breeze k8s` the behavior will 
be more _real_ and it's require for testing with `KubernetesExecutor` setup )
   
   > `breeze start-airflow --mount-sources tests --use-airflow-version wheel`
   
   Here is the full traceback:
   ```
   PostgreSQL: OK.  
   
   
   Starting Airflow
   
   [2025-07-08T17:53:15.198+0000] {configuration.py:1249} WARNING - No module 
named 'airflow.providers'
   [2025-07-08T17:53:15.199+0000] {cli_parser.py:81} WARNING - cannot load CLI 
commands from auth manager: The object could not be loaded. Please check 
"auth_manager" key in "core" section. Current value: 
"airflow.api_fastapi.auth.managers.simple.simple_auth_manager.SimpleAuthManager".
   [2025-07-08T17:53:15.200+0000] {cli_parser.py:82} WARNING - Auth manager is 
not configured and api-server will not be able to start.
   DB: postgresql+psycopg2://postgres:***@postgres/airflow
   Performing upgrade to the metadata database 
postgresql+psycopg2://postgres:***@postgres/airflow
   Traceback (most recent call last):
     File "/usr/local/bin/airflow", line 10, in <module>
       sys.exit(main())
     File "/usr/local/lib/python3.10/site-packages/airflow/__main__.py", line 
55, in main
       args.func(args)
     File "/usr/local/lib/python3.10/site-packages/airflow/cli/cli_config.py", 
line 48, in command
       return func(*args, **kwargs)
     File "/usr/local/lib/python3.10/site-packages/airflow/utils/cli.py", line 
113, in wrapper
       return f(*args, **kwargs)
     File 
"/usr/local/lib/python3.10/site-packages/airflow/utils/providers_configuration_loader.py",
 line 56, in wrapped_function
       return func(*args, **kwargs)
     File 
"/usr/local/lib/python3.10/site-packages/airflow/cli/commands/db_command.py", 
line 197, in migratedb
       run_db_migrate_command(args, db.upgradedb, _REVISION_HEADS_MAP)
     File 
"/usr/local/lib/python3.10/site-packages/airflow/cli/commands/db_command.py", 
line 125, in run_db_migrate_command
       command(
     File "/usr/local/lib/python3.10/site-packages/airflow/utils/session.py", 
line 101, in wrapper
       return func(*args, session=session, **kwargs)
     File "/usr/local/lib/python3.10/site-packages/airflow/utils/db.py", line 
942, in upgradedb
       import_all_models()
     File "/usr/local/lib/python3.10/site-packages/airflow/models/__init__.py", 
line 59, in import_all_models
       __getattr__(name)
     File "/usr/local/lib/python3.10/site-packages/airflow/models/__init__.py", 
line 81, in __getattr__
       val = import_string(f"{path}.{name}")
     File 
"/usr/local/lib/python3.10/site-packages/airflow/utils/module_loading.py", line 
61, in import_string
       module = import_module(module_path)
     File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in 
import_module
       return _bootstrap._gcd_import(name[level:], package, level)
     File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
     File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
     File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
     File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
     File "<frozen importlib._bootstrap_external>", line 883, in exec_module
     File "<frozen importlib._bootstrap>", line 241, in 
_call_with_frames_removed
     File "/usr/local/lib/python3.10/site-packages/airflow/models/dag.py", line 
65, in <module>
       from airflow.assets.evaluation import AssetEvaluator
     File 
"/usr/local/lib/python3.10/site-packages/airflow/assets/evaluation.py", line 
34, in <module>
       from airflow.sdk.definitions.asset.decorators import MultiAssetDefinition
     File 
"/usr/local/lib/python3.10/site-packages/airflow/sdk/definitions/asset/decorators.py",
 line 25, in <module>
       from airflow.providers.standard.operators.python import PythonOperator
   ModuleNotFoundError: No module named 'airflow.providers'
   Failed to run 'airflow db migrate'.
   This could be because you are installing old airflow version
   Attempting to run deprecated 'airflow db init' instead.
   [2025-07-08T17:53:17.482+0000] {configuration.py:1249} WARNING - No module 
named 'airflow.providers'
   [2025-07-08T17:53:17.483+0000] {cli_parser.py:81} WARNING - cannot load CLI 
commands from auth manager: The object could not be loaded. Please check 
"auth_manager" key in "core" section. Current value: 
"airflow.api_fastapi.auth.managers.simple.simple_auth_manager.SimpleAuthManager".
   [2025-07-08T17:53:17.483+0000] {cli_parser.py:82} WARNING - Auth manager is 
not configured and api-server will not be able to start.
   Usage: airflow db [-h] COMMAND ...
   
   Database operations
   
   Positional Arguments:
     COMMAND
       check           Check if the database can be reached
       check-migrations
                       Check if migration have finished
       clean           Purge old records in metastore tables
       downgrade       Downgrade the schema of the metadata database.
       drop-archived   Drop archived tables created through the db clean command
       export-archived
                       Export archived data from the archive tables
       migrate         Migrates the metadata database to the latest version
       reset           Burn down and rebuild the metadata database
       shell           Runs a shell to access the database
   
   Options:
     -h, --help        show this help message and exit
   
   airflow db command error: argument COMMAND: invalid choice: 'init' (choose 
from 'check', 'check-migrations', 'clean', 'downgrade', 'drop-archived', 
'export-archived', 'migrate', 'reset', 'shell'), see help above.
   
   Error: check_environment returned 2. Exiting.
   
   Error 2 returned
   ```


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

Reply via email to