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

[Quality] Add just file to script docker tasks #1718

Closed
1 task done
sarayourfriend opened this issue Aug 23, 2021 · 1 comment · Fixed by WordPress/openverse-catalog#153
Closed
1 task done

[Quality] Add just file to script docker tasks #1718

sarayourfriend opened this issue Aug 23, 2021 · 1 comment · Fixed by WordPress/openverse-catalog#153
Assignees
Labels
🚦 status: awaiting triage Has not been triaged & therefore, not ready for work
Projects

Comments

@sarayourfriend
Copy link
Contributor

Current Situation

Currently our README is full of specific docker commands that you have to run to do certain things like attach to the airflow container, read airflow logs, and start the services themselves.

Suggested Improvement

We could improve this by using the just utility (available cross-platform) which is very similar to make but purpose made for being a command runner (whereas make is really a build system that gets abused as a command runner).

Benefit

A few benefits:

  1. Easier for beginners to Openverse to get started (install just then run just start for example)
  2. Easier for developers to run repetative tasks like seeing logs or attaching to the airflow container (just attachairflow, just logs, etc)
  3. Our README's become more maintainable as all the commands will just be references to the just recipes.

Additional context

One advantage make has over just (and this is huge) is that make is preinstalled on many machines, whereas just is not preinstalled anywhere. just has better ergonomics, however, for command running than make. For example, in make when you want to create a command you have to also add the PHONY tag to avoid accidentally interacting with the filesystem. You also cannot pass extra arguments to make commands, whereas just allows you to do so explicity.

Implementation

  • 🙋 I would be interested in implementing this feature.
@sarayourfriend sarayourfriend added the 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work label Aug 23, 2021
@sarayourfriend
Copy link
Contributor Author

While I presented this as an advantage to just, I think it could also be seen as a disadvantage. You can define dependent recipes for a given recipe but they are not conditional on anything, like a file existing in the case of make, so they will always run. For example, if you want yout makeenv recipe which generates the template .env file for you to be a dependency of your docker based recipes, you can't do that in just without building the conditional into the recipe itself.

It's not a big deal but just one frustration with just that I didn't anticipate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚦 status: awaiting triage Has not been triaged & therefore, not ready for work
Projects
Archived in project
Openverse
  
Done!
Development

Successfully merging a pull request may close this issue.

1 participant