Commit 65c93f2
authored
fix: keep project version data in telemetry after a clear (#24827)
The dev-mode usage statistics file is shared by all dev servers running
on a machine. After a successful upload StatisticsSender clears the
whole
projects array, which also wipes the data of other still-running dev
servers that did not trigger the upload. Until now the version and
source
identity (flowVersion, vaadinVersion, hillaVersion, sourceId) was only
written by trackGlobalData() at dev-mode startup, so any event from a
continued session (live reload, browser data, ...) recreated the project
entry with just that event's field and no versions. The next report then
contained rows with an empty flowVersion and devModeStarts == 0.
Re-assert the project identity data whenever the running session writes
project data and the entry is missing it, so a continued session repairs
its own entry before the next report is sent. devModeStarts stays a true
per-interval counter (0 for a continued session) but now always comes
with complete version information.
---------
Co-authored-by: totally-not-ai[bot] <290682512+totally-not-ai[bot]@users.noreply.github.com>1 parent effcd7c commit 65c93f2
3 files changed
Lines changed: 106 additions & 12 deletions
File tree
- vaadin-dev-server/src
- main/java/com/vaadin/base/devserver/stats
- test/java/com/vaadin/base/devserver/stats
Lines changed: 56 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
| 154 | + | |
162 | 155 | | |
163 | 156 | | |
164 | 157 | | |
165 | 158 | | |
166 | 159 | | |
167 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
168 | 203 | | |
169 | 204 | | |
170 | 205 | | |
| |||
179 | 214 | | |
180 | 215 | | |
181 | 216 | | |
| 217 | + | |
182 | 218 | | |
183 | 219 | | |
184 | 220 | | |
| |||
218 | 254 | | |
219 | 255 | | |
220 | 256 | | |
221 | | - | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
222 | 261 | | |
223 | 262 | | |
224 | 263 | | |
| |||
240 | 279 | | |
241 | 280 | | |
242 | 281 | | |
243 | | - | |
244 | | - | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
245 | 286 | | |
246 | 287 | | |
247 | 288 | | |
| |||
260 | 301 | | |
261 | 302 | | |
262 | 303 | | |
263 | | - | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
264 | 308 | | |
265 | 309 | | |
266 | 310 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
129 | 140 | | |
130 | 141 | | |
131 | 142 | | |
| |||
Lines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
211 | 212 | | |
212 | 213 | | |
213 | 214 | | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
214 | 253 | | |
215 | 254 | | |
216 | 255 | | |
| |||
0 commit comments