Commit e1123a5
[9.2] [Fleet] only auto-install content packages newer than the installed version (#262703)
## Summary
Backport of #262509 to 9.2.
The auto-install content packages task was using string equality (`!==
version`) to decide whether to reinstall a package. This meant any
version mismatch would trigger a reinstall, effectively downgrading
packages.
The fix replaces string equality with `semverGt` to ensure a package is
only installed when the registry version is strictly newer than the
installed version.
<!--BACKPORT [{"author":{"name":"Julia
Bardi","email":"90178898+juliaElastic@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-04-10T14:55:34Z","message":"[Fleet]
only auto-install content packages newer than the installed version
(#262509)","sha":"3f939ce873bcbba27b7ccfd44093aa2198bcc743"},"sourcePullRequest":{"number":262509,"url":"https://github.com/elastic/kibana/pull/262509"},"sourceBranch":"main","suggestedTargetBranches":["9.2"],"targetPullRequestStates":[{"branch":"9.2","label":"v9.2.9","state":"NOT_CREATED"}]}]
BACKPORT-->
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 2e69d04 commit e1123a5
2 files changed
Lines changed: 57 additions & 3 deletions
File tree
Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
252 | 303 | | |
253 | 304 | | |
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
239 | 240 | | |
240 | 241 | | |
241 | 242 | | |
242 | | - | |
| 243 | + | |
| 244 | + | |
243 | 245 | | |
244 | 246 | | |
245 | 247 | | |
| |||
256 | 258 | | |
257 | 259 | | |
258 | 260 | | |
259 | | - | |
| 261 | + | |
| 262 | + | |
260 | 263 | | |
261 | 264 | | |
262 | 265 | | |
| |||
280 | 283 | | |
281 | 284 | | |
282 | 285 | | |
283 | | - | |
| 286 | + | |
284 | 287 | | |
285 | 288 | | |
286 | 289 | | |
| |||
0 commit comments