-
Notifications
You must be signed in to change notification settings - Fork 656
feat: introduce as file uri
when ref secret
#22227
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR ensures that secret file references include a file://
URI scheme as required by most SDKs.
- Wraps the local secret file path with
file://
whenRefAsType::File
is used.
Comments suppressed due to low confidence (3)
src/common/secret/src/secret_manager.rs:169
- On Windows, file URIs typically require a triple slash (
file:///C:/path
) rather thanfile://C:/path
. Consider using theurl
crate or a platform-aware helper to construct valid file URIs across operating systems.
Ok(format("file://{}", path_str))
src/common/secret/src/secret_manager.rs:169
- Add unit tests to verify that
fill_secret
returns a properly prefixedfile://
URL for secret file paths, including edge cases such as Windows paths and special characters.
Ok(format("file://{}", path_str))
src/common/secret/src/secret_manager.rs:166
- Update the function-level documentation for
fill_secret
(or its public API) to indicate that the returned path now includes afile://
prefix.
RefAsType::File => {
AFAIK there are quite a few properties in rdkafka requires path instead of uri https://docs.confluent.io/platform/current/clients/librdkafka/html/md_CONFIGURATION.html This can be a breaking change
Can you elaborate? |
make sense, kafka requires an absolute path. Maybe a proper approach here is introducing |
This reverts commit 32a5272.
file://
prefix when ref secret fileas uri
when ref secret
as uri
when ref secretas file uri
when ref secret
If we know pulsar is an exception, can we add the |
after checking the existing codebase, the only one requires uri is MQTT
and that's because of the community contributor wrote the load cert process himself. Let's see the pulsar issue as an exception and do hack here |
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
in current impl, fill_secret returns the absolute path, but most sdk requires
file://<absolute-path>
What's changed and what's your intention?
Checklist
Documentation
Release note
introduce
AS FILE URI
when referencing a secret, which givesfile://<absolute path>
for a file