Closed jvtm closed 7 months ago
Hi @jvtm, thank you for raising this and for adding a repro case! That functionality was indeed broken by accident - we didn't have any tests for that usecase apparently.
I'm opening a PR with a fix now.
Hi @jvtm, thank you for raising this and for adding a repro case! That functionality was indeed broken by accident - we didn't have any tests for that usecase apparently.
I'm opening a PR with a fix now.
Just tried the PR out with tests having way larger amount of objects, and things seem to pass again. Nice.
When calling
objects.filter()
with an existing key asMarker
:Moto 5.0.x crashes on
TypeError
(trying to orderstr
vsNone
):Seeing this on
5.0.3
and also latest5.0.4.dev
/ ade1001a6928.This used to work with
4.x
series.Current versions of relevant libraries (all latest when writing this):
Boto3 docs: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3/bucket/objects.html#filter
"Short"
pytest
code for reproducing (a bit of boilerplate for bucket setup, AWS env vars, moto 4.x vs 5.x compatibility...). 5.x fails on second call which uses a marker that is an existing key from the last result set.This is a bit artificial but not far from some real code using bigger batches / pagination / markers.