Page MenuHomePhabricator

Provide a way to import or discover new mw cli commands and docker-compose files from multiple sources
Closed, DeclinedPublic

Description

The general idea is that you should be able to add commands and services to the mw cli and, for example, a mediawiki extension should be able to provide these things directly in the extension's repository.

mw cli should be able to either automatically discover extensions, or probably more sanely, we could provide a command that enables/disables them to give the user more control and avoid too much magic.

Event Timeline

Could you please provide some example use case for this? I think providing new commands might be pretty hard, and should maybe be separated from the idea of reading docker-compose files from multiple sources.

On the latter, I'm also not sure how that would work: is the idea that some extension ships a docker-compose.yml file with a "database" service that uses MySQL? But then, how does that reconcile with another extension which does the same thing, but calls it "db" instead of database? And how would the mw cli be able to know anything helpful about those extension defined docker-compose services?

Now that I understand T253313 a bit better, I think overall I would be in favor of a centralized library of the docker-compose recipes (in the mw cli repo) rather than spreading them out into various locations.

Now that I understand T253313 a bit better, I think overall I would be in favor of a centralized library of the docker-compose recipes (in the mw cli repo) rather than spreading them out into various locations.

Yes, this briefly came up too.
I think having them decentralized will end up being impossible, as one thing I hit when trying this in mwdd v1 is that all docker composer versions need to be the same.

Regarding external commands, see for example the way that git supports extensions by adding a git-yourcommand binary to the path.

Declining this in its current state for now