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

cloud_storage/tests: match topic name when deleting manifest #5721

Merged

Conversation

abhijat
Copy link
Contributor

@abhijat abhijat commented Jul 29, 2022

when deleting manifest in test_missing_partition we should match topic name with the manifest path. fixes #5711

force push: adjust assertion to happen after topic match

@abhijat
Copy link
Contributor Author

abhijat commented Jul 29, 2022

we were deleting id_allocator manifest sometimes, causing this assertion failure:

[INFO  - 2022-07-28 15:37:48,233 - topic_recovery_test - _find_and_remove_partition_manifest - lineno:392]: manifest f0000000/meta/kafka_internal/id_allocator/0_23/manifest.json is removed, partition-1 last offset is 5032

Lazin
Lazin previously approved these changes Jul 29, 2022
Copy link
Contributor

@Lazin Lazin left a comment

Choose a reason for hiding this comment

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

LGTM

@abhijat abhijat force-pushed the test-missing-partition-use-exact-manifest branch from 65f3fea to 7ffc3fa Compare July 29, 2022 10:28
Lazin
Lazin previously approved these changes Jul 29, 2022
@mmedenjak mmedenjak added kind/bug Something isn't working area/tests ci-failure area/cloud-storage Shadow indexing subsystem labels Jul 29, 2022
@abhijat abhijat force-pushed the test-missing-partition-use-exact-manifest branch 2 times, most recently from b376a68 to 97c619a Compare July 29, 2022 13:24
when deleting manifest in test_missing_partition we should match topic
name with the manifest path.
@abhijat abhijat force-pushed the test-missing-partition-use-exact-manifest branch from 97c619a to 9333fa8 Compare July 29, 2022 13:25
@abhijat abhijat requested a review from Lazin July 29, 2022 13:25
@abhijat
Copy link
Contributor Author

abhijat commented Jul 29, 2022

there are two failures, not related to this test

#5612 and #5695 which is resolved but this PR did not contain the changes fixing the test

@abhijat abhijat merged commit 6d7aeb7 into redpanda-data:dev Jul 29, 2022
Comment on lines -348 to +349
topics = (TopicSpec(name='panda-topic',
topic_name = 'panda-topic'
topics = (TopicSpec(name=topic_name,
Copy link
Member

Choose a reason for hiding this comment

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

rather than doing this, access the name from the topicspec: self.topic is a shortcut if there is exactly one topic, or self.topics[n].name if you have more than one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the suggestion, I tried this on another PR to sneak in this change there, but it seems this property is only defined for RedpandaTest in rptest.tests.redpanda_test.RedpandaTest.topic whereas this code uses rptest.tests.topic_recovery_test.MissingPartition inherited from rptest.tests.topic_recovery_test.BaseCase neither of which have this property.

It might be good to define a similar property on this test case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cloud-storage Shadow indexing subsystem area/tests ci-failure kind/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Assertion failed in TopicRecoveryTest.test_missing_partition
4 participants