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

Set expectation of Docker compose v2 and update references and compose file appropriately #3973

Closed
sarayourfriend opened this issue Mar 26, 2024 · 2 comments
Labels
🤖 aspect: dx Concerns developers' experience with the codebase 🧰 goal: internal improvement Improvement that benefits maintainers, not users 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: mgmt Related to repo management and automations

Comments

@sarayourfriend
Copy link
Collaborator

Problem

We now get warnings when running docker compose due to our compose file being an out-of-date format:

WARN[0000] /home/sara/projects/openverse/docker-compose.yml: `version` is obsolete 

Ideally, no one is running compose v1 any more, and it's relatively trivial to install compose v2 binaries even if your regular docker distribution doesn't support it (the worst case is downloading a binary, chmod +x it, and copy it to the right location).

Continuing to support compose v1 comes with some cruft, including the complex parsing of the just ps script, which wasn't able to use the JSON output due to needing to support compose v1.

Description

Update our documentation to specifically mention a recent version of compose v2 as the baseline expectation. Update the compose file to fix the warnings and any format changes needed to support compose v2 (should not be any, but might be minor ones). We can update references to docker-compose to use docker compose in all just scripts to emphasise the lack of support for compose v1 and quickly identify cases where compose v2 is not being used. Even though the compose CLI plugin can be used on it its own, it's easier to block out the possibility of v1 by relying on the CLI plugin functionality.

All of that should be relatively simple, so we can also update the script backing just ps recipe if we want, or else make an additional issue to do that separately. The current script works with compose v2, but we should be able to delete a fair bit of the more complex code from that script by leveraging compose v2's JSON output rather than the table output of docker compose ps.

Additional context

Marked medium rather than low because the flood of warnings in the console are very annoying.

@sarayourfriend sarayourfriend added 🟨 priority: medium Not blocking but should be addressed soon 🤖 aspect: dx Concerns developers' experience with the codebase 🧰 goal: internal improvement Improvement that benefits maintainers, not users 🧱 stack: mgmt Related to repo management and automations labels Mar 26, 2024
@openverse-bot openverse-bot moved this to 📋 Backlog in Openverse Backlog Mar 26, 2024
@obulat
Copy link
Contributor

obulat commented Apr 3, 2024

@sarayourfriend, is this a duplicate of #3876? The added context in them is different, but the issue seems the same.

@sarayourfriend
Copy link
Collaborator Author

Whoops, this is a duplicate, you're right. Apologies!

@sarayourfriend sarayourfriend closed this as not planned Won't fix, can't repro, duplicate, stale Apr 3, 2024
@openverse-bot openverse-bot moved this from 📋 Backlog to 🗑 Discarded in Openverse Backlog Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 aspect: dx Concerns developers' experience with the codebase 🧰 goal: internal improvement Improvement that benefits maintainers, not users 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: mgmt Related to repo management and automations
Projects
Archived in project
Development

No branches or pull requests

2 participants