Page MenuHomePhabricator

Request creation of LSC VPS project
Closed, InvalidPublic

Description

Project Name: lsc

Wikitech Usernames of requestors: @Ladsgroup (I make sure to add more later)

Purpose: LSC, large-scale changes, is a webservice to let code maintainers make patches en masse.

Brief description: This service helps maintainers, specially mediawiki core maintainers, make lots of patches as part of deprecation and fixes. For example, replacing DB_MASTER to DB_REPLICA across all extensions can be overwhelming. It's inspired by a service with the same name in Google (for more info read this book). You can see an example of it in https://phabricator.wikimedia.org/T255493#7753500

The code is in https://github.com/Ladsgroup/Gerrit-maintenance-bot/ but I haven't written the webservice part yet.

How soon you are hoping this can be fulfilled: Any time that works for WMCS. I don't need a large service.

Event Timeline

Is it not possible to run this as a Toolforge tool?

To be honest, I don't know. I thought about it before making this request (but didn't think a lot). The biggest con of toolforge is the security, specially given that this will be able to create a lot of patches, etc. and I want to isolate the ssh agent as much as possible.

I'm sure I tried HTTPS and it didn't work, specially since it's much simpler than doing it with ssh.

Ladsgroup changed the task status from Open to Stalled.Mar 21 2022, 9:42 AM

let me give it a try with toolforge and if I succeed, I'll close this ticket.

I've got lsc in toolforge up and running: https://lsc.toolforge.org

But it can't create any patches as ssh is not installed in the containers:

  File "/usr/lib/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'ssh-add': 'ssh-add'
[pid: 13|app: 0|req: 7/10] 192.168.209.146 () {66 vars in 1232 bytes} [Sun Apr 10 22:04:27 2022] POST /php/simple-replace => generated 290 bytes in 1049 msecs (HTTP/1.1 500) 3 headers in 254 bytes (1 switches on core 0)
tools.lsc@tools-sgebastion-10:~/www/python/src$ webservice --backend=kubernetes python3.7 shell
tools.lsc@shell-1649628755:~$ ssh -h
bash: ssh: command not found
tools.lsc@shell-1649628755:~$

I will give it a try to make it work with HTTPS and if I fail, I reopen this ticket.

It seems toolforge is working. Making git hooks work was a bit annoying but done.