Skip to content

Conversation

@whywaita
Copy link
Owner

Summary

  • Add shoes-tester CLI tool for testing shoes provider implementations
  • Developers can test AddInstance and DeleteInstance operations without running the full myshoes server
  • Supports two modes: simple mode (with custom setup script) and script generation mode

Changes

  • Add cmd/shoes-tester/main.go: Main CLI implementation with add/delete subcommands
  • Export GetSetupScript: Make pkg/starter.getSetupScript public for use by shoes-tester
  • Update protobuf files: Regenerate with newer protoc version (v5.29.3)
  • Add documentation: Comprehensive usage guide in docs/03_how-to-develop-shoes.md

Features

Add Instance

  • Simple mode: Use custom setup script
  • Script generation mode: Automatically generate GitHub runner setup scripts with GitHub App authentication
  • Supports resource types, labels, runner configuration options
  • JSON output for automation

Delete Instance

  • Delete instances by cloud ID
  • Support for labels
  • JSON output for automation

Test Plan

  • Build the tool: go build -o shoes-tester ./cmd/shoes-tester
  • Test with a shoes provider (e.g., shoes-mock) to verify AddInstance and DeleteInstance operations
  • Verify both simple mode and script generation mode work correctly
  • Check JSON output format

Notes

This tool is valuable for shoes provider development as it simplifies testing without the overhead of running the full myshoes server infrastructure.

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.
@whywaita whywaita requested a review from Copilot January 19, 2026 20:03
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 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-tester CLI tool with add and delete subcommands for testing shoes provider operations
  • Exported GetSetupScript method 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)
Copy link

Copilot AI Jan 19, 2026

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'.

Suggested change
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)

Copilot uses AI. Check for mistakes.
Comment on lines +275 to +277
privateKey, err := x509.ParsePKCS1PrivateKey(block.Bytes)
if err != nil {
return "", fmt.Errorf("failed to parse private key: %w", err)
Copy link

Copilot AI Jan 19, 2026

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.

Copilot uses AI. Check for mistakes.
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.
@whywaita whywaita merged commit d20faef into master Jan 19, 2026
5 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.

1 participant