Skip to content

[settingscli] Route YAML commands directly to API Server (port 47099)#8

Draft
Copilot wants to merge 4 commits into
mainfrom
copilot/implement-settings-cli-api-routing
Draft

[settingscli] Route YAML commands directly to API Server (port 47099)#8
Copilot wants to merge 4 commits into
mainfrom
copilot/implement-settings-cli-api-routing

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 11, 2026

The empty-response fix (bytes().await? + is_empty() guard) was applied via a shared helper to all HTTP methods, unintentionally affecting post, put, delete, post_yaml, and delete_yaml.

Changes

  • client.rs get(): Retains the inline bytes-check for empty-body 200 OK responses:
    let bytes = response.bytes().await?;
    let json = if bytes.is_empty() {
        Value::Null
    } else {
        serde_json::from_slice(&bytes)?
    };
  • All other methods (post, put, delete, post_yaml, delete_yaml): Reverted to response.json().await? — these methods always expect a JSON body.
  • parse_response_body helper removed: No longer needed since the fix is scoped to get() only.

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Implement settings CLI API server routing settingscli: Route YAML commands directly to API Server (port 47099) Mar 11, 2026
@eunhyeYu
Copy link
Copy Markdown
Owner

@copilot 요청한 내용과 별개의 수정사항이 있다면 원복해주고, url 처리에 url 크레이트를 사용하는 방식으로 수정해줘

Copy link
Copy Markdown
Author

Copilot AI commented Mar 11, 2026

@eunhyeYu The model claude-sonnet-4.6 is not available for your account. This can happen if the model was disabled by your organization's policy or if your Copilot plan doesn't include access to it.

You can try again without specifying a model (just @copilot) to use the default, or choose a different model from the model picker.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: a946f1d9-61d1-4a4a-a090-3ab6ba80441e

@eunhyeYu
Copy link
Copy Markdown
Owner

@copilot 요청한 내용과 별개의 수정사항이 있다면 원복해주고, url 처리에 url 크레이트를 사용하는 방식으로 수정해줘

Copy link
Copy Markdown
Author

Copilot AI commented Mar 11, 2026

@copilot 요청한 내용과 별개의 수정사항이 있다면 원복해주고, url 처리에 url 크레이트를 사용하는 방식으로 수정해줘

Replaced the custom strip_port() helper with build_url_with_port() that uses Url::parse() and set_port() from the url crate (added url = "2.5" to Cargo.toml). The url crate was already a transitive dependency via reqwest.

Commit: 707a728

@eunhyeYu
Copy link
Copy Markdown
Owner

@copilot server/rocksdbservice의 toml 변경점이 필요한 것인지 확인해주고, health check 의 응답이 200 OK의 empty response일 경우 error로 처리하는 문제 수정이 필요해보여. client.rs의 pub async fn get(&self, endpoint: &str) -> Result { 에서 let bytes = response.bytes().await?;
let json = if bytes.is_empty() { 와 같이 수정하는 방식으로 문제 개선하는 방법 검토해주고 더 나은 방법이 있으면 나은 방법으로 수정해줘

Copy link
Copy Markdown
Author

Copilot AI commented Mar 11, 2026

@eunhyeYu The model claude-sonnet-4.6 is not available for your account. This can happen if the model was disabled by your organization's policy or if your Copilot plan doesn't include access to it.

You can try again without specifying a model (just @copilot) to use the default, or choose a different model from the model picker.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: b5c073cb-4b96-457b-aa6a-85cf57259607

@eunhyeYu
Copy link
Copy Markdown
Owner

@copilot server/rocksdbservice의 toml 변경점이 필요한 것인지 확인해주고, health check 의 응답이 200 OK의 empty response일 경우 error로 처리하는 문제 수정이 필요해보여. client.rs의 pub async fn get(&self, endpoint: &str) -> Result { 에서 let bytes = response.bytes().await?;
let json = if bytes.is_empty() { 와 같이 수정하는 방식으로 문제 개선하는 방법 검토해주고 더 나은 방법이 있으면 나은 방법으로 수정해줘

Copy link
Copy Markdown
Author

Copilot AI commented Mar 11, 2026

@copilot server/rocksdbservice의 toml 변경점이 필요한 것인지 확인해주고, health check 의 응답이 200 OK의 empty response일 경우 error로 처리하는 문제 수정이 필요해...

Two things addressed in commit 17f52e6:

  1. rocksdbservice/Cargo.lock: only the lock file (not the .toml) had drifted — it was an unintentional side-effect of running cargo during development. Reverted to the upstream state.

  2. Empty-body 200 OK handling: instead of repeating the bytes check inline, I added a private parse_response_body() helper that all HTTP methods now share:

    async fn parse_response_body(response: reqwest::Response) -> Result<Value> {
        let bytes = response.bytes().await?;
        if bytes.is_empty() {
            Ok(Value::Null)
        } else {
            Ok(serde_json::from_slice(&bytes)?)
        }
    }

    This covers get, post, put, delete, post_yaml, and delete_yaml — so the health-check endpoint returning 200 OK with no body will now correctly return Ok(true) instead of a JSON parse error.

eunhyeYu pushed a commit that referenced this pull request Mar 11, 2026
feat(auth):Modify CI/CD PipeLine WorkFlow for Pullpiri by code coverage report[eclipse-pullpiri#140]
Copilot AI changed the title settingscli: Route YAML commands directly to API Server (port 47099) settingscli: Scope empty-body response fix to get() only Mar 11, 2026
@eunhyeYu eunhyeYu force-pushed the copilot/implement-settings-cli-api-routing branch from 4024b15 to 4ecb4a3 Compare March 11, 2026 07:24
eunhyeYu and others added 4 commits March 11, 2026 16:25
Co-authored-by: eunhyeYu <121590845+eunhyeYu@users.noreply.github.com>
Co-authored-by: eunhyeYu <121590845+eunhyeYu@users.noreply.github.com>
….lock change

Co-authored-by: eunhyeYu <121590845+eunhyeYu@users.noreply.github.com>
Co-authored-by: eunhyeYu <121590845+eunhyeYu@users.noreply.github.com>
@eunhyeYu eunhyeYu force-pushed the copilot/implement-settings-cli-api-routing branch from 4ecb4a3 to 7f09b2c Compare March 11, 2026 07:26
@eunhyeYu eunhyeYu changed the title settingscli: Scope empty-body response fix to get() only settingscli: Route YAML commands directly to API Server (port 47099) Mar 11, 2026
@eunhyeYu eunhyeYu changed the title settingscli: Route YAML commands directly to API Server (port 47099) [settingscli] Route YAML commands directly to API Server (port 47099) Mar 11, 2026
@eunhyeYu eunhyeYu force-pushed the main branch 3 times, most recently from 6fe4c0e to 4b2f7a7 Compare May 4, 2026 01:18
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