Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v24.2.x] cloud_storage_clients: fix abs_parse_impl error #22538

Merged

Commits on Jul 26, 2024

  1. cloud_storage_clients: fix abs_parse_impl::handle_start_element

    We ran into a case in which the `xml_sax_parser` would throw an exception
    when processing a ABS `List Blobs` response like the following:
    
    <?xml version="1.0" encoding="utf-8"?>
    <EnumerationResults ServiceEndpoint="https://blob.core.windows.net/" ContainerName="container">
      <Prefix>cluster_metadata/bb7527f1-3227-4d55-86da-c133ec955ea9/manifests/
      </Prefix>
      <Delimiter>/</Delimiter>
      <Blobs>
        <BlobPrefix>
          <Name>cluster_metadata/bb7527f1-3227-4d55-86da-c133ec955ea9/manifests/2/
          </Name>
          <Properties>
    	<Creation-Time>Thu, 25 Jul 2024 14:07:26 GMT
    	</Creation-Time>
          </Properties>
        </BlobPrefix>
      </Blobs>
    </EnumerationResults>
    
    The issue here being that no `<Blob>...</Blob>` element is returned, and when
    processing the `<BlobPrefix>` element an exception is triggered.
    
    This commit corrects the parser code to anticipate this potential corner case.
    
    (cherry picked from commit 8911434)
    WillemKauf authored and vbotbuildovich committed Jul 26, 2024
    Configuration menu
    Copy the full SHA
    4044c30 View commit details
    Browse the repository at this point in the history
  2. cloud_storage_clients: remove trailing whitespace

    NFC in `xml_sax_parser_test.cc`.
    
    (cherry picked from commit 705c9ca)
    WillemKauf authored and vbotbuildovich committed Jul 26, 2024
    Configuration menu
    Copy the full SHA
    04b4270 View commit details
    Browse the repository at this point in the history
  3. cloud_storage_clients: add test_parse_abs_with_blob_prefix

    (cherry picked from commit 336ff9d)
    WillemKauf authored and vbotbuildovich committed Jul 26, 2024
    Configuration menu
    Copy the full SHA
    7f312e7 View commit details
    Browse the repository at this point in the history