Page MenuHomePhabricator

Add config sub-parser to toolforge-jobs command
Closed, DeclinedPublic

Description

Feature summary:
Right now toolforge-jobs doesn't handle the creation of image-specific configurations for the user.
Example is when user tries submitting a job using the tf-pywikibot image (this image is not yet out in the wild but will be soon). Right now the only way for the user to create the user-config.py and user-password.py files is to setup pywikibot seperately and run the generate-user-files.py by themselves, then copy it to the desired location where it will be accessible to the tf-pywikibot image.

this proposal is to add something like:
toolforge-jobs config --image <image-name> --dir /this/is/a/path
this can be called standalone and can also be called internally by toolforge-jobs run .... to generate the configs if they are not yet present.
--dir defaults to $HOME/.... if not provided.

Use case(s):
This is feature will be used for the generation of configuration files required by some custom images like the tf-pywikibot (and maybe expanded upon in the future to include other such images too that will be added)

Event Timeline

toolforge-jobs config --image <image-name> ... sounds like an attempt at a general purpose solution. I am not sure that we know enough at this point about any use case other than pywikibot that makes this a reasonable investment. I think that it would be more straight forward to start with a very specific to pywikibot command instead. Refactoring that to be more generic is always possible in the future if other use cases are found.

dcaro subscribed.

I think that nowadays the buildservice pywikibot image replaces this, please reopen if I'm missing something.

taavi changed the task status from Resolved to Declined.Mar 11 2024, 2:42 PM