Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
| fn execute(&self, _config: &Config, _pid: u32) -> Result<ExecutionResult> { | ||
| let key = prompt_input("Enter BE config key to update")?; | ||
| let value = prompt_input(&format!("Enter value for '{key}'"))?; | ||
| let persist = Confirm::with_theme(&ColorfulTheme::default()) | ||
| .with_prompt("Persist this configuration?") | ||
| .default(false) | ||
| .interact() | ||
| .map_err(|e| CliError::InvalidInput(format!("Input failed: {e}")))?; | ||
|
|
||
| ui::print_info(&format!( | ||
| "Updating BE config: {key}={value} (persist: {persist})" | ||
| )); | ||
|
|
||
| let endpoint = format!("/api/update_config?{key}={value}&persist={persist}"); | ||
| handle_update_result(be_http_client::post_be_endpoint(&endpoint), &key) |
There was a problem hiding this comment.
Build update_config query with incorrect parameter names
The request URL is constructed as /api/update_config?{key}={value}&persist={persist} which uses the BE configuration key as the parameter name. The Doris API expects fixed key and value query parameters, so a call like disable_storage_page_cache=true omits the required key argument altogether and the endpoint will reject the request. As implemented, every update attempt will fail even though the user is prompted for valid input. The query string should use key=<config>&value=<value> (with proper URL encoding) before issuing the POST.
Useful? React with 👍 / 👎.
As the title refers: https://doris.apache.org/docs/3.0/admin-manual/open-api/be-http/config/#request