Page MenuHomePhabricator

Migrate m3api hosting from GitHub to Wikimedia GitLab
Closed, ResolvedPublic

Assigned To
Authored By
LucasWerkmeister
Apr 18 2025, 11:05 AM
Project Tags
Referenced Files
F66021668: image.png
Sep 14 2025, 1:35 PM
F66021666: image.png
Sep 14 2025, 1:35 PM
F66021595: image.png
Sep 14 2025, 11:42 AM

Description

The m3api library (introductory blog post) should, for ideological reasons, migrate to Wikimedia GitLab sooner or later. (Or other Wikimedia hosting, but GitLab seems like the best option for now. I don’t think a Gerrit workflow makes sense for the library at the moment.) It seems sensible to do this now, before I create more extension packages that will then have to be migrated.

This will take some work, including but perhaps not limited to:

  • Moving issue tracking from GitHub issues to Phabricator. This will require a Phabricator project for m3api, and that should probably be the first thing done, so that all other tasks for the migration (including this one) can be tracked appropriately. ⇒ T392291: Create project tag for m3api

    In general, having the issues on Phabricator will probably be nicer than on GitHub. It makes it easier to cross-reference other Wikimedia tasks, and it also could reduce the confusion related to issues that are related to more than one m3api package (such as m3api-oauth2#3, which affected m3api-oauth2 but had to be fixed by a code change in m3api; or m3api#9 and m3api#27, which were created in m3api but resulted in the creation of separate repositories) – though that will depend on some extent on how we manage projects / tags for individual m3api packages (because of how Phabricator handles subprojects).

    I don’t think it will be necessary to migrate already-closed tasks to Phabricator.
  • Moving the source code to GitLab. I’ll probably request an m3api organization, so that the individual repositories can be e.g. m3api/m3api, m3api/m3api-oauth2 and so on, rather than living under the lucaswerkmeister/ namespace. (Or should it be repos/m3api/m3api etc.? I’m not sure.) The duplication of “m3api” in the organization and individual repos is a bit annoying, but I think I’d rather have that than e.g. m3api/core, m3api/oauth2 and so on. ⇒ T392323: Create new GitLab project group: m3api
  • Recreating all the GitHub releases on GitLab. Just a bit of manual busywork. (Notably, GitLab releases let you set the release date, so it should be possible to reflect the original release date. Yay!)
  • Migrating the regular CI. For most of the packages, this should be relatively straightforward. It’ll be somewhat annoying for m3api-oauth2 – I’ll have to build a GitLab CI version of my setup-mediawiki action (unless one already exists), to run CI against a wiki with an artificially lowered $wgOAuth2GrantExpirationInterval (compare T374562). ⇒ T402700: Migrate m3api CI from GitHub Actions to GitLab CI

Event Timeline

(Discovered while working on T392716: Host m3api documentation on doc.wikimedia.org but not directly related so I’ll leave the comment here:)

Apparently GitLab doesn’t support running CI stages when a release is created (source); instead, the GitLab approach is to let the pipeline run when a tag is pushed and then create a release in that pipeline. (And then, I expect, I’ll edit the release description to tweak the formatting a bit.) Meh.

As mentioned in T392716#11178593, for now I’m leaving the docs on GitHub pages, so this task is no longer blocked on T392716. Which I think means the actual migration should be good to go now…

Recreating all the GitHub releases on GitLab. Just a bit of manual busywork. (Notably, GitLab releases let you set the release date, so it should be possible to reflect the original release date. Yay!)

Bleh, the release date part isn’t quite working out. It still shows up as “created just now”:

image.png (688×86 px, 13 KB)

I’m not sure what the release date field is supposed to be for, then. I can see it when I go to edit the release, but it’s not clear to me if anybody else can see it (maybe via the API, but seemingly not via the UI). Whatever, the original date is still noted in CHANGES.md.

o_O apparently it shows the release date in the list of releases

image.png (1,856×776 px, 137 KB)

…but the creation date when showing the individual release:
image.png (1,856×776 px, 137 KB)

I’ll take it, I guess.

LucasWerkmeister updated the task description. (Show Details)

Alright, I’ve created all the real repositories on GitLab and manually copied over all the releases. At some point during the next week (hopefully), I’ll publish new releases of the libraries (1.0.1, probably), both to get the new repo URLs published more widely and to test the release CI. (I don’t want to do it today, so that the release creation dates between the imported and fresh releases are different.)

LucasWerkmeister claimed this task.

I’ve published 1.0.1 versions of all the libraries (Mastodon announcement), and with that I think this is done! (The remaining subtasks will hopefully happen sooner or later but I don’t consider them blockers.)

🎉