Skip to content

[DOCKER] fix randomString for macOS compatibility#1864

Closed
unknowntpo wants to merge 1 commit into
opensource4you:mainfrom
unknowntpo:fix-cluster-id-macos
Closed

[DOCKER] fix randomString for macOS compatibility#1864
unknowntpo wants to merge 1 commit into
opensource4you:mainfrom
unknowntpo:fix-cluster-id-macos

Conversation

@unknowntpo

@unknowntpo unknowntpo commented Dec 10, 2025

Copy link
Copy Markdown
Contributor

Before this PR, randomString will produce empty string on MacOS.

This PR use /dev/urandom with proper base64 encoding instead of /dev/random which blocks on macOS. Generate URL-safe base64 cluster ID per KIP-78.

This approach is tested on MacOS 26.1 and Ubuntu 24.04 on docker.

Ref:

Use /dev/urandom with proper base64 encoding instead of /dev/random
which blocks on macOS. Generate URL-safe base64 cluster ID per KIP-78.
@unknowntpo

Copy link
Copy Markdown
Contributor Author

@chia7712 Would you like to review this PR ?

@chia7712

Copy link
Copy Markdown
Contributor

I have merged the #1861. would you mind testing it on you local?

@unknowntpo

Copy link
Copy Markdown
Contributor Author

I have merged the #1861. would you mind testing it on you local?

Sorry, didn't noticed that this issue has been fixed by #1861, and it works on my machine, so I'll close this PR.

@unknowntpo unknowntpo closed this Dec 10, 2025
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