Skip to content

Commit 9a8d4cc

Browse files
authored
Merge branch 'release.24.10' into 24.05->24.10-merge
2 parents 6d6fee3 + a6e50ac commit 9a8d4cc

File tree

278 files changed

+14952
-5082
lines changed

Some content is hidden

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

278 files changed

+14952
-5082
lines changed

.eslintrc.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,6 @@
237237
"for-direction": [
238238
"off"
239239
],
240-
"no-console": [
241-
"off"
242-
],
243240
"no-control-regex": [
244241
"off"
245242
],
@@ -343,4 +340,4 @@
343340
}
344341
}
345342
]
346-
}
343+
}

.github/workflows/main.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,11 @@ jobs:
160160
shell: bash
161161
run: "sed -i 's/port: 3001,/port: 3001, workers: 1,/' /opt/countly/api/config.js"
162162

163+
- name: NPM install
164+
shell: bash
165+
working-directory: /opt/countly
166+
run: npm install
167+
163168
- name: Run tests
164169
shell: bash
165170
working-directory: /opt/countly
@@ -207,6 +212,11 @@ jobs:
207212
shell: bash
208213
run: "sed -i 's/port: 3001,/port: 3001, workers: 1,/' /opt/countly/api/config.js"
209214

215+
- name: NPM install
216+
shell: bash
217+
working-directory: /opt/countly
218+
run: npm install
219+
210220
- name: Install plugins
211221
shell: bash
212222
run: |
@@ -260,6 +270,11 @@ jobs:
260270
shell: bash
261271
run: "sed -i 's/mongosh --quiet/mongosh --host mongodb --quiet/' /opt/countly/bin/backup/import_events.sh && sed -i 's/mongoimport --db/mongoimport --host mongodb --db/' /opt/countly/bin/backup/import_events.sh"
262272

273+
- name: NPM install
274+
shell: bash
275+
working-directory: /opt/countly
276+
run: npm install
277+
263278
- name: Prepare environment
264279
shell: bash
265280
working-directory: /opt/countly
@@ -338,6 +353,11 @@ jobs:
338353
shell: bash
339354
run: "sed -i 's/mongosh --quiet/mongosh --host mongodb --quiet/' /opt/countly/bin/backup/import_events.sh && sed -i 's/mongoimport --db/mongoimport --host mongodb --db/' /opt/countly/bin/backup/import_events.sh"
340355

356+
- name: NPM install
357+
shell: bash
358+
working-directory: /opt/countly
359+
run: npm install
360+
341361
- name: Prepare environment
342362
shell: bash
343363
working-directory: /opt/countly

CHANGELOG.md

Lines changed: 64 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,30 @@
1-
## Version 24.05.x
2-
- [feedback] Uniformize drawer internal name input texts
3-
- [star-rating] Fix rating score and responses table sorting
41

5-
## Version 24.05.30
2+
## Version 24.10.x
63
Features:
74
- [crashed] Fix unescaped SDK logs
85
- [dashboards] Added the option to set a refresh rate for dashboards, allowing data to update more frequently for selected dashboards
96
- [star-rating] Added missing columns to Rating Widgets table edit
107
- [ui] Fix alignment of drawers title and close icon
8+
- [feedback] Uniformize drawer internal name input texts
9+
- [star-rating] Fix rating score and responses table sorting
1110

12-
## Version 24.05.29
11+
## Version 24.10.9
1312
Fixes:
1413
- [core] Allow downloading data also from other databases in dbviewer
1514
- [crash_symbolication] Symbolication server api end point test fix
15+
- [crashes] Remove memory addresses from stack trace grouping
1616
- [push] Fixed push notifications title and content text and variables combination
1717
- [reports] Correctly match event for email report if event key contains '.'
18-
19-
## Version 24.05.28
20-
Enterprise Fixes:
21-
- [cohorts] Fixed issue with combining multiple cohorts
22-
23-
## Version 24.05.27
24-
Fixes:
25-
- [crashes] Remove memory addresses from stack trace grouping
18+
- [script] Refined delete_custom_events.js to clean up faulty/dead events completely.
2619
- [user-management] Prevent global admin from self-revoke and self-delete
2720

2821
Enterprise Fixes:
29-
- [cohorts] Fixed issue with combining multiple cohorts
30-
31-
## Version 24.05.26
32-
Enterprise fixes:
3322
- [ab-testing] Fixed bug with variant user filtering
23+
- [cohorts] Fixed issue with combining multiple cohorts
24+
- [drill] Do not recheck old collections on app_user data deletion if querying from old collections is disabled
3425
- [license] Fixed issue with handling invalid date periods
3526

36-
Fixes:
37-
- [script] Refined delete_custom_events.js to clean up faulty/dead events completely.
38-
39-
## Version 24.05.25
27+
## Version 24.10.8
4028
Fixes:
4129
- [app-management] Unescaping HTML for created/updated application names
4230
- [countly-edge] Add import from Countly Edge Server
@@ -47,27 +35,23 @@ Features:
4735

4836
Enterprise fixes:
4937
- [ab-testing] Mismatching user counts between ab-testing and user profiles
50-
51-
## Version 24.05.24
52-
Enterprise fixes:
5338
- [ldap] Fixed issues that would lead to configuration options not being picked up
5439

55-
## Version 24.05.23
56-
Features:
57-
- [hooks] Added remote config changes to internal actions
58-
- [system-utility] New endpoint: /take-heap-snapshot.
59-
- [system-utility] Using nodejs fs to write profiler files instead of gridfs.
60-
40+
## Version 24.10.7
6141
Fixes:
42+
- [data-manager] Modifying existing values when segment values want to be updated in the Data Manager
6243
- [drill] Fix for UI error when push plugin is not enabled
6344

6445
Enterprise fixes:
6546
- [drill] Fixed empty events list in drill section
66-
67-
## Version 24.05.22
47+
6848
Features:
6949
- [core] Add self tracking capability
50+
- [hooks] Added remote config changes to internal actions
51+
- [system-utility] New endpoint: /take-heap-snapshot.
52+
- [system-utility] Using nodejs fs to write profiler files instead of gridfs.
7053

54+
## Version 24.10.6
7155
Fixes:
7256
- [push] Using apns-id header as message result in debug mode
7357
- [server-stats] Fix data point calculation in job
@@ -76,6 +60,7 @@ Fixes:
7660

7761
Enterprise fixes:
7862
- [drill] Encoding url component before changing history state
63+
- [drill] Fixed drill meta regeneration
7964
- [drill] [license] Update license loader to enable supplying db client
8065
- [users] Format data points displayed in user sidebar
8166
- [cohorts] Unescape drill texts in cohort component
@@ -88,7 +73,7 @@ Enterprise Dependencies:
8873
- Bump nanoid in /plugins/cognito from 2.1.11 to 3.3.8
8974
- Bump shortid in /plugins/cognito from 2.2.16 to 2.2.17
9075

91-
## Version 24.05.21
76+
## Version 24.10.5
9277
Fixes:
9378
- [core] Fixed a bug causing events to not being loaded when there's an escaped character in the event name
9479
- [core] Fixed a bug that was causing drill to crash when there's a percentage symbol in the event name
@@ -97,15 +82,14 @@ Fixes:
9782
- [surveys] "Select one" text in the widget can be edited now
9883
- [system-utility] Fixed: Mongo error (code: 26) in some Countly instances when the profiler gets run for the first time
9984

100-
10185
Dependencies:
10286
- Bump countly-sdk-nodejs from 24.10.0 to 24.10.1
10387
- Bump countly-sdk-web from 24.11.2 to 24.11.4
10488
- Bump express-rate-limit from 7.4.1 to 7.5.0
10589
- Bump puppeteer from 23.10.4 to 23.11.1
10690
- Bump sass from 1.81.0 to 1.83.4
10791

108-
## Version 24.05.20
92+
## Version 24.10.4
10993
Fixes:
11094
- [push] Fixed bug where IOS credentials get mixed up while sending messages from different apps at the same time
11195
- [push] Fixed bug where it crashes in connection pool growth because of a type mismatch in an if condition
@@ -125,8 +109,10 @@ Dependencies:
125109
- Bump nodemailer from 6.9.15 to 6.9.16
126110
- Bump puppeteer from 23.8.0 to 23.9.0
127111
- Bump tslib from 2.7.0 to 2.8.1
112+
- Bump express from 4.21.1 to 4.21.2
113+
- Bump mocha from 10.2.0 to 10.8.2
128114

129-
## Version 24.05.19
115+
## Version 24.10.3
130116
Fixes:
131117
- [dashboards] Fixing issue where dashboard widgets go into single column
132118

@@ -138,49 +124,78 @@ Security:
138124
- Bump cross-spawn from 7.0.3 to 7.0.6 in /ui-tests
139125
- Bump cross-spawn from 7.0.3 to 7.0.6 in /plugins/hooks
140126

141-
## Version 24.05.18
127+
## Version 24.10.2
142128
Fixes:
129+
- [core] Correct aggregated collection cleanup on event omitting
143130
- [core] Fixed bug where changing passwords results in the loss of the "Global Admin" role
144131
- [core] Fixed bug where exporting incoming data logs could result in "Incorrect parameter \"data\" error
132+
- [core] Removed use of commands which needs admin rights from report manager.
145133
- [crash] Fixed bug in crash ingestion for scenarios where the "app version" is not a string.
146134
- [script] Fixing bug with "delete_old_members" script that led to malformed requests
147135

148136
Enterprise fixes:
149137
- [nps] Fixed bug that showed the wrong nps preview title
150138

151-
## Version 24.05.17
139+
## Version 24.10.1
152140
Fixes:
141+
- [core] Replaced "Users" with "Sessions" label on technology home widgets
153142
- [push] Improved ability to observe push related errors
143+
- [push] Replaced push plugin with an earlier version of the plugin
154144

155145
Enterprise fixes:
156146
- [cohorts] Fixed issues with nightly cleanup
157147
- [data-manager] Fixed UI bug where rules were not visible when editing "Merge by regex" transformations
158148
- [drill] Fixed wrong pie chart label tooltip in dashboard widget
159149
- [flows] Fixed bug in case of null data in schema
150+
- [license] Fixed bug with MAU type of licenses that would prevent the server from starting
160151
- [nps] Fixed bug in the editor where the "internal name" field was not mandatory
152+
- [nps] Fixed bug where it was possible to submit empty nps surveys
153+
- [ratings] Fixed bug with user consent
161154
- [ratings] Fixed UI bug where "Internal name" was not a mandatory field
162155

163156
Security:
157+
- Bumped cookie-parser from 1.4.6 to 1.4.7
158+
- Bumped express-rate-limit from 7.4.0 to 7.4.1
159+
- Bumped moment-timezone from 0.5.45 to 0.5.46
160+
- Bumped sass from 1.79.3 to 1.79.4
164161
- Fixing minor vulnerability that would allow for unauthorized file upload
165162

166163
Enterprise Features:
167164
- [block] Added a way to filter crashes by their error (stacktrace)
168165

169-
## Version 24.05.16
166+
## Version 24.10
170167
Fixes:
171-
- [core] Replaced "Users" with "Sessions" label on technology home widgets
172-
- [push] Replaced push plugin with an earlier version of the plugin
168+
- [core] Interpreting carrier value of "--" as an unknown value
169+
- [crash] Fixed issues with visualisation of Flutter stack traces
170+
- [dashoards] If a user is given access to a dashboard, they will now be able to see all widgets even if they don't have access to the underlying data
171+
- [density] UI fixed
172+
- [events] Fixed issue where slower loading data would replace newest event selection
173173

174174
Enterprise fixes:
175-
- [license] Fixed bug with MAU type of licenses that would prevent the server from starting
176-
- [nps] Fixed bug where it was possible to submit empty nps surveys
177-
- [ratings] Fixed bug with user consent
175+
- [crashes-jira] Preventing crashing when jira authentification fails
176+
- [formulas] Removing HTML from tooltip localization
178177

179-
Security:
180-
- Bumped cookie-parser from 1.4.6 to 1.4.7
181-
- Bumped express-rate-limit from 7.4.0 to 7.4.1
182-
- Bumped moment-timezone from 0.5.45 to 0.5.46
183-
- Bumped sass from 1.79.3 to 1.79.4
178+
Features:
179+
- Making user guide icons stand out more before first use
180+
- [alerts] UI improvements
181+
- [alerts] small improvements in email notifications
182+
- [code] Unifying bottom menu for bulk operations
183+
- [core] Aggregated events data collections merged together
184+
- [nps] UI improvements
185+
- [surveys] UI improvements
186+
- upgraded mongoDB to version 7
187+
- upgraded nodejs to version 20
188+
189+
Enterprise Features:
190+
- [crash_symbolication] Added ability to set custom domain override for the symbolication server
191+
- [drill] Drill "by query" vizualization improved
192+
- [drill] Drill data collections merged together
193+
- [events] Added a quick transition to drill
194+
- [hooks] Added audit log entries for hook "create", "edit", "delete", "update" actions
195+
- [users] "Last Session" column in User Profiles is now sortable
196+
- [users] Crashes in the crashes tab can now be sorted
197+
- [users] UI improvements
198+
- [views] Added a quick transition to drill
184199

185200
## Version 24.05.15
186201
Enterprise fixes:

api/api.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ plugins.connectToAllDatabases().then(function() {
156156
console.log("Successfully stored batch state");
157157
}
158158
catch (ex) {
159-
console.log("Could not store batch state");
159+
console.log("Could not store batch state", ex);
160160
}
161-
process.exit(code);
161+
process.exit(typeof code === "number" ? code : 1);
162162
}
163163

164164
/**

api/config.sample.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ var countlyConfig = {
107107
* Specifies where to store files. Value "fs" means file system or basically storing files on hard drive. Another currently supported option is "gridfs" storing files in MongoDB database using GridFS. By default fallback to "fs";
108108
* @type {string} [default=fs]
109109
*/
110-
fileStorage: "fs",
110+
fileStorage: "gridfs",
111111
/**
112112
* Specifies after how long time configurations are reloded from data base. Default value is 10000 (10 seconds)
113113
* @type {integer} [default=10000]
@@ -121,7 +121,7 @@ var countlyConfig = {
121121
/**
122122
* Share same database connection pool between databases
123123
*/
124-
shared_connection: false,
124+
shared_connection: true,
125125
/**
126126
* Simple SMTP mail sender configuration.
127127
* Can only be used when you don't have custom mailer extend ({@code countly/extend/mail.js}).

api/jobs/topEvents.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,19 @@ class TopEventsJob extends job.Job {
138138
* The errors of all functions will be caught here.
139139
*/
140140
async getAllApps() {
141+
log.d("Fetching all apps");
141142
try {
142143
const getAllApps = await new Promise((res, rej) => common.db.collection("apps").find({}, { _id: 1, timezone: 1 }).toArray((err, apps) => err ? rej(err) : res(apps)));
143-
await Promise.all(getAllApps.map((app) => this.getAppEvents(app)));
144+
for (var z = 0; z < getAllApps.length; z++) {
145+
//Calculating for each app serially.
146+
await this.getAppEvents(getAllApps[z]);
147+
}
144148
}
145149
catch (error) {
146150
log.e("TopEvents Job has a error: ", error);
147151
throw error;
148152
}
153+
log.d("Finished processing");
149154
}
150155

151156
/**
@@ -178,6 +183,7 @@ class TopEventsJob extends job.Job {
178183
* @param {Object} app - saveAppEvents object
179184
*/
180185
async getAppEvents(app) {
186+
log.d(app._id + ": Fetching app events");
181187
const getEvents = await new Promise((res, rej) => common.db.collection("events").findOne({ _id: app._id }, (errorEvents, result) => errorEvents ? rej(errorEvents) : res(result)));
182188
if (getEvents && 'list' in getEvents) {
183189
const eventMap = this.eventsFilter(getEvents.list);
@@ -199,6 +205,7 @@ class TopEventsJob extends job.Job {
199205
let totalDuration = 0;
200206
let prevTotalDuration = 0;
201207
for (const event of eventMap) {
208+
log.d(" getting event data for event: " + event + " (" + period + ")");
202209
const collectionNameEvents = this.eventsCollentions({ event, id: app._id });
203210
await this.getEventsCount({ collectionNameEvents, ob, data, event });
204211
totalCount += data[event].data.count.total;
@@ -208,11 +215,16 @@ class TopEventsJob extends job.Job {
208215
totalDuration += data[event].data.duration.total;
209216
prevTotalDuration += data[event].data.duration["prev-total"];
210217
}
218+
log.d(" getting session count (" + period + ")");
211219
await this.getSessionCount({ ob, sessionData, usersData, usersCollectionName });
220+
log.d(" saving data (" + period + ")");
212221
await this.saveAppEvents({ app, data, sessionData, usersData, period, totalCount, prevTotalCount, totalSum, prevTotalSum, totalDuration, prevTotalDuration });
213222
}
214223
}
215224
}
225+
else {
226+
log.d(" No events found for app");
227+
}
216228

217229
}
218230

api/lib/countly.common.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,9 +1533,6 @@ countlyCommon.extractTwoLevelData = function(db, rangeArray, clearFunction, data
15331533
periodObj = countlyCommon.periodObj;
15341534
}
15351535

1536-
if (!rangeArray) {
1537-
return {"chartData": tableData};
1538-
}
15391536
var periodMin = 0,
15401537
periodMax = 0,
15411538
dataObj = {},
@@ -1544,6 +1541,10 @@ countlyCommon.extractTwoLevelData = function(db, rangeArray, clearFunction, data
15441541
propertyFunctions = underscore.pluck(dataProperties, "func"),
15451542
propertyValue = 0;
15461543

1544+
if (!rangeArray) {
1545+
return {"chartData": tableData};
1546+
}
1547+
15471548
if (!periodObj.isSpecialPeriod) {
15481549
periodMin = periodObj.periodMin;
15491550
periodMax = (periodObj.periodMax + 1);

0 commit comments

Comments
 (0)