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

[draft] sr: Perform raw schema lookup first #25050

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

michael-redpanda
Copy link
Contributor

Certain SR clients perform the following pattern to lookup schema IDs:

* POST /subject/sub/versions?normalize=true -d {schema}
* GET /subject/sub/versions/latest -> this returns the schema and latest version but NOT IDs
* POST /subject/sub -d {schema-from-get} -> this returns ID

In our SR, a call to POST /subject/sub without normalize=true will result in this schema being sanitized which may change the content of the schema. The change introduced in this PR is to perform a direct lookup of the raw provided schema before we either normalize or sanitize it.

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v24.3.x
  • v24.2.x
  • v24.1.x

Release Notes

  • None

Certain SR clients perform the following pattern to lookup schema IDs:

* POST /subject/sub/versions?normalize=true -d {schema}
* GET /subject/sub/versions/latest -> this returns the schema and latest
  version but NOT IDs
* POST /subject/sub -d {schema-from-get} -> this returns ID

In our SR, a call to POST /subject/sub without normalize=true will
result in this schema being sanitized which may change the content of
the schema.  The change introduced in this PR is to perform a direct
lookup of the raw provided schema before we either normalize or sanitize
it.

Signed-off-by: Michael Boquard <[email protected]>
@vbotbuildovich
Copy link
Collaborator

CI test results

test results on build#61637
test_id test_kind job_url test_status passed
rptest.tests.compaction_recovery_test.CompactionRecoveryTest.test_index_recovery ducktape https://buildkite.com/redpanda/redpanda/builds/61637#0194d876-4604-43ff-a56e-08574e17974e FLAKY 1/2
rptest.tests.compaction_recovery_test.CompactionRecoveryTest.test_index_recovery ducktape https://buildkite.com/redpanda/redpanda/builds/61637#0194d89b-d1b5-48da-b913-dc9fabd8f546 FLAKY 1/2
rptest.tests.compaction_recovery_test.CompactionRecoveryUpgradeTest.test_index_recovery_after_upgrade ducktape https://buildkite.com/redpanda/redpanda/builds/61637#0194d876-4605-463f-80cf-5c0077eb05a7 FLAKY 1/2
rptest.tests.datalake.compaction_test.CompactionGapsTest.test_translation_no_gaps.cloud_storage_type=CloudStorageType.S3.catalog_type=CatalogType.REST_JDBC ducktape https://buildkite.com/redpanda/redpanda/builds/61637#0194d89b-d1b3-434c-a1d6-1f259703559f FLAKY 1/2
rptest.tests.datalake.datalake_e2e_test.DatalakeE2ETests.test_topic_lifecycle.cloud_storage_type=CloudStorageType.S3.catalog_type=CatalogType.REST_HADOOP ducktape https://buildkite.com/redpanda/redpanda/builds/61637#0194d876-4604-43ff-a56e-08574e17974e FLAKY 1/2
rptest.tests.topic_delete_test.TopicDeleteCloudStorageTest.drop_lifecycle_marker_test.cloud_storage_type=CloudStorageType.S3 ducktape https://buildkite.com/redpanda/redpanda/builds/61637#0194d876-4605-463f-80cf-5c0077eb05a7 FLAKY 1/2

@michael-redpanda michael-redpanda marked this pull request as draft February 6, 2025 19:07
@michael-redpanda michael-redpanda changed the title sr: Perform raw schema lookup first [draft] sr: Perform raw schema lookup first Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants