Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check docker-compose version in breeze #18536

Merged
merged 1 commit into from
Sep 29, 2021

Conversation

potiuk
Copy link
Member

@potiuk potiuk commented Sep 26, 2021

We started to use some newer features in docker-compose of breeze.
They are new enough (May 2020) that older versions of
docker-compose do not work with them.

This PR checks if the docker-compose is >= 1.29


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.

@potiuk
Copy link
Member Author

potiuk commented Sep 28, 2021

BTW. Can someone check if it works on Mac as well? Especialy with latest docker compose which is built-in in docker in latest Docker Desktop

@mik-laj
Copy link
Member

mik-laj commented Sep 28, 2021

We already have one version check for Docker compose. Can we update it?

airflow/breeze

Lines 595 to 609 in ab7acfd

docker_compose_version=\$(docker-compose --version)
if [[ \${docker_compose_version} =~ .*version\ v2.* ]]; then
echo
echo "${COLOR_RED}Docker Compose Beta version v2 has a bug that prevents breeze from running.${COLOR_RESET}"
echo "${COLOR_RED}You have: \${docker_compose_version}.${COLOR_RESET}"
echo
echo "${COLOR_YELLOW}Please switch to stable version via Docker Desktop -> Experimental or by running:${COLOR_RESET}"
echo
echo "${COLOR_CYAN}docker-compose disable-v2${COLOR_RESET}"
echo
echo "${COLOR_YELLOW}Also please upvote https://github.com/docker/compose-cli/issues/1917${COLOR_RESET}"
echo
echo "${COLOR_RED}Exiting until you disable v2 version.${COLOR_RESET}"
exit 1
fi

@potiuk
Copy link
Member Author

potiuk commented Sep 29, 2021

We already have one version check for Docker compose. Can we update it?

airflow/breeze

Lines 595 to 609 in ab7acfd

docker_compose_version=\$(docker-compose --version)
if [[ \${docker_compose_version} =~ .*version\ v2.* ]]; then
echo
echo "${COLOR_RED}Docker Compose Beta version v2 has a bug that prevents breeze from running.${COLOR_RESET}"
echo "${COLOR_RED}You have: \${docker_compose_version}.${COLOR_RESET}"
echo
echo "${COLOR_YELLOW}Please switch to stable version via Docker Desktop -> Experimental or by running:${COLOR_RESET}"
echo
echo "${COLOR_CYAN}docker-compose disable-v2${COLOR_RESET}"
echo
echo "${COLOR_YELLOW}Also please upvote https://github.com/docker/compose-cli/issues/1917${COLOR_RESET}"
echo
echo "${COLOR_RED}Exiting until you disable v2 version.${COLOR_RESET}"
exit 1
fi

Yeah. I totally forgot about it :). The message from Felix this morning reminde me about it :)

Copy link
Member

@feluelle feluelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this on MacOS with latest Docker Desktop for Mac 4.0.1

@github-actions
Copy link

The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.

@github-actions github-actions bot added the full tests needed We need to run full set of tests for this PR to merge label Sep 29, 2021
We started to use some newer features in docker-compose of breeze.
They are new enough (May 2020) that older versions of
docker-compose do not work with them.

This PR checks if the docker-compose is >= 1.29
@potiuk potiuk force-pushed the add-docker-compose-version-check branch from 9e59a08 to 4eb8e09 Compare September 29, 2021 12:24
@potiuk
Copy link
Member Author

potiuk commented Sep 29, 2021

New version with removed check for v2 (As it seems docker-archive/compose-cli#1917 is alredy fixed in latest two release candidates). It would be awesome @feluelle @mik-laj if you could check it with both "disable-v2" and "enable-v2"

@potiuk potiuk merged commit d2bdf05 into apache:main Sep 29, 2021
@potiuk potiuk deleted the add-docker-compose-version-check branch September 29, 2021 17:57
@potiuk potiuk restored the add-docker-compose-version-check branch April 26, 2022 20:51
@potiuk potiuk deleted the add-docker-compose-version-check branch July 29, 2022 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:dev-tools full tests needed We need to run full set of tests for this PR to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants