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

Hot fix/UUID having extr chars #3134

Closed

Conversation

kefeimo
Copy link
Contributor

@kefeimo kefeimo commented Nov 3, 2023

fixing #3132

Helper function to calculate unique uuids with minial char numbers.
Mechanism: start common_len at 1, collect a pool of uuids represent by first common_len of its uuid, increase the number of common_len until the pool of uuids with heading common_len has unique members.

Example Process:

agent_ids = ['9b171ba5-f69f-4895-a69e-b51cf4d78150',
'2c7c8405-49c8-48eb-86ff-236ebe39da6e',
'd73a71c8-000f-46aa-8e5f-c4436cf847c3',
'da2c1f0d-6ce5-4095-843c-3abc861d5199',
'f5de325c-e723-41e5-9ceb-fae722a40eb6']

round 1: common_length = 1
["9", "2", "d", "d", "f"] , not unique, common_length += 1

round 2: common_length = 2
["9b", "2c", "d7", "da", "f5"] , unique. Stop, common_length == 2

@kefeimo kefeimo changed the base branch from main to develop November 3, 2023 18:02
@kefeimo kefeimo requested a review from craig8 November 3, 2023 18:02
Copy link
Contributor

@craig8 craig8 left a comment

Choose a reason for hiding this comment

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

Looks good...will check after we have the tests finished.

@craig8 craig8 closed this Mar 25, 2024
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.

2 participants