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

admin/server: fix get_cluster_id response formatting #16183

Merged
merged 3 commits into from
Mar 1, 2024

Conversation

andijcr
Copy link
Contributor

@andijcr andijcr commented Jan 19, 2024

Unwrap the cluster_uuid_t type when formatting the response

Fixes #16162

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

Release Notes

Improvements

  • get_cluster_uuid returns a correctly formatted string

@vbotbuildovich
Copy link
Collaborator

new failures in https://buildkite.com/redpanda/redpanda/builds/43975#018d2311-24e7-4719-b859-5b1d9cd4b288:

"rptest.tests.topic_creation_test.TopicRecreateTest.test_topic_recreation_while_producing.workload=IDEMPOTENT.cleanup_policy=compact"

@mmaslankaprv mmaslankaprv self-requested a review January 22, 2024 16:02
@andijcr
Copy link
Contributor Author

andijcr commented Jan 24, 2024

issue is #16036 in dev

mmaslankaprv
mmaslankaprv previously approved these changes Feb 6, 2024
Copy link
Member

@dotnwat dotnwat left a comment

Choose a reason for hiding this comment

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

we should have a test that checks the output format since this is an external facing interface?

@andijcr
Copy link
Contributor Author

andijcr commented Feb 7, 2024

we should have a test that checks the output format since this is an external facing interface?

interestingly in cluster_manifest.json we correctly unwrap uuid. here

orig_cluster_uuid_resp: str = admin.get_cluster_uuid(
self.redpanda.nodes[0])
# Wipe the directory away, simulating a full cluster outage.
self.redpanda.stop()
s3_snapshot = BucketView(self.redpanda, topics=self.topics)
orig_cluster_uuid, orig_highest_manifest_id = \
check_cluster_metadata_is_consistent(s3_snapshot)
assert orig_cluster_uuid in orig_cluster_uuid_resp, \
f"{orig_cluster_uuid_resp} vs {orig_cluster_uuid}"

we compare the uuid from a cluster_manifest.json against the response from admin API by doing
orig_cluster_uuid in orig_cluster_uuid_resp instead of orig_cluster_uuid == orig_cluster_uuid_resp so that test was coded to be resilient. i'm adding a ducktape test

Copy link
Contributor

@michael-redpanda michael-redpanda left a comment

Choose a reason for hiding this comment

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

lgtm

@andijcr andijcr merged commit a3d21bc into redpanda-data:dev Mar 1, 2024
17 checks passed
@andijcr andijcr deleted the fix/cluster_uuid_format branch March 1, 2024 14:42
@andijcr andijcr restored the fix/cluster_uuid_format branch March 1, 2024 14:42
@andijcr
Copy link
Contributor Author

andijcr commented Mar 1, 2024

/backport v23.3.x

@andijcr andijcr deleted the fix/cluster_uuid_format branch March 1, 2024 15:25
@andijcr andijcr restored the fix/cluster_uuid_format branch March 1, 2024 15:25
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Admin API /v1/cluster/uuid returns additional chars
5 participants