Problem/Motivation

While writing the test-cases for #2914579: Improve the tests for the D8 branch I realised that render-cache data was not being properly invaidated / cleared when updating the site_template config-entity as well as corresponding variant enties.

Proposed resolution

  • Remove the workarounds in the test-cases from #2914579: Improve the tests for the D8 branch
  • Add cacheability meta-data to the render-array created by PanelsEverywhereDisplayVariant
  • Introduce a cache-clear when: enabling / disabling site_template & adding (/ removing) a variant. This should be fix pages which where previously not handled by panels_everywhere.
CommentFileSizeAuthor
#30 panels-everywhere_fix-caching-problems_2914705-30.interdiff.txt980 bytesAlumei
#30 panels-everywhere_fix-caching-problems_2914705-30.patch15.57 KBAlumei
#28 panels-everywhere_fix-caching-problems_2914705-27.interdiff.txt4.39 KBAlumei
#28 panels-everywhere_fix-caching-problems_2914705-27.patch15.94 KBAlumei
#26 panels_everywhere-n2914705-26.patch12.49 KBDamienMcKenna
#25 panels-everywhere_fix-caching-problems_2914705-25.interdiff.txt1.15 KBAlumei
#25 panels-everywhere_fix-caching-problems_2914705-25.patch9.84 KBAlumei
#24 panels-everywhere_fix-caching-problems_2914705-24.interdiff.txt1.01 KBAlumei
#24 panels-everywhere_fix-caching-problems_2914705-24.patch9.02 KBAlumei
#22 panels-everywhere_fix-caching-problems_2914705-22.patch8.71 KBAlumei
#22 panels-everywhere_fix-caching-problems_2914705-22.testOnly.patch5.28 KBAlumei
#19 panels-everywhere_fix-caching-problems_2914705-19.interdiff.txt1.96 KBAlumei
#19 panels-everywhere_fix-caching-problems_2914705-19.patch14.25 KBAlumei
#16 panels-everywhere_fix-caching-problems_2914705-16.interdiff.txt1.42 KBAlumei
#16 panels-everywhere_fix-caching-problems_2914705-16.patch14.18 KBAlumei
#15 panels-everywhere_fix-caching-problems_2914705-15.interdiff.txt1.86 KBAlumei
#15 panels-everywhere_fix-caching-problems_2914705-15.patch13.05 KBAlumei
#14 panels-everywhere_fix-caching-problems_2914705-14.interdiff.txt608 bytesAlumei
#14 panels-everywhere_fix-caching-problems_2914705-14.patch11.68 KBAlumei
#13 panels-everywhere_fix-caching-problems_2914705-13.workaround.interdiff.txt1.25 KBAlumei
#13 panels-everywhere_fix-caching-problems_2914705-13.violations.interdiff.txt3.9 KBAlumei
#13 panels-everywhere_fix-caching-problems_2914705-13.patch11.09 KBAlumei
#12 panels-everywhere_fix-caching-problems_2914705-12.patch10.86 KBAlumei
#7 panels-everywhere_fix-caching-problems_2914705-7.testOnly.patch8.84 KBAlumei
#4 panels-everywhere_fix-caching-problems_2914705-3.interdiff.txt3.36 KBAlumei
#4 panels-everywhere_fix-caching-problems_2914705-3.patch10.5 KBAlumei
#4 panels-everywhere_fix-caching-problems_2914705-3.testOnly.patch1.7 KBAlumei
#2 panels_everywhere_fix-caching-problems_2914705-2.interdiff-2914570.txt3.17 KBAlumei
#2 panels_everywhere_fix-caching-problems_2914705-2.patch8.38 KBAlumei
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Alumei created an issue. See original summary.

Alumei’s picture

This is the latest patch from #2914579: Improve the tests for the D8 branch with the cache-clear workarounds removed from the test-cases.

Alumei’s picture

Created a patch to solve the cachability meta-data problem.

Note:

Status: Needs review » Needs work

The last submitted patch, 4: panels-everywhere_fix-caching-problems_2914705-3.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Alumei’s picture

I did the diff wrong for the test-only patch. Here is a correct one.

Status: Needs review » Needs work

The last submitted patch, 7: panels-everywhere_fix-caching-problems_2914705-7.testOnly.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

DamienMcKenna’s picture

Status: Needs work » Needs review

Lets see if the tests work now.

DamienMcKenna’s picture

Status: Needs review » Needs work

Needs to be rerolled.

Alumei’s picture

Status: Needs work » Needs review
FileSize
10.86 KB

Rerolled the patch

Alumei’s picture

This fixes the test fails.

It adds cache clears after enabling site_template and display variants to ensure that page which were cached before that happened and which are after that being served are properly cleared. This is necessary because they are not automatically invalidated as they were not dependent on panels_everywhere related config-entites before.

I also just thought of a another edge-cache:
Modifying a page variant to cover additional pages that where not served by panels_everywhere before.
I will try to write a test that proves this assumption.

Alumei’s picture

Here is a patch with the additional test-cache that proves my assumption.

Will Fix that now.

Alumei’s picture

The last submitted patch, 15: panels-everywhere_fix-caching-problems_2914705-15.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Alumei’s picture

Assigned: Alumei » Unassigned
Status: Needs review » Postponed

This needs to be rerolled after #2914579: Improve the tests for the D8 branch is in.

Alumei’s picture

Just realized that the last patch introduces coding standards violations. Fixing that with with this patch.

@DamienMcKenna: If you want, I can fix the remaining violations during the upcoming reroll.

Alumei’s picture

Status: Needs review » Postponed

Back to postponed until #2914579: Improve the tests for the D8 branch is in.

DamienMcKenna’s picture

Status: Postponed » Needs work

#2914579 was committed so this needs a reroll.

Alumei’s picture

Alumei’s picture

This last patch fixes the remaining coding standards violations in all files affected by the patch.

DamienMcKenna’s picture

Status: Needs review » Needs work

The last submitted patch, 26: panels_everywhere-n2914705-26.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Alumei’s picture

Status: Needs review » Needs work

The last submitted patch, 28: panels-everywhere_fix-caching-problems_2914705-27.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Alumei’s picture

Reverted some changes made to the failing test in previous patches.

Alumei’s picture

Assigned: Unassigned » Alumei
Status: Needs review » Needs work

After doing some manual testing I actually realized that the concept for this patch is false.

After all some of the tested functionality does work without the fixes from the recent patch.

I'll investigate this further.

DamienMcKenna’s picture

Assigned: Alumei » Unassigned