Skip to content

Conversation

@kradalby
Copy link
Collaborator

No description provided.

@ghost
Copy link

ghost commented Jul 14, 2025

Pull Request Revisions

RevisionDescription
r8
Error messages simplified, CLI timeout increasedModified error messages in node and user lookup functions, and extended default CLI timeout from 5 to 30 seconds
r7
CLI flag names updated across projectUpdated various CLI flags from --identifier to --node and added more flexible user identification in node and user commands
r6
CLI flags deprecated: namespace and identifierRemoved deprecated CLI flags `--namespace` and `--identifier` across multiple commands, replacing them with `--user` and `--node` respectively. Updated command syntax and flag handling in the headscale CLI.
r5
CLI standardization with smart lookupImplemented comprehensive CLI standardization including command naming, flag conventions, enhanced filtering, and smart lookup for nodes and users with full backward compatibility
r4
Refactored CLI utility functionsSimplified CLI code by extracting common utilities, removing redundant files, and standardizing output and flag handling across commands
r3
Simplified CLI client connection patternIntroduced a new WithClient pattern to reduce boilerplate gRPC client setup across all CLI commands, removing repetitive connection and error handling code.
r2
Added column filtering for CLI tablesIntroduced a new --columns flag for table commands to allow customizable column display. Updated table rendering infrastructure to support dynamic column selection and ordering, with a detailed implementation guide for developers.
r1
Enhance CLI with robust infrastructureThis extensive changeset introduces a complete CLI infrastructure for the Headscale project, including:
  1. New testing infrastructure for CLI commands
  2. Refactored command implementations with improved error handling and validation
  3. Comprehensive unit and integration test coverage
  4. New utility functions for flag handling, validation, and output formatting
  5. Mock client and testing helpers for CLI command testing
  6. Standardized command patterns and error handling
  7. Documentation improvements for CLI usage and commands

Key files added include:

  • Multiple test files (e.g., *_test.go)
  • New utility files like flags.go, validation.go, client.go
  • Refactored command implementations
  • Integration test files for various CLI commands

The changes significantly improve the CLI's robustness, testability, and maintainability.


☑️ AI review skipped for r8
Help
React with emojis to give feedback on AI-generated reviews:

  • 👍 means the feedback was helpful and actionable
  • 👎 means the feedback was incorrect or unhelpful
💬 Replying to feedback with a comment helps us improve the system. Your input also contributes to shaping future interactions with the AI reviewer.

We'd love to hear from you—reach out anytime at team@review.ai.

kradalby and others added 8 commits July 14, 2025 15:50
- Update users destroy command usage string to reflect --user flag
- Fix documentation examples to use --node instead of --identifier
- Ensure complete CLI consistency across all commands and docs

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…ized environment

The integration tests were failing with timeout errors when running
route-related operations like ApproveRoutes. The issue was that the
CLI timeout was set to 5 seconds by default, but the containerized
test environment with network latency and startup delays required
more time for CLI operations to complete.

This fix increases the CLI timeout to 30 seconds specifically for
integration tests through the HEADSCALE_CLI_TIMEOUT environment
variable.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@kradalby kradalby force-pushed the kradalby/cli-experiement3 branch from 4e5c004 to fe49787 Compare July 16, 2025 08:24
- Increase default CLI timeout from 5s to 30s in config.go
- Fix error messages to match test expectations ("user/node not found")
- Smart lookup gRPC calls need more time in containerized CI environment

The CLI smart lookup feature makes additional gRPC calls that require
longer timeouts than the original 5-second default, especially in
containerized test environments with network latency.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@kradalby kradalby added this to the v0.28.0 milestone Jul 18, 2025
@kradalby kradalby modified the milestones: v0.28.0, v0.29.0 Aug 10, 2025
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.

2 participants