[Backport release-2.28] Use Config parameters instead of a Config setter to set a Profile on a Config object. (#5539) #5586
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR removes the
Config::set_profile
method along with its corresponding C and C++ APIs, changing the logic so that users can specify a Profile directly on a Config object to retrieve itsrest.*
parameters. Instead of using the setter method, the new approach is to pass the Profile details as normal config parameters:"profile_name"
and"profile_dir"
.The primary motivation for this change is to enable setting Profile details via environment variables as an alternative to configuring them through code. This approach leverages the existing behavior of
Config::get_from_config_or_fallback
, which reads environment variables and treats them as standard config parameters. As a result, users can now use theTILEDB_PROFILE_NAME
andTILEDB_PROFILE_DIR
environment variables, improving the overall user experience - especially for those who frequently switch/test across different internal clusters.TYPE: IMPROVEMENT
DESC: Use config parameters instead of a config setter to set a profile on a config object.