[09:30:59] !log h2o@tools-bastion-13 tools.stewardbots Restarted StewardBot out of IRC [09:31:02] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools.stewardbots/SAL [17:10:39] Hello, I'm back with new questions concerning Toolforge! I don't understand why we can use `toolforge jobs run --image tool-pywikibot/pywikibot-scripts-stable:latest --command "blblbl` but we can't use it like `webservice tool-pywikibot/pywikibot-scripts-stable:latest shell`. I'm trying to avoid the `git clone` of Pywikibot sources advised in this [17:10:40] tutorial: https://wikitech.wikimedia.org/wiki/Help:Toolforge/Running_Pywikibot_scripts_(advanced) [17:12:40] I think `webservice buildservice shell` should work? [17:12:51] (though apparently you need to add either `--mount=all` or `--mount=none` depending on whether you need NFS mounted or not) [17:14:39] I don't think they are using pywikibot ? [17:15:34] ah, I sort of skimmed over the image name, sorry 😅 [17:18:10] I just tried to check, I think it didn't like it: `error: timed out waiting for the condition` with `webservice buildservice shell --mount=all` and `webservice buildservice shell --mount all` [17:19:31] Lofhi: Why do you need pywikibot inside a webservice ? [17:23:00] To be honest, I'm really feeling the waters. I thought I'd understood the whole Toolforge architecture, but I haven't. I want to use `pip` to install Python modules, but the recommended way is to clone the Pywikibot sources in order to create a specific image with the venv instead of using the centralized image updated by the Toolforge team? [17:23:14] (link of the tutorial in my first message) [17:25:48] And the centralized image of Pywikibot was created to avoid versions segregation If I remember correctly, so I'm living a living paradox. [17:26:53] But also, you'd think that a serious developer would rebuild their own image with each new version of Pywikibot after handling breaking changes... it's true. [17:27:18] If you plan on creating your own image, you can install it using pip [17:28:01] But we can't use the `tool-pywikibot/pywikibot-scripts-stable:latest` and create a venv "on the top of it", right? [17:29:22] Not really, you can't do that [17:29:44] I don’t think so [17:30:59] Is it possible to explain the difference for intellectual curiosity? Because I really don't understand the difference here. [17:31:28] (meaning I'm lost) [17:31:58] Cause `tool-pywikibot/pywikibot-scripts-stable:latest` is only displayed in wikitech documentation, there are some others images that we can run, but not build on them? [17:35:09] I'll try, so the `webservice` command is only used to build tools that have a web interface which requires special programs to be installed (gunicorn). Because of that, there are only a few specific images you can build on top of. [17:37:37] For the command `toolforge jobs run --image tool-pywikibot/pywikibot-scripts-stable:latest --command "blblbl` you are running something without a web interface as a one time job. So in this case you can use the pywikibot image (which is a regularly updated image that comes with pywikibot built in but with no web interface). [17:39:18] Meaning that even `webservice python3.11 shell` have a web interface? [17:39:49] The image python3.11 has the ability to auto-setup a web interface yeah (re @wmtelegram_bot: Meaning that even `webservice python3.11 shell` have a web interface?) [17:40:04] You can use other images with the run command as well including images that you build on your own using the build services (because some peeps use specialized bots that require access to OCR) (re @sohom_datta: For the command toolforge jobs run --image tool-pywikibot/pywikibot-scripts-stable:latest --command "blblbl you are running some...) [17:43:58] On a slightly different note, I wonder if I could convince toolforge maintainers to ship a generic celery image :) [17:44:42] So, even when you are not using the web interface, you still need to create a web service... without using the web interface? [17:45:27] You can have tools without webservices as well (re @wmtelegram_bot: So, even when you are not using the web interface, you still need to create a web service... without using the web inter...) [17:46:38] Or you could do what I do and build a single fat image that has both the web stuff and the bot stuff and run a job and a webservice at the same time using the same image [17:46:51] Maybe webservice is misnamed, no? [17:47:09] Not really why ? [17:48:27] I admit that it's a bit of a brain-buster to have to create an image and run it as a webservice without using the web interface... :-( [17:49:34] Which web interface are you using, it's not supposed to be that hard :) [17:51:07] https://gitlab.wikimedia.org/toolforge-repos/wsstats is a repo where I run a pywikibot on a schedule while also having a web interface [17:53:17] I don't think it's hard yea, but I'm not sure about the right way. Cause it seems that for a Pywikibot you could also just use your own buildpack with the right Procfile, instead of creatin a venv, set-up the environnement, then using a `webservice python3.11 shell`? [17:54:01] (thanks for the repo) [17:56:09] Yeah you could do that. (It's recommended for custom stuff) (re @wmtelegram_bot: I don't think it's hard yea, but I'm not sure about the right way. Cause it seems that for a Pywikibot you could also ju...) [17:57:17] So, we could add this method without objection on https://wikitech.wikimedia.org/wiki/Help:Toolforge/Running_Pywikibot_scripts_(advanced) ? [18:01:40] Yep probably :) [18:02:39] Meh, I am currently using the old "way": https://wikitech.wikimedia.org/w/index.php?title=Help:Toolforge/Running_Pywikibot_scripts_(advanced)&oldid=1998803 [18:02:53] The current version of the article is recent, but not talking about buidpack [18:03:16] So I think the venv method is still valid and could be displayed with the buildpack method [18:03:59] The venv is easier than the buildpack one imo and is very much still supported [18:04:33] okay okay! [18:04:54] thank you very much for the details! [18:08:11] Do you know if the buildpack support poetry/hatch? [18:09:51] Don't think so, only talking about requirements.txt https://github.com/heroku/buildpacks-python [18:11:10] I forgot which buildpacks are used on Toolforge... https://github.com/heroku/heroku-buildpack-python ? [18:12:24] Ah, it seems that it's the latter [18:16:42] Ah, not it's the first one -_- [18:21:56] Alright, enough for today, Toolforge buildpack architecture is fun, but a bit tense at first, thanks for help Sohom_Datta ! [18:22:09] No issues :) [23:35:46] How can I delete my test OAuth consumers ? [23:35:53] those found there https://meta.wikimedia.org/wiki/Special:OAuthConsumerRegistration [23:56:16] I’m not sure deleting OAuth consumers is possible, actually [23:56:26] but I assume you could request that they’re disabled, at https://meta.wikimedia.org/wiki/Steward_requests/Miscellaneous#OAuth_permissions [23:56:37] (maybe using https://meta.wikimedia.org/wiki/Template:Oauthapprequest)