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

offline_log_viewer: fix get_control_record_type #18246

Merged
merged 1 commit into from
May 8, 2024

Conversation

bharathv
Copy link
Contributor

@bharathv bharathv commented May 3, 2024

Noticed this was broken while parsing some logs.

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.1.x
  • v23.3.x
  • v23.2.x

Release Notes

  • none

@bharathv bharathv requested a review from nvartolomei May 3, 2024 16:51
@@ -82,7 +90,7 @@ def decode_record(batch, header, record):
is_ctrl = attrs["control_batch"]
is_tx_ctrl = is_txn and is_ctrl
if is_tx_ctrl:
record_dict["type"] = self.get_control_record_type(record.key)
record_dict["type"] = get_control_record_type(record.key)
Copy link
Member

Choose a reason for hiding this comment

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

did you also want to remove the duplicate function get_control_record_type in KafkaLog below?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yikes.. I swear I removed it, maybe forgot to commit those changes.. anyway fixed it..

Also added a little regression test for future, had to adjust printing logic to print a wellformed json to stdout.

Noticed this was broken while parsing some logs.
Added a little regression test for the parsing
@bharathv
Copy link
Contributor Author

bharathv commented May 8, 2024

will re-request reviews once tests pass.. these OLV script changes usually break existing tests

@bharathv
Copy link
Contributor Author

bharathv commented May 8, 2024

Failure test_raft_rpunit unrelated.

@piyushredpanda piyushredpanda merged commit 8da29e6 into redpanda-data:dev May 8, 2024
13 of 16 checks passed
@vbotbuildovich
Copy link
Collaborator

/backport v24.1.x

@vbotbuildovich
Copy link
Collaborator

/backport v23.3.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants