Page MenuHomePhabricator

Scripts and libraries repository consolidation
Open, Needs TriagePublic

Description

Based on past discussions we want to consolidate scripts and libraries that currently span across multiple repositories.
The main benefit are:

  • atomic deployment/checkout reducing the risk of out-of-sync dependencies
  • making changes spanning multiple libraries or scripts in a single commit or code review
  • running unit tests and mypy in CI across the whole codebase
  • easier refactoring to reduce duplication

In the cookbooks repository we are incrementally moving shared functions into __init__, and for repositories on GitLab we can:

Event Timeline

@Marostegui @CWilliams-WMF it would be good this now that we don't have many MR open (so that it takes a short time to move them to the consolidated repo). Any thoughs?

@FCeratto-WMF where are you suggesting that these are rehomed to?

@CWilliams-WMF if we want to use one of the 4 repos perhaps "scripts" because it has a more generic name, otherwise we would need to create a new one

I would suggest a new repo:

  • tracking migration is easy, the import / script path will be different
  • old repos can be made read-only

It should be under the https://gitlab.wikimedia.org/repos/data_persistence/ maybe https://gitlab.wikimedia.org/repos/data_persistence/dbtools , ideally with a name that does not create confusion with scripts/wmfdb/wmfmariadbpy ... maybe just dbtools? mariadb-ops?

I would suggest that you name the repo so that the Python module path matches, which rules out mariadb-ops due to the hypen.

It's not a Python module, there are going to be different directories with tools and libraries in them, anyhow shall we just call it dbtools then?

It's not a Python module, there are going to be different directories with tools and libraries in them

Why not? Isn't that the point, to simplify and have one path to import from?

anyhow shall we just call it dbtools then?

Do you mean https://gitlab.wikimedia.org/repos/data_persistence/dbtools/dbtools ? That seems odd naming