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

Compose version property is obsolete #1066

Closed
kdmccormick opened this issue May 20, 2024 · 2 comments · Fixed by #1070
Closed

Compose version property is obsolete #1066

kdmccormick opened this issue May 20, 2024 · 2 comments · Fixed by #1070
Assignees
Labels
good first issue Good issue to tacke for first-time contributors

Comments

@kdmccormick
Copy link
Collaborator

Bug description

As mentioned here, docker-compose now warns of a deprecated property

/home/tutor/.local/share/tutor/env/local/docker-compose.yml: `version` is obsolete
/home/tutor/.local/share/tutor/env/local/docker-compose.prod.yml: `version` is obsolete
/home/tutor/.local/share/tutor/env/local/docker-compose.jobs.yml: `version` is obsolete

How to reproduce

Run any tutor command that invokes docker-compose. tutor local run lms bash would work.

Environment

Python 3.10.12
Compose v1.29.2 (should work with newer versions, too)

Recommended Fix

The version property of Compose .yml files is obsolete as of 1.27 and should be removed, as described in official compose spec):

Legacy versions 2.x and 3.x of the Compose file format were merged into the Compose Specification. It is implemented in versions 1.27.0 and above (also known as Compose V2) of the Docker Compose CLI.

and again:

The top-level version property is defined by the Compose Specification for backward compatibility. It is only informative and you'll receive a warning message that it is obsolete if used.

Tutor recommends docker-compose>=2.0.0, so we should be plenty safe to remove remove this property from all compose files. Furthermore, Tutor's DOCKER_COMPOSE_VERSION config setting is only used to set the obsolete version property, and overriding that config version never would have been viable for end-users anyway, so I recommend removing the config setting too.

@kdmccormick kdmccormick added the good first issue Good issue to tacke for first-time contributors label May 20, 2024
@jasonmokk
Copy link
Contributor

Hello, I'd like to work on this issue.

@kdmccormick
Copy link
Collaborator Author

Great @jasonmokk , it's all yours! Let me know if you need any help getting started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good issue to tacke for first-time contributors
Projects
Development

Successfully merging a pull request may close this issue.

2 participants