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

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #22331

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)
NFC in `xml_sax_parser_test.cc`.

(cherry picked from commit 705c9ca)
@vbotbuildovich vbotbuildovich added this to the v24.2.x-next milestone Jul 26, 2024
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Jul 26, 2024
Copy link
Contributor

@WillemKauf WillemKauf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI failure is #21626

@WillemKauf WillemKauf merged commit 0182e7b into redpanda-data:v24.2.x Jul 27, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants