[ABTEST-436] Magnolia cache prevents ABn testing filter from seeing requests Created: 09/Apr/21  Updated: 28/Apr/21  Resolved: 28/Apr/21

Status: Closed
Project: A/B Testing
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0

Type: Bug Priority: Neutral
Reporter: Michael Duerig Assignee: Chuong Doan Huy
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File config.modules.cache.config.contentCaching.defaultPageCache.cachePolicy.shouldBypassVoters.urls.excludes.travel.yaml    
Issue Links:
Relates
relates to ABTEST-430 Include a X-Header in the HTTP respon... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[X]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Epic Link: ABn GA tasks
Sprint: Content Mngmt 02
Story Points: 5

 Description   

Steps to reproduce

  1.  Create and run an ABn test for travel/about.html.
  2.  Repeatedly request that page via curl (curl -v http://localhost:8080/magnoliaPublic/travel/about.html)

Expected results

Every request is handled by ABTestingFilter#doFilter

Actual results

Only the first request is handled by ABTestingFilter#doFilter

Workaround

Add a config.modules.cache.config.contentCaching.defaultPageCache.cachePolicy.shouldBypassVoters.urls.excludes.travel.yaml excluding the page URL from caching

Development notes

  • This PR adds logging ABTestingFilter#doFilter, which simplifies observing expected and actual results.
  • One approach to solving this could be to exclude requests from the cache that have the X-Header (from ABTEST-430) set. For this we would need to add a cache policy based on info.magnolia.voting.voters.RequestParameterVoter
  • An alternative approach is to disable caching of pages under test via a TTL voter similar to how this is done in the personalisation module with info.magnolia.personalization.cache.PersonalizedContentTtlVoter.

Generated at Sun Feb 11 22:56:12 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.