Skip to content

fix: parse list-object bool query flags as true/false strings - #830

Open
andaaron wants to merge 1 commit into
googleapis:mainfrom
andaaron:fix
Open

andaaron wants to merge 1 commit into
googleapis:mainfrom
andaaron:fix

Conversation

@andaaron

@andaaron andaaron commented Oct 12, 2026 •

Copy link
Copy Markdown
  • Clients such as the Go storage HTTP client send versions=false and includeTrailingDelimiter=false as nonempty query values on Objects.List
  • Parsing with type=bool (or bare truthiness) treats any nonempty string as true, so "false" incorrectly enabled those modes
  • That made live-only lists return every generation, and trailing-delimiter placeholder objects appear in items when they should stay in prefixes
  • Parse versions, includeTrailingDelimiter, and softDeleted as enabled only when the value is the string "true"; add unit coverage for both

Fixes #829

It's a good idea to open an issue first for discussion.

  • Tests pass
  • Appropriate changes to README are included in PR

See results:

================================================= test session starts ==================================================
platform linux -- Python 3.10.12, pytest-9.1.1, pluggy-1.6.0
rootdir: /home/andaaron/storage-testbench
configfile: pyproject.toml
collected 424 items

tests/test_acl.py ...........                                                                                    [  2%]
tests/test_bucket.py ......................                                                                      [  7%]
tests/test_bucket_grpc.py ...........                                                                            [ 10%]
tests/test_common.py ..........................................................                                  [ 24%]
tests/test_csek.py ............                                                                                  [ 26%]
tests/test_database.py ...............................                                                           [ 34%]
tests/test_echo.py ...............                                                                               [ 37%]
tests/test_error.py ..........                                                                                   [ 40%]
tests/test_grpc_server.py ................................................................................       [ 58%]
tests/test_iam.py ...                                                                                            [ 59%]
tests/test_object.py ......................                                                                      [ 64%]
tests/test_project.py .......                                                                                    [ 66%]
tests/test_proto2rest.py ....                                                                                    [ 67%]
tests/test_rewrite.py ........                                                                                   [ 69%]
tests/test_storage_control_stall.py ...                                                                          [ 70%]
tests/test_testbench_bucket.py ........                                                                          [ 71%]
tests/test_testbench_continue_after_fault_injection.py ....                                                      [ 72%]
tests/test_testbench_object_gzip.py .......                                                                      [ 74%]
tests/test_testbench_object_metadata.py .....                                                                    [ 75%]
tests/test_testbench_object_special.py .........                                                                 [ 77%]
tests/test_testbench_object_upload.py ..............                                                             [ 81%]
tests/test_testbench_object_xml.py ...                                                                           [ 81%]
tests/test_testbench_retry.py .......................................                                            [ 91%]
tests/test_testbench_root.py ...                                                                                 [ 91%]
tests/test_testbench_run.py ...                                                                                  [ 92%]
tests/test_testbench_startup.py ...                                                                              [ 93%]
tests/test_testbench_waitress.py ..                                                                              [ 93%]
tests/test_upload.py ...........................                                                                 [100%]

================================================= 424 passed in 47.58s =================================================

@andaaron
andaaron requested a review from a team as a code owner October 12, 2026 11:38
@google-cla

google-cla Bot commented Oct 12, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

- Clients such as the Go storage HTTP client send versions=false and
  includeTrailingDelimiter=false as nonempty query values on Objects.List
- Parsing with type=bool (or bare truthiness) treats any nonempty string
  as true, so "false" incorrectly enabled those modes
- That made live-only lists return every generation, and trailing-delimiter
  placeholder objects appear in items when they should stay in prefixes
- Parse versions, includeTrailingDelimiter, and softDeleted as enabled
  only when the value is the string "true"; add unit coverage for both

resolves: googleapis#829

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
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.

Objects.List treats versions=false (and similar flags) as true

1 participant