[02:23:46] Hallo. I did some stuff on toolforge many years ago, but I forgot everything, and a lot has probably changed since then, and I'm doing completely different things now. I managed to log in to shell, and clone my Python code from Gitlab, and run pip install, and it even runs as I want it to. So far so good. But now I want to try to use ToolsDB and write something using [02:23:46] that Python [02:23:47] code to a shared MariaDB that can be queried using Quarry. [02:23:58] I'm able to run `mariadb --defaults-file=$HOME/replica.my.cnf -h tools.db.svc.wikimedia.cloud`, as the page https://wikitech.wikimedia.org/wiki/Help:Toolforge/ToolsDB suggests. But I need to connect to the database while I'm in the Python shell (`toolforge webservice python3.13 shell`), and when I'm in it, the `mariadb` and `sql tools` commands don't seem to exist. [02:24:11] What am I missing? [02:56:40] correct, most of the containers don't contain command-line tools. You'll want to use a Python database library instead. pymysql is most common, and you can use https://python-toolforge.readthedocs.io/en/latest/ to make it a little easier [08:34:15] I use pymysql already. Now I'm wondering if I should keep using pymysql—but then I'm wondering what do I write in host when I do connect(). Or if I should switch from pymysql to toolforge.connect. (re @wmtelegram_bot: correct, most of the containers don't contain command-line tools. You'll want to use a Python database library i...) [08:34:45] I would also recommend the toolforge library. it takes care of credentials too [08:41:14] OK, so I could use `sql tools` and run `create database s57441__wikifunctionsanalytics`. Now from the python code, I am doing `toolforge.connect("s57441__wikifunctionsanalytics")` and get an error: `pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on 's57441__wikifunctionsanalytics.web.db.svc.wikimedia.cloud' ([Errno -2] Name or service not known)")` [08:43:21] I think you want toolforge.toolsdb() instead of toolforge.comment() [08:45:59] Oh! This seems to work. And it's just a few lines later in the docs 🤦🏻‍♂️ Thanks! [11:17:28] OK, it's quite unbelievable, but functionally, the tool does everything I want it to. Thanks a lot for the help, taavi, @lucaswerkmeister, and AntiComposite. [11:20:30] Now some bonus questions... In defining the tool, I can define a Gitlab repo. I did it, and the relevant code is in that repo, but I didn't actually use this connection. Does it mean that it can somehow automatically clone or sync or deploy the code? For now, I just ran `git clone` in the shell. [11:38:28] @amire80 it can! but it's a brand new thing that is still not completely working, see https://wikitech.wikimedia.org/wiki/Help:Toolforge/Deploy_your_tool [11:41:22] depending on your requirements, you might not be able to do the fully automated deploy yet, but you should be able to build your tool from the gitlab repo, so you don't have to clone and sync manually: https://wikitech.wikimedia.org/wiki/Help:Toolforge/Building_container_images [11:42:48] Thanks! [13:59:36] !log deployment-prep deleting ptr record 117.0.16.172.in-addr.arpa. -- accidental duplicate for deployment-kafka-logging01.deployment-prep.eqiad1.wikimedia.cloud [13:59:39] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Deployment-prep/SAL [14:27:54] !log jeanfred@tools-bastion-15 tools.heritage Deploy 84a13d7, ddda476, dbb689f, dd7ce20, 1d9f43f, 5dbba03, cd1600e (T410842) [14:27:59] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools.heritage/SAL [16:43:01] !log jeanfred@tools-bastion-15 tools.heritage Deploy 7d27353 (T420017) [16:46:29] !log jeanfred@tools-bastion-15 tools.heritage Deploy 656e5fe [16:54:54] no more stashbot :< [16:57:49] hm, elasticsearch WARNING : POST http://elasticsearch.svc.tools.eqiad1.wikimedia.cloud:80/irc-2026.03/_doc [status:N/A request:0.006s] … ConnectionResetError: [Errno 104] Connection reset by peer in the logs [16:58:55] !log lucaswerkmeister@tools-bastion-15 tools.stashbot bin/stashbot.sh restart [16:58:58] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools.stashbot/SAL [16:59:14] @JeanFred you might want to re-log those messages [17:00:12] why is that crashing the entire thing? is stashbot not setting a proper timeout somewhere? [17:01:03] I don’t think it was a timeout thing, given the request:0.006s 🤔 [17:01:32] (I also don’t know why that crashed stashbot so badly – the pod was still running, otherwise k8s would’ve restarted it. `bin/stashbot.sh restart` just deletes the pod) [19:06:28] !log tools reboot tools-bastion-14 T420044 [19:06:31] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/SAL [19:09:58] !log bastion reboot bastion-eqiad1-6 bastion-restricted-eqiad1-3 [19:09:59] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Bastion/SAL [20:01:40] !log zuul stop/starting several k8s nodes to fix incorrect MTU [20:01:40] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Zuul/SAL [20:05:39] !log catalyst-dev restarting k3s-envDB to fix incorrect MTU [20:05:41] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Catalyst-dev/SAL [20:06:41] !log o11y restarting phi-syslog-01 to fix incorrect MTU [20:06:42] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:O11y/SAL [20:19:27] !log jeanfred@tools-bastion-15 tools.integraality Deploy 0c418a5 (Fix tests hitting live Wikidata API (and potential rate-limits)) for T420054 [20:19:31] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools.integraality/SAL [20:33:28] !log jeanfred@tools-bastion-15 tools.integraality Deploy a39f1d9 (Add proper handling for transient Wikidata server errors) for T415439 [20:33:31] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools.integraality/SAL [20:39:57] how does stuff get a bad MTU to begin with? [20:44:41] jeremy_b, it's an historical artifact, I believe they're leftovers from before a change to the default. This is where the rabbit hole starts: https://phabricator.wikimedia.org/T408543 [20:46:44] I'm less sure how there are any of those left though... might be something else happening [22:04:53] !log tools reboot tools-bastion-15 T420044 [22:04:56] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/SAL [22:19:32] !log bastion reboot bastion-eqiad1-5 T420044 [22:19:34] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Bastion/SAL [22:20:52] took me a second to spot the difference between those two 1-?5 bastions lol [22:21:02] we should definitely keep those numbers in sync