Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Page MenuHomePhabricator

Match on usage of Additional Hashtags, so that project renames don't break the bot
Open, LowPublicFeature

Description

I recently renamed the project "MediaWiki-extensions-Flow" to "Flow" (along with a handful of others), based on discussions we'd had a long time ago, and the precedent of other extensions having removed the prefix (eg WikiEditor).
For each extension, I moved the original title into the "Additional Hashtags" field, as I had been told this would prevent any breakages.
However, this led to wikibugs bot not reporting any recent changes into our team's IRC channel (#wikimedia-collaboration), only into the -dev channel.

I could just ask for these dozen items to be updated in wikibugs' config,[1] but that won't solve it long-term for all other projects that rename themselves, which will probably happen fairly frequently over the coming months and years.

[1] should I, as a short-term fix?

Event Timeline

Quiddity raised the priority of this task from to Needs Triage.
Quiddity updated the task description. (Show Details)
Quiddity added a project: Wikibugs.
Quiddity subscribed.

Yes, it would be appreciated if you could fix the config.

We had previously discussed storing immutable PHIDs rather than human readable names but decided that renames wouldn't be frequent and typically would be a one time thing. Now that Flow is "Flow", it's unlikely to change any further.

Yes, it would be appreciated if you could fix the config.

We had previously discussed storing immutable PHIDs rather than human readable names but decided that renames wouldn't be frequent and typically would be a one time thing. Now that Flow is "Flow", it's unlikely to change any further.

Was filed as T87846: wikibugs project renames

valhallasw triaged this task as Medium priority.Feb 7 2015, 8:40 PM
valhallasw subscribed.

After T1176: Get icon and color from API instead of screen scraping is implemented, this is fairly trivial to add, but in the current setup, it's hard. We currently screen scrape the list of projects, and that (obviously) doesn't tell us what the additional hashtags are. T1176 would get project info from the api, which includes additional hashtags.

bd808 changed the subtype of this task from "Task" to "Feature Request".Feb 17 2024, 8:30 PM

After T1176: Get icon and color from API instead of screen scraping is implemented, this is fairly trivial to add

I see a way to do this by rewriting the channels.yaml and gerrit-channels.yaml config files and changing ChannelFilter.channels_for, but that seems a bit more than what I would consider trivial. For a bit I thought it might be possible to do the project name to hashtag conversion in ChannelFilter.compile_channels, but I do not think that will work as the issue is that the current lookup key is the mutated text.

bd808 lowered the priority of this task from Medium to Low.Mar 10 2024, 4:35 AM

My assumption at the time was that the API would not just provide the current tag but also a list of aliases, in which case the current matching logic could be applied to the set of tags _and_ their aliases.

The API does provide the complete set of hashtags for a given project, but all of our current code and config is based on the display name of a project rather than its hashtags. The is currently no place where the bot deals with the #flow, #structureddiscussions, or #mediawiki-extensions-flow hashtags attached to the StructuredDiscussions project. Instead it uses the project's "StructuredDiscussions" display name.

When I said I see how this can be done by rewriting the config and then changing ChannelFilter.channels_for this, that would be about making the config and code use hashtags rather than display names for project matching.


Conduit's project.query does not return legacy display names like "MediaWiki-extensions-Flow" and "Flow" that have been associated with the StructuredDiscussions project. The only way I can see to get that information is by mining the project's transaction history to find the rename transactions. At the moment I have not actually be able to figure out how to get from the list of transaction PHIDs that transaction.search provides to details about those specific transactions. phid.lookup only gives back type information telling you the PHID is a transaction. There does not seem to be an equivalent of maniphest.gettasktransactions to find details on the edit transactions for a project. The data can be seen on https://phabricator.wikimedia.org/project/manage/657/ in the form of strings rendered for humans to read (Ctrl-F for "renamed this project from"), but we just got rid of screen scraping.

D'oh! Yeah, looks like I completely overlooked that fairly essential step 😅