Replies: 4 comments 3 replies
-
CCing @alexkruc who made the change to assert a default context. I forget the context (no pun intended) around why that assertion was added. A Slack thread is linked from the PR but it is unfortunately expired and cannot be read. |
Beta Was this translation helpful? Give feedback.
-
Hey @o-nikolas - I'll share the context as I remember, I forgot that Slack threads in free tier Slack are deleted :( In the Slack thread, we discussed what is the proper approach to fix this, and it was decided that having a different Docker runtime and using other runtimes than Docker desktop is not according to the guidelines, and we should enforce this. AFAIK Docker desktop with M1 chip should also use the default context, or else a lot more people would complain on the same issue.. Unfortunately, I still use a Mac with an Intel chip, so I can't confirm, but I do know that a lot of people is using M1 versions and do use the default context. Perhaps try to re-install Docker desktop? According to this issue (New desktop-linux / desktop-windows contexts cause problems when switching OS mode), |
Beta Was this translation helpful? Give feedback.
-
This is what I see on my M1. This is not an M1 feature.
Just upgraded to latest version of docker desktop - no problems either. I think the problem is some buggy version of Docker Desktop that change the defauls to desktop-linux that broke your configuration - you need to change default context to "default" from "desktop-linux" and restart docker. Those (very similar) issues are on Windows, but I think it might be the same for Mac: https://developercommunity.visualstudio.com/t/current-context-desktop-linux-is-not-found-on-the/1463380 Basically find default config.json and change currentContext there (or remove it entirely). https://docs.docker.com/engine/reference/commandline/cli/#configuration-files |
Beta Was this translation helpful? Give feedback.
-
I dug deeper and the problem is related to the latest release of Docker Desktop for Mac (probably unrelated to the chip type).
This means that you probably couldn't reproduce it because you had older version installed first, which symlinked those (and the symlink was kept after update), but I installed Docker Desktop on a fresh environment.
This means that the change is likely to stay (not a bug) and will affect all future Airflow contributors who install Docker Desktop on a fresh environment rather than upgrading an older version. Just changing the context to If it is really necessary to use EDIT:
|
Beta Was this translation helpful? Give feedback.
-
I tried to follow instructions on "Contributor's Quick Start":
https://github.com/apache/airflow/blob/main/CONTRIBUTORS_QUICK_START.rst
But when I run the breeze command I get:
Actually, I installed Docker as "Docker Desktop for Mac with Apple Chip" from here: https://www.docker.com/products/docker-desktop/
So when I list my docker contexts I get this:
desktop-linux
is the context I need to use with Docker Desktop. If I really follow the instructions and switch the context then I get an error that Docker is not running.And then I restart Docker Desktop - but it switches context back to
desktop-linux
.Is there something wrong with my docker or Airflow installation? Do you think it's specific to Mac/Apple chip?
I tried to work around this problem so I manually changed the line:
airflow/dev/breeze/src/airflow_breeze/utils/docker_command_utils.py
Line 336 in 8f5ed4b
to allow
desktop-linux
.Then the command starts, but I get new errors during installation:
Do you think it's because of my manual change in the context name that bypassed verification?
Beta Was this translation helpful? Give feedback.
All reactions