potiuk commented on code in PR #46786:
URL: https://github.com/apache/airflow/pull/46786#discussion_r1957102973


##########
dev/breeze/src/airflow_breeze/utils/docker_command_utils.py:
##########
@@ -843,9 +843,53 @@ def enter_shell(shell_params: ShellParams, output: Output 
| None = None) -> RunC
         get_console().print(f"[red]Error {command_result.returncode} 
returned[/]")
         if get_verbose():
             get_console().print(command_result.stderr)
+        notify_on_unhealthy_backend_container(shell_params.project_name, 
shell_params.backend, output)
         return command_result
 
 
+def notify_on_unhealthy_backend_container(project_name: str, backend: str, 
output: Output | None = None):
+    """Put emphasis on unhealthy backend container and `breeze down` command 
for user."""
+    if backend not in ["postgres", "mysql"] or os.environ.get("CI") == "true":
+        return
+
+    if _is_backend_container_unhealthy(project_name, backend):
+        get_console(output=output).print(
+            "[warning]The backend container is unhealthy. You might need to 
run `down` "

Review Comment:
   ```suggestion
               "[warning]The backend container is unhealthy. You might need to 
run `breeze down` "
   ```



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