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


##########
dev/breeze/src/airflow_breeze/utils/docker_command_utils.py:
##########
@@ -804,23 +805,34 @@ def autodetect_docker_context():
 
     :return: name of the docker context to use
     """
-    output = run_command(["docker", "context", "ls", "-q"], 
capture_output=True, check=False, text=True)
-    if output.returncode != 0:
+    result = run_command(
+        ["docker", "context", "ls", "--format=json"],

Review Comment:
   I did some experimenting on my Linux machine (reinstalled some older 
versions and bisected when the change happened as it was not in the release 
notes):
   
   Those are versions available for my Mint at least:
   
   ```
   5:24.0.5-1~ubuntu.22.04~jammy
   5:24.0.4-1~ubuntu.22.04~jammy
   5:24.0.3-1~ubuntu.22.04~jammy
   5:24.0.2-1~ubuntu.22.04~jammy
   5:24.0.1-1~ubuntu.22.04~jammy
   5:24.0.0-1~ubuntu.22.04~jammy
   5:23.0.6-1~ubuntu.22.04~jammy
   5:23.0.5-1~ubuntu.22.04~jammy
   5:23.0.4-1~ubuntu.22.04~jammy
   5:23.0.3-1~ubuntu.22.04~jammy
   5:23.0.2-1~ubuntu.22.04~jammy
   5:23.0.1-1~ubuntu.22.04~jammy
   5:23.0.0-1~ubuntu.22.04~jammy
   5:20.10.24~3-0~ubuntu-jammy
   5:20.10.23~3-0~ubuntu-jammy
   5:20.10.22~3-0~ubuntu-jammy
   5:20.10.21~3-0~ubuntu-jammy
   5:20.10.20~3-0~ubuntu-jammy
   5:20.10.19~3-0~ubuntu-jammy
   5:20.10.18~3-0~ubuntu-jammy
   5:20.10.17~3-0~ubuntu-jammy
   5:20.10.16~3-0~ubuntu-jammy
   5:20.10.15~3-0~ubuntu-jammy
   5:20.10.14~3-0~ubuntu-jammy
   5:20.10.13~3-0~ubuntu-jammy
   ```
   
   For 5:20.10.24~3-0~ubuntu-jammy (our current min-version is 20.10.0):
   ```
   [jarek@jarek-HP-Z2-Tower-G9-Workstation-Desktop-PC:~/code/airflow] main+ 29s 
± docker context ls --help
   
   Usage:  docker context ls [OPTIONS]
   
   List contexts
   
   Aliases:
     ls, list
   
   Options:
         --format string   Pretty-print contexts using a Go template
     -q, --quiet           Only show context names
   ```
   
   For 5:23.0.0-1~ubuntu.22.04~jammy:
   
   ```
   Usage:  docker context ls [OPTIONS]
   
   List contexts
   
   Aliases:
     docker context ls, docker context list
   
   Options:
         --format string   Format output using a custom template:
                           'table':            Print output in table format 
with column headers (default)
                           'table TEMPLATE':   Print output in table format 
using the given Go template
                           'json':             Print in JSON format
                           'TEMPLATE':         Print output using the given Go 
template.
                           Refer to https://docs.docker.com/go/formatting/ for 
more information about formatting output with templates
     -q, --quiet           Only show context names
   ```
   
   I'd be for setting the min version to `23.0.6` ? WDYT @uranusjr ?



##########
dev/breeze/src/airflow_breeze/utils/docker_command_utils.py:
##########
@@ -804,23 +805,34 @@ def autodetect_docker_context():
 
     :return: name of the docker context to use
     """
-    output = run_command(["docker", "context", "ls", "-q"], 
capture_output=True, check=False, text=True)
-    if output.returncode != 0:
+    result = run_command(
+        ["docker", "context", "ls", "--format=json"],

Review Comment:
   I did some experimenting on my Linux machine (reinstalled some older 
versions and bisected when the change happened as it was not in the release 
notes):
   
   Those are versions available for my Mint at least:
   
   ```
   5:24.0.5-1~ubuntu.22.04~jammy
   5:24.0.4-1~ubuntu.22.04~jammy
   5:24.0.3-1~ubuntu.22.04~jammy
   5:24.0.2-1~ubuntu.22.04~jammy
   5:24.0.1-1~ubuntu.22.04~jammy
   5:24.0.0-1~ubuntu.22.04~jammy
   5:23.0.6-1~ubuntu.22.04~jammy
   5:23.0.5-1~ubuntu.22.04~jammy
   5:23.0.4-1~ubuntu.22.04~jammy
   5:23.0.3-1~ubuntu.22.04~jammy
   5:23.0.2-1~ubuntu.22.04~jammy
   5:23.0.1-1~ubuntu.22.04~jammy
   5:23.0.0-1~ubuntu.22.04~jammy
   5:20.10.24~3-0~ubuntu-jammy
   5:20.10.23~3-0~ubuntu-jammy
   5:20.10.22~3-0~ubuntu-jammy
   5:20.10.21~3-0~ubuntu-jammy
   5:20.10.20~3-0~ubuntu-jammy
   5:20.10.19~3-0~ubuntu-jammy
   5:20.10.18~3-0~ubuntu-jammy
   5:20.10.17~3-0~ubuntu-jammy
   5:20.10.16~3-0~ubuntu-jammy
   5:20.10.15~3-0~ubuntu-jammy
   5:20.10.14~3-0~ubuntu-jammy
   5:20.10.13~3-0~ubuntu-jammy
   ```
   
   For 5:20.10.24~3-0~ubuntu-jammy (our current min-version is 20.10.0):
   ```
   [jarek@jarek-HP-Z2-Tower-G9-Workstation-Desktop-PC:~/code/airflow] main+ 29s 
± docker context ls --help
   
   Usage:  docker context ls [OPTIONS]
   
   List contexts
   
   Aliases:
     ls, list
   
   Options:
         --format string   Pretty-print contexts using a Go template
     -q, --quiet           Only show context names
   ```
   
   For 5:23.0.0-1~ubuntu.22.04~jammy:
   
   ```
   Usage:  docker context ls [OPTIONS]
   
   List contexts
   
   Aliases:
     docker context ls, docker context list
   
   Options:
         --format string   Format output using a custom template:
                           'table':            Print output in table format 
with column headers (default)
                           'table TEMPLATE':   Print output in table format 
using the given Go template
                           'json':             Print in JSON format
                           'TEMPLATE':         Print output using the given Go 
template.
                           Refer to https://docs.docker.com/go/formatting/ for 
more information about formatting output with templates
     -q, --quiet           Only show context names
   ```
   
   I'd be for setting the min version to `23.0.6` ? WDYT @uranusjr ?



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