Skip to content

Fix Cloudwatch query sorting#9819

Open
StuartBertram wants to merge 4 commits intogetmoto:masterfrom
StuartBertram:patch-1
Open

Fix Cloudwatch query sorting#9819
StuartBertram wants to merge 4 commits intogetmoto:masterfrom
StuartBertram:patch-1

Conversation

@StuartBertram
Copy link

This should fix #9818. It inverts the sorting boolean and updates the query tests to match.

I don't think it should impact anything else. And I'm hoping that some automated test runs will confirm that.

Defaults to `True`, which inverts `sorted()` to a descending sort
@bblommers
Copy link
Collaborator

Hi @StuartBertram! We do have some automated tests, and it looks like one other test should be fixed with this change - happy to merge once that's done

@StuartBertram
Copy link
Author

Okay, I think that should fix it. I'd had a quick look at the Boto tests, but I assumed it would be doing the right thing because it was Boto. But I guess it's a mocked function, so it's Boto querying Moto, which hits the function that I've just edited!

@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.11%. Comparing base (dc425e8) to head (5084bd3).
⚠️ Report is 10 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #9819   +/-   ##
=======================================
  Coverage   93.11%   93.11%           
=======================================
  Files        1308     1308           
  Lines      118823   118862   +39     
=======================================
+ Hits       110645   110684   +39     
  Misses       8178     8178           
Flag Coverage Δ
servertests 28.89% <50.00%> (-0.01%) ⬇️
unittests 93.09% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cloudwatch log query sorting is the wrong way around

2 participants