potiuk commented on PR #31181:
URL: https://github.com/apache/airflow/pull/31181#issuecomment-1541907392

    I think that was the last set of tests we did not have described in the 
TESTING.rst in the similar level as other tests (and it required a bit more 
looking into what's happenning under the hood), but now it should be easier to 
reproduce them locally and see errors (such as health-check errors in this 
case)- either with Breeze command dedicated to run them or manually just 
following the instrucitons on how to start and run docker-compose of ours.
   
   This should make it easier to resolve and diagnose problems in cases similar 
to https://github.com/apache/airflow/pull/31001
   
   The output for health checks will also be included in case the tests fail. 
Maybe not beautiful, but good enough IMHO:
   
   
   
   ```
   Health check for  quick-start-airflow-worker-1
   $ docker inspect --format '{{json .State}}' quick-start-airflow-worker-1
   
('{"Status":"running","Running":true,"Paused":false,"Restarting":false,"OOMKilled":false,"Dead":false,"Pid":4152660,"ExitCode":0,"Error":"","StartedAt":"2023-05-10T10:01:13.792483181Z","FinishedAt":"0001-01-01T00:00:00Z","Health":{"Status":"starting","FailingStreak":1,"Log":[{"Start":"2023-05-10T12:01:43.792982605+02:00","End":"2023-05-10T12:01:44.828042804+02:00","ExitCode":2,"Output":"Usage:
 '
    "celery [OPTIONS] COMMAND [ARGS]...\\nTry 'celery --help' for "
    "help.\\n\\nError: Invalid value for '-A' / '--app': \\nUnable to load 
celery "
    'application.\\nWhile trying to load the module '
    'airflow.executors.celery_executors.app the following error '
    'occurred:\\nTraceback (most recent call last):\\n  File '
    
'\\"/home/airflow/.local/lib/python3.8/site-packages/celery/bin/celery.py\\", '
    'line 57, in convert\\n    return find_app(value)\\n  File '
    
'\\"/home/airflow/.local/lib/python3.8/site-packages/celery/app/utils.py\\", '
    'line 384, in find_app\\n    sym = symbol_by_name(app, imp=imp)\\n  File '
    
'\\"/home/airflow/.local/lib/python3.8/site-packages/kombu/utils/imports.py\\", 
'
    'line 56, in symbol_by_name\\n    module = imp(module_name, 
package=package, '
    '**kwargs)\\n  File '
    
'\\"/home/airflow/.local/lib/python3.8/site-packages/celery/utils/imports.py\\",
 '
    'line 105, in import_from_cwd\\n    return imp(module, package=package)\\n  
'
    'File \\"/usr/local/lib/python3.8/importlib/__init__.py\\", line 127, in '
    'import_module\\n    return _bootstrap._gcd_import(name[level:], package, '
    'level)\\n  File \\"<frozen importlib._bootstrap>\\", line 1014, in '
    '_gcd_import\\n  File \\"<frozen importlib._bootstrap>\\", line 991, in '
    '_find_and_load\\n  File \\"<frozen importlib._bootstrap>\\", line 973, in '
    '_find_and_load_unlocked\\nModuleNotFoundError: No module named '
    '\'airflow.executors.celery_executors\'\\n\\n"}]}}\n')
   Health check for quick-start-airflow-scheduler-1
   $ docker inspect --format '{{json .State}}' quick-start-airflow-scheduler-1
   
('{"Status":"running","Running":true,"Paused":false,"Restarting":false,"OOMKilled":false,"Dead":false,"Pid":4152833,"ExitCode":0,"Error":"","StartedAt":"2023-05-10T10:01:13.973095488Z","FinishedAt":"0001-01-01T00:00:00Z","Health":{"Status":"healthy","FailingStreak":0,"Log":[{"Start":"2023-05-10T12:01:43.973723791+02:00","End":"2023-05-10T12:01:44.052227329+02:00","ExitCode":0,"Output":"
  '
    '% Total    % Received % Xferd  Average Speed   Time    Time     Time  '
    'Current\\n                                 Dload  Upload   Total   Spent   
 '
    'Left  Speed\\n\\r  0     0    0     0    0     0      0      0 --:--:-- '
    '--:--:-- --:--:--     0\\r  0     0    0     0    0     0      0      0 '
    '--:--:-- --:--:-- --:--:--     0\\n"}]}}\n')
   ```
   
   
   
   
   
   


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