core icon indicating copy to clipboard operation
core copied to clipboard

Make Experience plugin runnable in 23.01 and 23.10.24

Open john-thomas-dotcms opened this issue 1 year ago • 6 comments

Problem

The Experience plugin currently depends on code which exists in master, but may not exist in older dotCMS versions. However, most customers are on older versions, and we need the plugin to run on a large subset of customers, so we can collect telemetry data (metrics) from as many customer systems as possible.

Solution

The experience plugin and all the metrics code needs to be able to run on older dotCMS versions.

  • Required versions: 23.01 and 23.10.24
  • Ideal additional version: 21.06
    • If it's possible to also enable it to run on 21.06, that would be ideal.
    • But if that requires too many changes, it's not required (or can be moved to a different card).

Note that, in order to allow the plugin to run on older versions, some of the code in core which the experience plugin depends on may need to be duplicated into the plugin.

john-thomas-dotcms avatar Dec 30 '23 06:12 john-thomas-dotcms

Note to QA: the dotCMS image use to test were

  • 22.03.14_lts_a021caf - Working
  • 23.01.11_lts_6fb78083 - Working
  • 23.10.24_lts_v2 - Working

freddyDOTCMS avatar Jan 25 '24 17:01 freddyDOTCMS

Note to QA: Test is Experiments is still working

freddyDOTCMS avatar Feb 05 '24 17:02 freddyDOTCMS

PR: https://github.com/dotCMS/core/pull/27485

freddyDOTCMS avatar Feb 06 '24 16:02 freddyDOTCMS

Failed IQA. Tested on the following docker images:

  • 23.01.12_lts_7832dde3 - Failing with error: https://gist.github.com/dsilvam/20718cf1e416a1606c773649d1740890
  • 23.10.24_lts_v2 - Working

dsilvam avatar Feb 07 '24 22:02 dsilvam

Failing on 23.01.12_lts_7832dde3 with two different errors:

Caused by: org.postgresql.util.PSQLException: ERROR: relation "data_version" does not exist
dotcms-1      |   Position: 42

because we are using the wrong table to check the db_version.

dotcms-1      | java.lang.NoSuchMethodError: 'com.dotcms.http.CircuitBreakerUrl$Response com.dotcms.http.CircuitBreakerUrl.doResponse()'
dotcms-1      | 	at com.dotcms.experience.business.MetricsAPI.sendMetric(MetricsAPI.java:107) ~[?:?]
dotcms-1      | 	at com.dotcms.experience.business.MetricsAPI.persistMetricsSnapshot(MetricsAPI.java:50) ~[?:?]
dotcms-1      | 	at com.dotcms.experience.job.MetricsStatsJob.lambda$run$0(MetricsStatsJob.java:22) ~[?:?]
dotcms-1      | 	at com.dotcms.concurrent.lock.ClusterLockManagerImpl.lambda$tryLock$3(ClusterLockManagerImpl.java:63) ~[dotcms_23.01.12_999999.jar:?]
dotcms-1      | 	at io.vavr.control.Try.run(Try.java:118) ~[vavr-0.10.3.jar:?]
dotcms-1      | 	at com.dotcms.concurrent.lock.ClusterLockManagerImpl.lambda$tryLock$5(ClusterLockManagerImpl.java:63) ~[dotcms_23.01.12_999999.jar:?]
dotcms-1      | 	at net.javacrumbs.shedlock.core.DefaultLockingTaskExecutor.lambda$executeWithLock$0(DefaultLockingTaskExecutor.java:55) ~[shedlock-core-

because we are using a method that didn't exist in 23.01

dsilvam avatar Feb 21 '24 21:02 dsilvam

PR: https://github.com/dotCMS/com.dotcms.telemetry/pull/34

dsilvam avatar Feb 22 '24 15:02 dsilvam

Passed IQA: Working with latest version of the plugin on both supported LTSs

dsilvam avatar Feb 27 '24 16:02 dsilvam