- @acbramley opened merge request.
- π¦πΊAustralia acbramley
Rebased onto an MR and attempted to fix the MediaTest::testRevisions failure. I got us past the cache context failure but now since the response is uncacheable due to the user context that bit fails... these tests extending ResourceTestBase are really tough to work with....
- First commit to issue fork.
- Merge request !5697[11.x] Issue #2998824: MediaAccessControlHandler update/delete access caching is not correct β (Open) created by mstrelan
- π¦πΊAustralia mstrelan
Re-rolled MR for 11.x, we should probably close the old one and hide patches.
That data provider is massive, and even more so since β¨ Add Media revision UI Fixed .
- π¦πΊAustralia acbramley
acbramley β changed the visibility of the branch 2998824-mediaaccesscontrolhandler-updatedelete-access to hidden.
- π¦πΊAustralia acbramley
Rebased against 11.x and attempted yet again to fix the cache context issues.
We have even more issues now that we have the checkFieldAccess in EntityAccessControlerHandler checking the update operation which can randomly add the user context in too. I honestly can't see how these tests are fixable without a massive refactor to ResourceTestBase.
- π¦πΊAustralia acbramley
acbramley β changed the visibility of the branch 11.x to hidden.
- First commit to issue fork.
- ππΊHungary mxr576 Hungary
Copy-pasting from Drupal Slack:
mxr576
Today at 12:49 PM
@acbramley
Maybe you will find some inspiration in my MR for fixing these test failures. testRevisions() killed my nerves so many times...
https://git.drupalcode.org/project/drupal/-/merge_requests/8198mxr576
Just now
Pushed those changes from the other MR to yours, you can decide if you keep those or not. If we need these here as well either my PR should be merged first or these changes on ResourceTestBase has to be merged independently.
Test went far further now (previously it failed on core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php:2930), but it is still going to fail on something that should be work...
I also had to commit two changes in a dedicated commit over the ported changes and I would like to understand why those were necessary.
Generally speaking, the changes on core/modules/media/src/MediaAccessControlHandler.php because that makes many things uncacheable by adding the user context.
The ported changes on ResourceTestBase only warrants that assertions are aligned with expectations and not hardcoded on the header value. - ππΊHungary mxr576 Hungary
Clean up GIT history in the MR, now we just need to figure out why the remaining tests fail...