Skip to content

Use consistent versioned user-agent for all HTTP requests#79

Merged
sdairs merged 3 commits intomainfrom
fix-consistent-user-agent
Apr 1, 2026
Merged

Use consistent versioned user-agent for all HTTP requests#79
sdairs merged 3 commits intomainfrom
fix-consistent-user-agent

Conversation

@sdairs
Copy link
Copy Markdown
Collaborator

@sdairs sdairs commented Apr 1, 2026

Summary

  • Extracted user_agent() into a shared src/user_agent.rs module that returns clickhousectl/{version}
  • Updated all HTTP clients in version_manager/ (download, resolve, list) to use the shared function instead of hardcoded strings
  • Fixed list.rs which was using "ch-cli" instead of "clickhousectl"
  • cloud/client.rs::user_agent() now delegates to the shared module

Test plan

  • cargo build passes
  • cargo test — all 199 tests pass
  • cargo clippy — no new warnings

🤖 Generated with Claude Code

All outbound HTTP requests now use "clickhousectl/{version}" from a
single shared module instead of inconsistent hardcoded strings
("clickhousectl", "ch-cli") scattered across the codebase.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sdairs sdairs requested a review from iskakaushik as a code owner April 1, 2026 23:27
@sdairs sdairs temporarily deployed to cloud-integration April 1, 2026 23:27 — with GitHub Actions Inactive
sdairs and others added 2 commits April 2, 2026 00:29
Apply cargo fmt formatting as well.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
All callers now use crate::user_agent::user_agent() directly instead of
going through a redundant wrapper function.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sdairs sdairs temporarily deployed to cloud-integration April 1, 2026 23:35 — with GitHub Actions Inactive
@sdairs sdairs merged commit 6b91694 into main Apr 1, 2026
8 checks passed
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