Page MenuHomePhabricator

Diffs involving annotations seem to be blowing up consistently
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • Use PUT /api/tools/{name}/annotations/ to add one or more annotation values
  • Visit the history page for {name}
  • Select an annotation change and the prior change and request a diff

What happens?:
[Vue warn]: Error in render: "Error: Invalid reference token: {annotation field name}"

Related Objects

Event Timeline

I think this actually only blows up when the prior revision did not have any annotation data or had annotation data that did not include all fields. This may mean that this bug is possible for any and all diffs where the changes include adding fields which are not present at all in the prior revision.

The error occurs when attempting to dereference a JSON pointer which points to a non-existant value in the prior revision. I think this will only happen when the diff includes a 'replace' instruction.

bd808 changed the task status from Open to In Progress.Mar 11 2022, 11:39 PM
bd808 claimed this task.
bd808 triaged this task as High priority.
bd808 moved this task from Groomed/Ready to In Progress on the Toolhub board.

I have a working fix for this in my local tree, but need to get to a place where I can actually submit it to gerrit. I was mid-tech spike for another issue when I stumbled on this.

Change 770100 had a related patch set uploaded (by BryanDavis; author: Bryan Davis):

[wikimedia/toolhub@main] bug(diff): guard against missing prior values

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

Change 770100 merged by jenkins-bot:

[wikimedia/toolhub@main] bug(diff): guard against missing prior values

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

Change 770638 had a related patch set uploaded (by BryanDavis; author: Bryan Davis):

[operations/deployment-charts@master] toolhub: Bump container version to 2022-03-15-002555-production

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

Change 770638 merged by jenkins-bot:

[operations/deployment-charts@master] toolhub: Bump container version to 2022-03-15-002555-production

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