Skip to content

fix(tracking): categorize psql and mysql as cloud (#4023) - #4033

Open
anujsingh-cse wants to merge 1 commit into
rtk-ai:developfrom
anujsingh-cse:fix/categorize-psql-mysql-cloud
Open

anujsingh-cse wants to merge 1 commit into
rtk-ai:developfrom
anujsingh-cse:fix/categorize-psql-mysql-cloud

Conversation

@anujsingh-cse

Copy link
Copy Markdown
Contributor

Closes #4023

Problem

categorize_command in src/core/tracking.rs had no arm for psql (or mysql), so every rtk psql / rtk mysql run was bucketed as "other" in rtk gain's category breakdown instead of "cloud", where docker and kubectl already sit.

Fix

Add psql and mysql to the cloud arm:

"docker" | "kubectl" | "psql" | "mysql" => "cloud",

I also checked the other src/cmds/cloud/ entry points (aws, curl, wget) the issue flagged: aws is a cloud-provider CLI but curl/wget are generic network tools, and re-bucketing them would rewrite existing rtk gain output for users who already have those commands recorded. I kept this change scoped to the database CLIs the issue names; happy to add aws/curl/wget if you'd prefer them in cloud.

Tests

Added test_categorize_psql_and_mysql_as_cloud asserting both rtk psql and rtk mysql classify as cloud.

cargo fmt --check and cargo clippy --all-targets clean; the two categorize tests pass.

@rtk-wshm-sync-bot rtk-wshm-sync-bot Bot added bug Something isn't working tracking labels Sep 13, 2026
@rtk-wshm-sync-bot

Copy link
Copy Markdown

wshm · Automated triage by AI

📊 Automated PR Analysis

🐛 Type bug-fix
🟢 Risk low

Summary

Adds psql and mysql to the cloud category arm in categorize_command within src/core/tracking.rs, fixing miscategorization of these commands as other in rtk gain output. Includes a new unit test verifying both commands classify as cloud.

Review Checklist

  • Tests present
  • Breaking change
  • Docs updated

Linked issues: #4023


Analyzed automatically by wshm · This is an automated analysis, not a human review.

@anujsingh-cse
anujsingh-cse force-pushed the fix/categorize-psql-mysql-cloud branch 2 times, most recently from 031279c to fddaf9b Compare September 14, 2026 05:53
@anujsingh-cse

Copy link
Copy Markdown
Contributor Author

Rebased onto the latest \develop\ (this branch has conflicted twice already as #891\ and #1298\ landed in \src/core/tracking.rs). It's currently mergeable, tests, \ mt, and \clippy\ are all green — happy to address anything in review.

@anujsingh-cse
anujsingh-cse force-pushed the fix/categorize-psql-mysql-cloud branch from fddaf9b to a93659b Compare October 10, 2026 08:49
@anujsingh-cse

Copy link
Copy Markdown
Contributor Author

Rebased onto current develop. The branch was ~270 commits behind a base whose rustdoc gate has since been repaired upstream, which is what the earlier failed run inherited. No code changes were needed; all local gates pass against current develop: cargo fmt --all --check, cargo clippy --all-targets, cargo doc --no-deps, the test-isolation guard, and all 58 tracking tests. The fresh workflow run will need approval to start.

@anujsingh-cse
anujsingh-cse force-pushed the fix/categorize-psql-mysql-cloud branch from a93659b to ace2bec Compare October 26, 2026 09:13
@anujsingh-cse

Copy link
Copy Markdown
Contributor Author

Rebased onto current develop (e05c7bd) and force-pushed ace2bec.

The only conflict was test placement at the end of src/core/tracking.rs: develop added the interactive-session exec-time tests there, so I kept those and appended test_categorize_psql_and_mysql_as_cloud after them. The production change is unchanged (psql/mysql added to the cloud arm).

Local gates: cargo fmt --all -- --check clean; cargo clippy --all-targets -- -D warnings clean; cargo test --lib core::tracking 63 passed; full cargo test --lib 4451 passed / 22 failed, with the same 22 Windows sh-missing failures as the unmodified develop tree. The fresh CI run will need approval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working tracking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

categorize_command buckets psql (and mysql) as "other" instead of "cloud" in rtk gain

1 participant