Skip to content

Commit c930ce9

Browse files
Merge pull request #5803 from Countly/next
bump next to this branch for tests
2 parents 431d4ec + 124e2b4 commit c930ce9

File tree

282 files changed

+18335
-9825
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

282 files changed

+18335
-9825
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ name: CI
66
on:
77
# Triggers the workflow on push or pull request events but only for the master branch
88
pull_request:
9-
branches: [ master, next ]
9+
branches: [ master, next, release.24.10 ]
1010

1111
# Allows you to run this workflow manually from the Actions tab
1212
workflow_dispatch:
@@ -302,7 +302,7 @@ jobs:
302302
cd ui-tests
303303
npm install
304304
xvfb-run --auto-servernum --server-args="-screen 0 1280x1024x24" \
305-
npm run cy:run:dashboard --headless --no-sandbox --disable-gpu --disable-dev-shm-usage
305+
npm run cy:run:dashboard
306306
307307
- name: Upload UI tests artifacts
308308
if: ${{ failure() }}
@@ -381,7 +381,7 @@ jobs:
381381
cd ui-tests
382382
npm install
383383
xvfb-run --auto-servernum --server-args="-screen 0 1280x1024x24" \
384-
npm run cy:run:onboarding --headless --no-sandbox --disable-gpu --disable-dev-shm-usage
384+
npm run cy:run:onboarding
385385
386386
- name: Upload UI tests artifacts
387387
if: ${{ failure() }}

CHANGELOG.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,42 @@
1+
## Version 24.10.2
2+
Fixes:
3+
- [core] Correct aggregated collection cleanup on event omitting
4+
- [core] Fixed bug where changing passwords results in the loss of the "Global Admin" role
5+
- [core] Fixed bug where exporting incoming data logs could result in "Incorrect parameter \"data\" error
6+
- [core] Removed use of commands which needs admin rights from report manager.
7+
- [crash] Fixed bug in crash ingestion for scenarios where the "app version" is not a string.
8+
- [script] Fixing bug with "delete_old_members" script that led to malformed requests
9+
10+
Enterprise fixes:
11+
- [nps] Fixed bug that showed the wrong nps preview title
12+
13+
## Version 24.10.1
14+
Fixes:
15+
- [core] Replaced "Users" with "Sessions" label on technology home widgets
16+
- [push] Improved ability to observe push related errors
17+
- [push] Replaced push plugin with an earlier version of the plugin
18+
19+
Enterprise fixes:
20+
- [cohorts] Fixed issues with nightly cleanup
21+
- [data-manager] Fixed UI bug where rules were not visible when editing "Merge by regex" transformations
22+
- [drill] Fixed wrong pie chart label tooltip in dashboard widget
23+
- [flows] Fixed bug in case of null data in schema
24+
- [license] Fixed bug with MAU type of licenses that would prevent the server from starting
25+
- [nps] Fixed bug in the editor where the "internal name" field was not mandatory
26+
- [nps] Fixed bug where it was possible to submit empty nps surveys
27+
- [ratings] Fixed bug with user consent
28+
- [ratings] Fixed UI bug where "Internal name" was not a mandatory field
29+
30+
Security:
31+
- Bumped cookie-parser from 1.4.6 to 1.4.7
32+
- Bumped express-rate-limit from 7.4.0 to 7.4.1
33+
- Bumped moment-timezone from 0.5.45 to 0.5.46
34+
- Bumped sass from 1.79.3 to 1.79.4
35+
- Fixing minor vulnerability that would allow for unauthorized file upload
36+
37+
Enterprise Features:
38+
- [block] Added a way to filter crashes by their error (stacktrace)
39+
140
## Version 24.10
241
Fixes:
342
- [core] Interpreting carrier value of "--" as an unknown value
@@ -34,6 +73,7 @@ Enterprise Features:
3473

3574
## Version 24.05.15
3675
Enterprise fixes:
76+
- [ab-testing] Fixed JSON.parse issue preventing creation of AB tests
3777
- [nps] Fixed UI issues in the widget editor related to the "user consent" section
3878
- [ratings] Fixed rendering issue for escaped values
3979

api/api.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ plugins.connectToAllDatabases().then(function() {
313313
jobs.job('api:clearAutoTasks').replace().schedule('every 1 day');
314314
jobs.job('api:task').replace().schedule('every 5 minutes');
315315
jobs.job('api:userMerge').replace().schedule('every 10 minutes');
316+
jobs.job("api:ttlCleanup").replace().schedule("every 1 minute");
316317
//jobs.job('api:appExpire').replace().schedule('every 1 day');
317318
}, 10000);
318319

api/jobs/task.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ class MonitorJob extends job.Job {
5656
return true;
5757
}
5858

59+
if (task.dirty) {
60+
return true;
61+
}
62+
5963
if ((now + duration - lastStart) / 1000 >= interval) {
6064
return true;
6165
}
@@ -74,7 +78,8 @@ class MonitorJob extends job.Job {
7478
taskmanager.rerunTask({
7579
db: common.db,
7680
id: task._id,
77-
autoUpdate: true
81+
autoUpdate: true,
82+
dirty: task.dirty
7883
}, function(e) {
7984
if (e) {
8085
log.e(e, e.stack);

api/jobs/ttlCleanup.js

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
const plugins = require("../../plugins/pluginManager.js");
2+
const common = require('../utils/common');
3+
const job = require("../parts/jobs/job.js");
4+
const log = require("../utils/log.js")("job:ttlCleanup");
5+
6+
/**
7+
* Class for job of cleaning expired records inside ttl collections
8+
*/
9+
class TTLCleanup extends job.Job {
10+
/**
11+
* Run the job
12+
*/
13+
async run() {
14+
log.d("Started running TTL clean up job");
15+
for (let i = 0; i < plugins.ttlCollections.length; i++) {
16+
const {
17+
db = "countly",
18+
collection,
19+
property,
20+
expireAfterSeconds = 0
21+
} = plugins.ttlCollections[i];
22+
let dbInstance;
23+
switch (db) {
24+
case "countly": dbInstance = common.db; break;
25+
case "countly_drill": dbInstance = common.drillDb; break;
26+
case "countly_out": dbInstance = common.outDb; break;
27+
}
28+
if (!dbInstance) {
29+
log.e("Invalid db selection:", db);
30+
continue;
31+
}
32+
33+
log.d("Started cleaning up", collection);
34+
const result = await dbInstance.collection(collection).deleteMany({
35+
[property]: {
36+
$lte: new Date(Date.now() - expireAfterSeconds * 1000)
37+
}
38+
});
39+
log.d("Finished cleaning up", result.deletedCount, "records from", collection);
40+
41+
// Sleep 1 second to prevent sending too many deleteMany queries
42+
await new Promise(res => setTimeout(res, 1000));
43+
}
44+
log.d("Finished running TTL clean up job");
45+
}
46+
}
47+
48+
module.exports = TTLCleanup;

api/parts/data/fetch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1323,7 +1323,7 @@ fetch.fetchEvents = function(params) {
13231323
*/
13241324
fetch.fetchTimeObj = function(collection, params, isCustomEvent, options) {
13251325
fetchTimeObj(collection, params, isCustomEvent, options, function(output) {
1326-
if (params?.qstring?.event) {
1326+
if (params.qstring?.event) {
13271327
output.eventName = params.qstring.event;
13281328
}
13291329
common.returnOutput(params, output);

0 commit comments

Comments
 (0)