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

CORE-8964 Add protobuf support to existing ducktape suite for schema evolution. #24998

Merged
merged 3 commits into from
Feb 4, 2025

Conversation

oleiman
Copy link
Member

@oleiman oleiman commented Feb 1, 2025

Test semantics don't change.

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

@oleiman oleiman self-assigned this Feb 1, 2025
@oleiman oleiman force-pushed the dlib/core-8964/proto-dt-tests branch from def67d8 to 76ba6c1 Compare February 1, 2025 04:01
@vbotbuildovich
Copy link
Collaborator

vbotbuildovich commented Feb 1, 2025

CI test results

test results on build#61476
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/61476#0194bff2-1f22-4a00-bbb9-e00f9a21ef1f FLAKY 1/2
rptest.tests.compaction_recovery_test.CompactionRecoveryTest.test_index_recovery ducktape https://buildkite.com/redpanda/redpanda/builds/61476#0194bff6-7f55-41b8-aff2-61b035739a69 FLAKY 1/3
rptest.tests.compaction_recovery_test.CompactionRecoveryUpgradeTest.test_index_recovery_after_upgrade ducktape https://buildkite.com/redpanda/redpanda/builds/61476#0194bff6-7f53-46bf-bb50-0fe1f01d759b FLAKY 1/2
storage_single_thread_rpunit.storage_single_thread_rpunit unit https://buildkite.com/redpanda/redpanda/builds/61476#0194bfad-ded7-4726-95df-d93da472fae5 FLAKY 1/2
test results on build#61487
test_id test_kind job_url test_status passed
gtest_raft_rpunit.gtest_raft_rpunit unit https://buildkite.com/redpanda/redpanda/builds/61487#0194c967-0ffe-44d1-a787-e16eec013a08 FLAKY 1/2
rptest.tests.compaction_recovery_test.CompactionRecoveryTest.test_index_recovery ducktape https://buildkite.com/redpanda/redpanda/builds/61487#0194c9c1-fdcd-4666-a229-a880cd1a7a9d FLAKY 1/2
rptest.tests.data_migrations_api_test.DataMigrationsApiTest.test_migrated_topic_data_integrity.transfer_leadership=True.params=.cancellation.dir.in.stage.executing.use_alias.True ducktape https://buildkite.com/redpanda/redpanda/builds/61487#0194c9c1-fdcc-4cab-b17b-b6386d6b651f FLAKY 1/2
rptest.tests.partition_balancer_test.PartitionBalancerTest.test_unavailable_nodes ducktape https://buildkite.com/redpanda/redpanda/builds/61487#0194c9c7-722f-4634-8f46-eedce805589d FLAKY 1/2
rptest.tests.scaling_up_test.ScalingUpTest.test_scaling_up_with_recovered_topic ducktape https://buildkite.com/redpanda/redpanda/builds/61487#0194c9c7-722d-475b-bd9b-f46d8418d10b FLAKY 1/3
rptest.tests.timequery_test.TimeQueryTest.test_timequery.cloud_storage=True.batch_cache=False.spillover=False ducktape https://buildkite.com/redpanda/redpanda/builds/61487#0194c9c1-fdcc-4cab-b17b-b6386d6b651f FLAKY 1/2
test results on build#61530
test_id test_kind job_url test_status passed
gtest_raft_rpunit.gtest_raft_rpunit unit https://buildkite.com/redpanda/redpanda/builds/61530#0194cd56-1286-4e90-ba8c-4ac876ca779d FLAKY 1/2
rptest.tests.datalake.compaction_test.CompactionGapsTest.test_translation_no_gaps.cloud_storage_type=CloudStorageType.S3 ducktape https://buildkite.com/redpanda/redpanda/builds/61530#0194cd9f-2788-4dcc-9fc6-65f999b272eb FLAKY 1/3
rptest.tests.partition_movement_test.SIPartitionMovementTest.test_shadow_indexing.num_to_upgrade=0.cloud_storage_type=CloudStorageType.ABS ducktape https://buildkite.com/redpanda/redpanda/builds/61530#0194cd9f-2788-4dcc-9fc6-65f999b272eb FLAKY 1/2
storage_single_thread_rpunit.storage_single_thread_rpunit unit https://buildkite.com/redpanda/redpanda/builds/61530#0194cd56-1285-4792-93a0-97bfd29dc963 FLAKY 1/2

@oleiman oleiman force-pushed the dlib/core-8964/proto-dt-tests branch from 76ba6c1 to 0f1d959 Compare February 3, 2025 01:21
Specifically move producer and table verification methods onto AvroSchema in
preparation for extending to something more generic (to support both avro &
protobuf schemas)

Signed-off-by: Oren Leiman <[email protected]>
Basically what it says on the tin. Avoid changing the semantics of any test
cases, just add the ability to produce protobuf records of the same structure
as the current avro ones.

Signed-off-by: Oren Leiman <[email protected]>
@oleiman oleiman force-pushed the dlib/core-8964/proto-dt-tests branch from 0f1d959 to 676eef9 Compare February 3, 2025 19:41
@rockwotj rockwotj self-requested a review February 4, 2025 01:27
Comment on lines +71 to +74
fields="\n".join([
f" {'optional ' if ver == ProtobufVersion.PROTO2 else ''}{p_fields[i]['type']} {p_fields[i]['name']} = {i+1};"
for i in range(len(p_fields))
]),
Copy link
Member

Choose a reason for hiding this comment

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

l33t. this would almost have had me grabbing Jinja2 which is available in our deps (i think).

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah lol, this would be totally untenable if the types were any more complicated. it's annoying enough translating between avro & proto & spark & trino that it's probably better to let sleeping dogs lie 🙃

Copy link
Contributor

Choose a reason for hiding this comment

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

Someday this is going to get tricky with nested messages. I think it's worth testing nested messages, but we can do that later, can you make sure there is a Jira for it?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah no doubt. i'm not totally convinced this is the place for those tests, but yeah I can make a Jira. Apropos of nothing, I suspect (for this and other similar features) that our coverage of various protobuf cases is pretty limited.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@rockwotj rockwotj left a comment

Choose a reason for hiding this comment

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

Fantastic thank you!

Comment on lines +71 to +74
fields="\n".join([
f" {'optional ' if ver == ProtobufVersion.PROTO2 else ''}{p_fields[i]['type']} {p_fields[i]['name']} = {i+1};"
for i in range(len(p_fields))
]),
Copy link
Contributor

Choose a reason for hiding this comment

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

Someday this is going to get tricky with nested messages. I think it's worth testing nested messages, but we can do that later, can you make sure there is a Jira for it?

@oleiman oleiman merged commit 4859189 into redpanda-data:dev Feb 4, 2025
17 checks passed
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.

4 participants