Page MenuHomePhabricator

Cleanup of the project stewardbots
Open, Needs TriagePublic

Description

  • Currently there's a lot of files, folders and a lot of stuff from when the tools were run in the Toolserver. We should identify which ones are still for use and updated, and delete the others from Labs.
  • Also, a better organization would be much appreciated.

To review (referenced to $HOME/)

  • .cache: From 2019, needed?
  • .cloud-locale-test.skip: Empty, needed?
  • core: What is this?
  • docs: Old Toolserver documentation, can be deleted IMHO.
  • .composer - maybe needed by the Elections tool?
  • config: ???
  • .python27_compiled: No longer required I guess.
  • StewardElectionsBot and Watchlist-bots: most likely broken (py2, freenode) and replaced by other bots. Suggest deleting.
  • .subversion: old SVN stuff, can be deleted I guess.

Event Timeline

Luke081515 renamed this task from Cleanup of the project to Cleanup of the project stewardbots.Mar 15 2016, 7:54 PM
MarcoAurelio rescinded a token.
MarcoAurelio raised the priority of this task from Low to Medium.Jan 26 2020, 10:48 AM

Over the years this has become such a mess... We need to follow proper project structure, etc.

TheresNoTime subscribed.

In doing some patch reviews, I started to go down the yak shaving path, so will grab this to work on in my spare time 😹

TheresNoTime lowered the priority of this task from Medium to Low.Jul 5 2022, 10:49 AM
TheresNoTime raised the priority of this task from Low to Needs Triage.

Taking a look today, February 18, 2023 I see among other things:

  • a bin folder with symlinks to old bash scripts to restart the bots via Grid, probably no longer needed
  • bigbrother files which, according to Toolforge are deprecated and probably no longer needed since we deploy our bots via k8s.
  • DATA.crontab and DATA.olduser which probably can go too
    • crontab -l lists some deprecated jobs which I think can go too because we use k8s now; tempted to just crontab -r
    • we may wish to set a logrotate on the Grid later nonetheless for the logs that get generated just in case?
  • a core file of 2.8M -> no idea what is this: tailing it just prints an unreadable output
  • 5 venvs - do we need them all?
  • .python27_compiled -- probably not needed either
  • a .subversion dir which doesn't seem to be used?
  • a .hhvm.hhbc file of 4M from 2020
  • old WatchList bots that won't probably work now
  • several other hidden files which need to be evaluated

Mentioned in SAL (#wikimedia-cloud) [2023-02-18T16:09:43Z] <wm-bot> <maurelio> Deleted crontab for stewardbots; backup saved at crontab_20230218.txt | T130031

crontab deleted but saved its contents in a txt file just in case. AFAICS these were the old bigbrother jobs we used to keep the bots active which predate k8s and are no longer needed - checking https://grid-deprecation.toolforge.org/t/stewardbots I see no grid jobs for the last 7 days for our project

Change 889617 had a related patch set uploaded (by MarcoAurelio; author: MarcoAurelio):

[labs/tools/stewardbots@master] Delete cron.txt

https://gerrit.wikimedia.org/r/889617

Change 889618 had a related patch set uploaded (by MarcoAurelio; author: MarcoAurelio):

[labs/tools/stewardbots@master] Delete privacy.html

https://gerrit.wikimedia.org/r/889618

Change 890163 had a related patch set uploaded (by MarcoAurelio; author: MarcoAurelio):

[labs/tools/stewardbots@master] Fix tox issues for StewardBot.py

https://gerrit.wikimedia.org/r/890163

Change 890163 merged by jenkins-bot:

[labs/tools/stewardbots@master] Fix tox issues for stewardbots

https://gerrit.wikimedia.org/r/890163

Change 889617 merged by jenkins-bot:

[labs/tools/stewardbots@master] Delete cron.txt

https://gerrit.wikimedia.org/r/889617

Change 889618 merged by jenkins-bot:

[labs/tools/stewardbots@master] Delete privacy.html

https://gerrit.wikimedia.org/r/889618

Change 890188 had a related patch set uploaded (by MarcoAurelio; author: MarcoAurelio):

[labs/tools/stewardbots@master] Follow-up cdd4595: Update index.php (legacy webservice)

https://gerrit.wikimedia.org/r/890188

Mentioned in SAL (#wikimedia-cloud) [2023-02-19T16:17:29Z] <wm-bot> <maurelio> rm -v .bigbrotherrc.deprecated # T130031

Mentioned in SAL (#wikimedia-cloud) [2023-02-19T16:20:17Z] <wm-bot> <maurelio> rm -v ...DATA.crontab ...DATA.olduser # cleanup: T130031

More unused/legacy/unneeded files deleted:

# bigbrother leftovers
removed 'bigbrother.sh'

# bin folder (old grid scripts)
tools.stewardbots@tools-sgebastion-10:~/bin$ ls -la
total 16
drwxr-sr-x  2 tools.stewardbots tools.stewardbots 4096 Jul  2  2020 .
drwxrwsr-x 26 tools.stewardbots tools.stewardbots 4096 Feb 19 17:19 ..
lrwxrwxrwx  1 tools.stewardbots tools.stewardbots   70 Jul  2  2020 restart_stewardbot.sh -> /data/project/stewardbots/stewardbots/StewardBot/restart_stewardbot.sh
lrwxrwxrwx  1 tools.stewardbots tools.stewardbots   70 Jul  2  2020 restart_SULWatcher.sh -> /data/project/stewardbots/stewardbots/SULWatcher/restart_SULWatcher.sh

tools.stewardbots@tools-sgebastion-10:~$ rm -Rv bin
removed 'bin/restart_stewardbot.sh'
removed 'bin/restart_SULWatcher.sh'
removed directory 'bin'

Change 890188 merged by jenkins-bot:

[labs/tools/stewardbots@master] Follow-up cdd4595: Update index.php (legacy webservice)

https://gerrit.wikimedia.org/r/890188

Change 935154 had a related patch set uploaded (by AntiCompositeNumber; author: AntiCompositeNumber):

[labs/tools/stewardbots@master] Remove stewardbots-ui directory

https://gerrit.wikimedia.org/r/935154

Change 935154 merged by jenkins-bot:

[labs/tools/stewardbots@master] Remove stewardbots-ui directory

https://gerrit.wikimedia.org/r/935154

Mentioned in SAL (#wikimedia-cloud) [2024-04-24T19:26:29Z] <wmbot~anticomposite@tools-bastion-13> rm -r venv/ venv-k8s-py37/ venv-py3/ venv-py37-k8s/ # Remove old unused python 2.7, 3.5, and 3.7 venvs (T130031)