You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "MitchDrage (via GitHub)" <gi...@apache.org> on 2026/10/01 05:52:37 UTC
[PR] Restore newest-first ordering in listEvents [cloudstack]
MitchDrage opened a new pull request, #14278:
URL: https://github.com/apache/cloudstack/pull/14278
### Description
listEvents has returned events oldest-first since 4.19.1.0, so the newest event shows up last, for example at the bottom of the dashboard Events tile.
This PR adds ORDER BY to searchByIds.
Alternative considered: re-sorting the loaded rows in `QueryManagerImpl.searchForEventsInternal` to match the id list.
I went with the ORDER BY for simplicity. The trade-off is that both queries now state the order and must agree.
### Types of changes
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
- [ ] Build/CI
- [ ] Test (unit or integration test code)
### Feature/Enhancement Scale or Bug Severity
#### Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [ ] Minor
- [x] Trivial
### Screenshots (if appropriate):
### How Has This Been Tested?
- New unit test EventJoinDaoImplTest#testSearchByIdsOrdersNewestFirst. It fails without the fix and passes with it.
- EventJoinDaoImplTest and QueryManagerImplTest pass.
#### How did you try to break this feature and the system with this change?
Nil
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Restore newest-first ordering in listEvents [cloudstack]
Posted by "MitchDrage (via GitHub)" <gi...@apache.org>.
MitchDrage commented on PR #14278:
URL: https://github.com/apache/cloudstack/pull/14278#issuecomment-6048628514
@vladimirpetrov @sureshanaparti could this go into 4.20.4, and will it reach 4.22.2 through the forward merge before the RC? It's a bug fix and I'd like it in both.
No one has looked at this yet, but it's a very straightforward problem/solution.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org