Skip to content

Conversation

@jlewitt1
Copy link
Collaborator

@jlewitt1 jlewitt1 commented Jan 5, 2026

Summary

  • Add get_service_info() helper that fetches deployment mode, pods, and status in a single controller API call
  • Update CLI commands (kt check, kt port-forward, kt ssh, kt logs) to use consolidated endpoint
  • Reduces multiple sequential K8s API proxy calls to one roundtrip per command

Changes

  • globals.py: Add service_status() method to ControllerClient
  • cli_utils.py: Add get_service_info() helper, update detect_deployment_mode() to use new endpoint
  • cli.py: Refactor kt_check, kt_port_forward, kt_ssh, kt_logs to use get_service_info()

Copy link
Collaborator Author

jlewitt1 commented Jan 5, 2026

@jlewitt1 jlewitt1 changed the title Consolidate CLI service status calls into single API request Consolidate service status calls into single API request Jan 5, 2026
@jlewitt1 jlewitt1 force-pushed the consolidate-status-checks branch from cd102b6 to 8e4f86e Compare January 5, 2026 20:42
@jlewitt1 jlewitt1 marked this pull request as ready for review January 5, 2026 20:42
@dongreenberg dongreenberg changed the base branch from apply-and-pool-endpoints to graphite-base/2076 January 6, 2026 03:08
@jlewitt1 jlewitt1 force-pushed the graphite-base/2076 branch from 67bb817 to 80765c6 Compare January 6, 2026 09:36
@jlewitt1 jlewitt1 force-pushed the consolidate-status-checks branch from 8e4f86e to 1f8b4ed Compare January 6, 2026 09:36
@jlewitt1 jlewitt1 changed the base branch from graphite-base/2076 to apply-and-pool-endpoints January 6, 2026 09:36
@jlewitt1 jlewitt1 force-pushed the consolidate-status-checks branch from 1f8b4ed to a28324d Compare January 6, 2026 09:41
@dongreenberg dongreenberg changed the base branch from apply-and-pool-endpoints to graphite-base/2076 January 6, 2026 16:15
@jlewitt1 jlewitt1 force-pushed the consolidate-status-checks branch from a28324d to e2f0a22 Compare January 6, 2026 16:25
@jlewitt1 jlewitt1 changed the base branch from graphite-base/2076 to apply-and-pool-endpoints January 6, 2026 16:25
@jlewitt1 jlewitt1 force-pushed the consolidate-status-checks branch from e2f0a22 to 89c692d Compare January 6, 2026 17:04
@jlewitt1 jlewitt1 force-pushed the apply-and-pool-endpoints branch 2 times, most recently from 2ed4d35 to cc9e34b Compare January 6, 2026 17:06
@jlewitt1 jlewitt1 force-pushed the consolidate-status-checks branch from 89c692d to 22728fa Compare January 6, 2026 17:06
@dongreenberg dongreenberg force-pushed the apply-and-pool-endpoints branch from cc9e34b to 242488c Compare January 6, 2026 17:08
@dongreenberg dongreenberg force-pushed the consolidate-status-checks branch from 22728fa to 8a4dc6e Compare January 6, 2026 17:09
Base automatically changed from apply-and-pool-endpoints to main January 6, 2026 17:18
@jlewitt1 jlewitt1 force-pushed the consolidate-status-checks branch 5 times, most recently from fff95aa to 4251965 Compare January 7, 2026 20:57
return name, deployment_mode, pods, status


def get_deployment_mode(name: str, namespace: str) -> tuple:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this function is only being used in kt_describe after this PR, do you think it's worth keeping or just directly replacing the usage with name, deployment_mode, _, _ = get_service_info(name, namespace, require_pods=False)?

@jlewitt1 jlewitt1 force-pushed the consolidate-status-checks branch from 4251965 to 6d95474 Compare January 8, 2026 08:45
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.

3 participants