Page MenuHomePhabricator

[L] File:Kameldornbaum_Sossusvlei.jpg stuck in a user's personal uploads queue
Closed, ResolvedPublicBUG REPORT

Description

A user reported that the user's personal upload File:Kameldornbaum_Sossusvlei.jpg is appearing in CAT but with no label suggestions.

Here's what appears to have hapened:

  • The image was loaded in CAT, and labels were requested
  • One suggested Wikidata ID value (Q6484949) refers to a deleted item, so no text label was returned with it, and it was omitted from being shown in the voting UI.
  • Votes were submitted for all suggestions but that one; four were accepted. A wbsetclaim request was made to set the four depicts statements.
  • In the PageContentSaveComplete hook handler following the claim submission, the file was checked (again) for inclusion in CAT using TitleFilter, failed because it now had more than 1 (MachineVisionMaxExistingDepictsStatements) existing depicts statements, and the remaining, not-voted-upon label suggestion was marked withheld (-2).
  • Now, when the user requests unreviewed personal images in CAT, the image is identified as a candidate for voting because it has one or more suggested labels in state 0 (unreviewed) or -2 (withheld), but the only suggestion remaining cannot be shown because it has no text label available.

Needed follow-ups:

  • When a label suggestion is received by the frontend with no label provided, submit a 'not-displayed' vote on it if and when the user submits votes (T250742).

Optional:

  • Improve detection of deleted Wikidata items when storing label suggestions so that invalid item IDs are discarded (and possibly removed from the mappings; see also T231105).

COVID-19 Deployment Criteria

  • Can you roll back this change without lasting impact?
    1. A recovery plan is required as this will help identify our capacity for recovering from the failure
    2. THIS IS A KEY QUESTION, if you can’t answer it, you shouldn’t deploy
  • Is specialized knowledge required to support this change in production? If so, are there multiple people with this knowledge?
  • Is there a way to increase confidence about the correctness of this change?
    1. Reviews (Design, Code, etc)
    2. Testing coverage (unit tests, integration tests)
    3. Manual testing (e.g. Beta, vagrant, docker)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Reassess the need for withholding remaining unreviewed labels in onPageContentSaveComplete, and consider removing that behavior

To give a little more background here, my original intent was to check that an image originally eligible for CAT inclusion based on the number of existing depicts statements did not fall out of eligibility as a result of the addition of new depicts statements outside CAT, and to withhold it from being served if it did so become ineligible.

That being said, the uploader would be seeing the same behavior here even if the sole unreviewed label had been left in unreviewed (0) state. Actually, the situation would be slightly worse in that case, because a different user could also possibly encounter the image in the "Popular" tab.

I think the important thing is to improve our treatment of deleted items and how this situation is handled in the frontend. As for this suggestion, I'll be bold and delete it.

CBogen renamed this task from Label votes are in an inconsistent state for File:Kameldornbaum_Sossusvlei.jpg to [L] Label votes are in an inconsistent state for File:Kameldornbaum_Sossusvlei.jpg.Apr 15 2020, 4:26 PM

Discussed this in sd-eng today. In the long run, the querying logic should be updated so that it doesn't rely on the labels being in a "consistent" state.

Mholloway renamed this task from [L] Label votes are in an inconsistent state for File:Kameldornbaum_Sossusvlei.jpg to [L] File:Kameldornbaum_Sossusvlei.jpg stuck in a user's personal uploads queue.Apr 28 2020, 2:23 PM
Mholloway updated the task description. (Show Details)
Mholloway updated the task description. (Show Details)

I've updated the description to take out some of my earlier analysis of "consistent label state" because it's potentially misleading. There shouldn't be a requirement that all suggested labels for an image be collectively voted-upon or not as a group, and there wasn't intended to be such a requirement. The real issue was that we needed to improve handling of suggestions without displayable label text (possibly because the item had been deleted) (T250742).

So afaict the fix for T250742 should prevent this from happening from now on. Do we need a script to clean up labels for already-blocked images?

I don't think so — now that the fix is in, any currently blocked images should get unblocked as soon as votes are submitted again.

I'm not sure that this needs any further attention. By coincidence I also had an image with Q6484949 and no other suggestions in my personal uploads queue, but I was able to remove it by adding my own tag.

@Ramsey-WMF do you think that's sufficient?

Closing because if this rare instance does occur, the Add Tag functionality allows the user to get out of this state.