Page MenuHomePhabricator

Make the transform endpoint match ETags emitted by the page endpoint
Closed, ResolvedPublic

Description

The /transform endpoint exposed by core must accept ETags that originate from the /page and /revision endpoints in If-Match headers. This is somewhat tricky, since transformations wouldn't necessary emit ETags, and it's unclear which transformation would emit an ETag that matches the one returned by the /page endpoint.

We may have to change the implementations of http conditionals to make this work properly, so the validation of an If-Match header doesn't try to predict the ETag that would be emitted by the successful operation - it needs to check aginst the etag of a pre-existing (stashed) entity. That's not quite the same thing.

See also T310464: Make use of stashed data-parsoid mapping for html-to-wikitext transformation

Event Timeline

Change 810342 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] Clarify handling of verifier headers in POST and PUT

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

Change 810342 merged by jenkins-bot:

[mediawiki/core@master] Clarify handling of verifier headers in POST and PUT

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

daniel triaged this task as High priority.Jul 13 2022, 10:04 AM

Change 814861 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] TransformHandler: check etag from if-match against stash

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

Change 815249 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/services/parsoid@master] e2e test: cover etag handling with structure test

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

Change 815250 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/services/parsoid@master] TransformHandler: do not ignore ETags.

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

Change 815249 merged by jenkins-bot:

[mediawiki/services/parsoid@master] e2e test: cover etag handling with structure test

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

Change 816216 had a related patch set uploaded (by Subramanya Sastry; author: Subramanya Sastry):

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.16.0-a17

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

Change 816216 merged by jenkins-bot:

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.16.0-a17

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

Change 815250 merged by jenkins-bot:

[mediawiki/services/parsoid@master] TransformHandler: do not ignore ETags.

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

Change 827533 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/vendor@master] Bump parsoid to 0.16.0-a20

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

Change 827533 merged by jenkins-bot:

[mediawiki/vendor@master] Bump parsoid to 0.16.0-a20

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

daniel reopened this task as Open.

(oops, closed the wrong ticket)

daniel lowered the priority of this task from High to Medium.Oct 18 2022, 2:45 PM
daniel claimed this task.