Page MenuHomePhabricator

Prod compare endpoint missing offset object (with from & to keys) on diff items
Closed, ResolvedPublicBUG REPORT

Description

I don't think wikidiff2 is fully deployed to production yet.

Steps to Reproduce:
Go here - https://en.wikipedia.org/w/rest.php/v1/revision/881646479/compare/917684903

Actual Results:
Diff objects do not have offsets.

"diff": [{
		"type": 0,
		"lineNumber": 111,
		"text": "A '''solo album''', in [[popular music]], is an album recorded by a current or former member of a [[musical group]] which is released under that artist's name only, even though some or all other band members may be involved. The solo album appeared as early as the late 1940s. A 1947 ''[[Billboard (magazine)|Billboard]]'' magazine article heralded \"[[Margaret Whiting]] huddling with [[Capitol Records|Capitol]] execs over her first solo album on which she will be backed by [[Frank De Vol]]\".<ref>''Billboard Magazine'' (April 5, 1947), p. 21.</ref> There is no formal definition setting forth the amount of participation a band member can solicit from other members of his band, and still have the album referred to as a solo album. One reviewer wrote that [[Ringo Starr]]'s third venture, ''[[Ringo (album)|Ringo]]'', \"[t]echnically... wasn't a solo album because all four [[Beatles]] appeared on it\".<ref>Jay Warner, ''On this day in music history'' (2004), p. 323.</ref> Three of the four members of the Beatles released solo albums while the group was officially still together."
	}, {
		"type": 0,
		"lineNumber": 112,
		"text": ""
	},...]

Expected Results:
Diff objects should have offsets (from or to within might be null but the object itself should be there).

Note I see them in labs (https://en.wikipedia.beta.wmflabs.org/w/rest.php/v1/revision/373415/compare/374150).

"diff": [{
		"type": 0,
		"lineNumber": 29,
		"text": "[[Nobel Peace Prize]] <small>([[2009 Nobel Peace Prize|2009]])</small><br>[[Profile in Courage Award]] <small>(2017)</small></td></tr><tr><th scope=\"row\">Signature</th><td>",
		"offset": {
			"from": 4697,
			"to": 4697
		}
	}, {
		"type": 0,
		"lineNumber": 30,
		"text": "[[File:Barack Obama signature.svg|128x80px|alt=|Barack Obama's signature]]</td></tr><tr><th scope=\"row\">Website</th><td>",
		"offset": {
			"from": 4870,
			"to": 4870
		}
	},...]

To (hopefully) aid in any confusion I do see offset items in the section information at the top in Prod - I just also need it returned in the diff items which is the wikidiff2 output portion.

Event Timeline

@jijiki has deployed 1.10 to labs machines as indicated in the parent task, but not yet on prod machines, pending verification that it works correctly in labs.

Ah ok, thanks @Pchelolo. @jijiki I think we have sign off from @Tsevener can we move it to prod?

Yep, output looks good to me in labs.