6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-12-04 19:03:39 +00:00

depr: drop support for docker-compose

Instead, the compose plugin must be installed.
We deprecate docker-compose because v1 is not supported starting from
the end of June 2023.

See "evolution of compose": https://docs.docker.com/compose/compose-v2/
This commit is contained in:
Régis Behmo 2023-04-28 10:36:45 +02:00
parent 11b2091e32
commit 39a8b46854
2 changed files with 4 additions and 25 deletions

View File

@ -1,4 +1,5 @@
- 💥[Feature] Upgrade to Palm. (by @regisb)
- [Bugfix] Rename ORA2 file upload folder from "SET-ME-PLEASE (ex. bucket-name)" to "openedxuploads". This has the effect of moving the corresponding folder from the `<tutor root>/data/lms/ora2` directory. MinIO users were not affected by this bug.
- 💥[Improvement] During registration, the honor code and terms of service links are no longer visible by default. For most platforms, these links did not work anyway. (by @regisb)
- 💥[Deprecation] Halt support for Python 3.7. The binary release of Tutor is also no longer compatible with macOS 10. (by @regisb)
- 💥[Improvement] During registration, the honor code and terms of service links are no longer visible by default. For most platforms, these links did not work anyway.
- 💥[Deprecation] Halt support for Python 3.7. The binary release of Tutor is also no longer compatible with macOS 10.
- 💥[Deprecation] Drop support for `docker-compose`, also known as Compose V1. The `docker compose` (no hyphen) plugin must be installed.

View File

@ -173,30 +173,8 @@ def docker(*command: str) -> int:
return execute("docker", *command)
@lru_cache(maxsize=None)
def _docker_compose_command() -> Tuple[str, ...]:
"""
A helper function to determine which program to call when running docker compose
"""
if os.environ.get("TUTOR_USE_COMPOSE_SUBCOMMAND") is not None:
return ("docker", "compose")
if shutil.which("docker-compose") is not None:
return ("docker-compose",)
if shutil.which("docker") is not None:
if (
subprocess.run(
["docker", "compose"], capture_output=True, check=False
).returncode
== 0
):
return ("docker", "compose")
raise exceptions.TutorError(
"docker-compose is not installed. Please follow instructions from https://docs.docker.com/compose/install/"
)
def docker_compose(*command: str) -> int:
return execute(*_docker_compose_command(), *command)
return execute("docker", "compose", *command)
def kubectl(*command: str) -> int: