Skip to content

Conversation

@jongwooo
Copy link
Contributor

This pull request introduces a new controller command group to the CLI, allowing users to interact with a "morpher controller" via subcommands for pinging and retrieving information. It also adds a comprehensive client implementation for communicating with the controller, along with a full suite of unit tests for the client. The most important changes are grouped below:

CLI Command Additions

  • Added a new controller command group with ping and info subcommands, enabling users to check connectivity and retrieve controller details from the CLI (cmd/controller/controller.go, cmd/controller/ping.go, cmd/controller/info.go). [1] [2] [3]
  • Registered the new controller command group in the root CLI command, making it available to users (cmd/root.go). [1] [2]

Controller Client Implementation

  • Implemented a new Client in internal/controller/client.go to handle HTTP communication with the controller, including methods for ping, info retrieval, health checks, and configuration management.

Testing

  • Added a comprehensive test suite for the controller client, covering client creation, ping and info requests, health checks, and authorization header handling (internal/controller/client_test.go).

@jongwooo jongwooo requested a review from Copilot August 19, 2025 01:41
@jongwooo jongwooo self-assigned this Aug 19, 2025
@jongwooo jongwooo added the feat label Aug 19, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new controller command group to the CLI for interacting with a morpher controller, including ping and info subcommands. The implementation provides HTTP client functionality with authentication support and comprehensive test coverage.

  • Added controller CLI commands (controller ping and controller info) for checking connectivity and retrieving controller information
  • Implemented HTTP client with authentication, timeout configuration, and health check capabilities
  • Added comprehensive unit test suite covering client creation, HTTP requests, and authorization handling

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
cmd/root.go Registers the new controller command group
cmd/controller/controller.go Defines the main controller command group
cmd/controller/ping.go Implements ping subcommand for connectivity checks
cmd/controller/info.go Implements info subcommand for retrieving controller details
internal/controller/client.go HTTP client implementation with configuration management
internal/controller/client_test.go Comprehensive test suite for the controller client

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@jongwooo jongwooo force-pushed the feat/implement-controller-commands branch 2 times, most recently from fb4da75 to 6af01ba Compare August 19, 2025 01:47
@jongwooo jongwooo force-pushed the feat/implement-controller-commands branch from 6af01ba to 86eb1a4 Compare August 19, 2025 01:49
@jongwooo jongwooo merged commit b4c379a into main Aug 19, 2025
4 checks passed
@jongwooo jongwooo deleted the feat/implement-controller-commands branch August 19, 2025 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants