-
-
Notifications
You must be signed in to change notification settings - Fork 15
feat: add shoes-tester CLI tool for testing shoes providers #251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add shoes-tester, a standalone CLI tool that allows developers to test shoes provider implementations without running the full myshoes server. This tool supports both AddInstance and DeleteInstance operations with two modes: simple mode (with custom setup script) and script generation mode (automatically generates GitHub runner setup scripts). Changes: - Add cmd/shoes-tester/main.go with CLI implementation - Export GetSetupScript in pkg/starter for use by shoes-tester - Update protobuf generated files with newer protoc version - Add comprehensive documentation in docs/03_how-to-develop-shoes.md The tool supports various options including resource types, labels, GitHub App authentication, and JSON output format for automation.
There was a problem hiding this 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 CLI tool (shoes-tester) that enables developers to test shoes provider implementations independently of the full myshoes server infrastructure. The tool supports both simple mode (with custom setup scripts) and script generation mode (with automatic GitHub runner setup script generation using GitHub App authentication).
Changes:
- Added
shoes-testerCLI tool withaddanddeletesubcommands for testing shoes provider operations - Exported
GetSetupScriptmethod in the starter package to enable external usage - Updated protobuf-generated files to reflect a newer protoc version (v5.29.3)
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/shoes-tester/main.go | New CLI tool implementation with add/delete commands, plugin client setup, and setup script generation |
| pkg/starter/starter.go | Updated method call to use the newly exported GetSetupScript |
| pkg/starter/scripts.go | Exported getSetupScript as GetSetupScript for external access |
| docs/03_how-to-develop-shoes.md | Added comprehensive documentation for using the shoes-tester tool |
| api/proto.go/myshoes_grpc.pb.go | Regenerated with protoc v5.29.3 |
| api/proto.go/myshoes.pb.go | Regenerated with protoc v5.29.3 and protoc-gen-go v1.31.0 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| raw, err := rpcClient.Dispense("shoes_grpc") | ||
| if err != nil { | ||
| return nil, nil, fmt.Errorf("failed to shoes client instance: %w", err) |
Copilot
AI
Jan 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message 'failed to shoes client instance' is grammatically incorrect. It should be 'failed to get shoes client instance' or 'failed to dispense shoes client instance'.
| return nil, nil, fmt.Errorf("failed to shoes client instance: %w", err) | |
| return nil, nil, fmt.Errorf("failed to dispense shoes client instance: %w", err) |
| privateKey, err := x509.ParsePKCS1PrivateKey(block.Bytes) | ||
| if err != nil { | ||
| return "", fmt.Errorf("failed to parse private key: %w", err) |
Copilot
AI
Jan 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code only attempts to parse the private key as PKCS1 format. GitHub App private keys can also be in PKCS8 format. Consider adding fallback logic to try x509.ParsePKCS8PrivateKey if PKCS1 parsing fails, to support both common formats.
Regenerate protobuf files to fix deprecated Exporter usage that was causing CI lint failures. Updated from protoc-gen-go v1.31.0 to v1.36.11 which removes the deprecated code generation patterns.
Summary
Changes
Features
Add Instance
Delete Instance
Test Plan
go build -o shoes-tester ./cmd/shoes-testerNotes
This tool is valuable for shoes provider development as it simplifies testing without the overhead of running the full myshoes server infrastructure.