test#5
Closed
youngtaekiim wants to merge 60 commits into
Closed
Conversation
Co-authored-by: eunhyeYu <121590845+eunhyeYu@users.noreply.github.com>
Co-authored-by: eunhyeYu <121590845+eunhyeYu@users.noreply.github.com>
….lock change Co-authored-by: eunhyeYu <121590845+eunhyeYu@users.noreply.github.com>
Co-authored-by: eunhyeYu <121590845+eunhyeYu@users.noreply.github.com>
Pirictl - yaml command related modifications
- Change enum variants from Get to Describe across all commands - Rename functions: get_* to describe_* - Update function comments and documentation - Update README.md with new command syntax - Align CLI with kubectl-style conventions
refactor(settingscli): rename 'get' command to 'describe'
- 1.NodeAgent_DesiredState_Storage.md - 2.NodeAgent_Reconciliation_Loop.md - 3.NodeAgent_Liveness_Probe.md - 4.NodeAgent_Restart_Policy.md
…ainer for self-healing
- Change enum variants from List to Get across all commands - Rename functions: list_* to get_* - Update function comments and documentation - Update README.md with new command syntax - Keep user-facing messages unchanged
refactor(settingscli): rename 'list' command to 'get'
Feature: NodeAgent Self-Healing Implementation
This commit includes three major refactoring changes: 1. Change command order from resource-action to action-resource pattern - Old: settingscli board get → New: settingscli get board - Old: settingscli node describe <id> → New: settingscli describe node <id> - Old: settingscli container raw → New: settingscli raw container - Follows kubectl-style conventions for better UX 2. Add new 'top' command for live system monitoring - Create dedicated top.rs module with TopResource enum - Move formatted metrics display from metrics.rs to top.rs - New command: settingscli top metrics (replaces get metrics) - Keep 'raw metrics' for JSON output only - Separates monitoring from data retrieval operations 3. Change 'get' command resources to plural form - get board → get boards - get node → get nodes - get soc → get socs - get container → get containers - Aligns with REST API naming conventions (/api/v1/boards, etc.) - describe/raw commands remain singular (describe board, raw board) Changes: - Add src/tools/settingscli/src/commands/top.rs (new module) - Refactor src/tools/settingscli/src/main.rs (command structure) - Update src/tools/settingscli/src/commands/metrics.rs (remove describe) - Update src/tools/settingscli/src/commands/mod.rs (add top module) - Update src/tools/settingscli/README.md (full documentation update) Breaking Changes: - All commands now use action-resource order - 'get metrics' removed (use 'top metrics' instead) - 'get' commands require plural resource names (boards/nodes/socs/containers)
refactor(settingscli): restructure command syntax for consistency
…ting utilities
1. Redesign describe command outputs to kubectl-style format
- Board: Aggregated resources, network/disk I/O, last updated timestamp
- Node: System info, capacity, current usage with percentage display
- SoC: Status, aggregated resources, node list with usage hints
- Container: State-aware display for running vs terminated containers
- Human-readable units: KB/MB/GB for I/O, Mi for memory
- Relative timestamps: 'X hours ago' format for better UX
2. Apply kubectl-style column alignment and visual improvements
- Primary fields (Name, Status, Last Updated): 24-char fixed width
- Nested fields (cpu, memory, OS Image, etc): 22-char fixed width
- Remove separator lines (=====) for cleaner output
- Remove unnecessary newlines between sections
- Simplify field labels: remove 'Total' prefixes
- Terminology updates: 'Current Usage' → 'Allocatable' (kubectl standard)
- Update hint messages: 'Hint:' → 'For more details:'
- Consistent alignment across all describe commands (node, board, soc, container)
3. Redesign 'top metrics' command to kubectl-style table format
- Replace verbose nested output with clean tabular display
- Column layout: LEVEL, NAME/ID, CPU, CPU%, MEMORY, MEM%, GPU, ARCH, NET(RX/TX), DISK(R/W)
- Fetch data from 3 API endpoints: /api/v1/boards, /api/v1/socs, /api/v1/nodes
- Display all resource levels (Board, SoC, Node) in unified table
- Compact column widths (6-18 chars) for efficient terminal display
- Memory format: 'used / total' with Mi suffix
- Network/Disk format: 'RX/TX' and 'Read/Write' with human-readable units
4. Extract duplicate formatting functions to common format module
- Create src/commands/format.rs with 9 utility functions
- Remove ~274 lines of duplicate code from board/node/soc/container modules
- Functions: format_bytes, format_memory, format_duration, format_duration_ago,
capitalize, format_timestamp, calculate_uptime, calculate_runtime, extract_network_value
- Add 5 comprehensive unit tests for formatters
- Follows DRY principle for improved maintainability
5. Code quality improvements
- Replace wildcard imports with explicit function imports (container.rs)
- Fix clippy warnings: remove empty format string literals
- Remove unnecessary empty string parameters in println! statements
- Improve code readability and maintainability
6. Add chrono v0.4 dependency for timestamp parsing and formatting
- ISO 8601 timestamp conversion to human-readable format
- Timezone-aware datetime operations
- No dependency conflicts
Changes preserve data integrity while improving readability following kubectl design patterns.
All existing functionality verified. No breaking changes.
refactor(settingscli): improve describe outputs and centralize format…
- Simplify get commands table output (remove title and separators) - Add print_table_header() helper function to reduce code duplication - Refactor board/node/soc/container get commands to use helper - Simplify yaml apply/withdraw output (remove bold titles and separators) - Fix Node metric field names in top.rs (network_rx->rx_bytes, disk_read->read_bytes) - All outputs now follow consistent kubectl-style formatting
refactor(settingscli): improve output formatting to kubectl-style
- Rename project folder: src/tools/settingscli → src/tools/pirictl - Update package name in Cargo.toml: settingscli → pirictl - Update all code references and imports to use 'pirictl' - Update command name, help messages, and hints to 'pirictl' - Change container ID display from 12-char short ID to full 64-char ID - Fixes ETCD key lookup issue in describe container command All 17 commands tested and verified.
refactor: rename settingscli to pirictl
- Add 'pirictl apply -f <file>' command (replaces 'yaml apply') - Add 'pirictl delete -f <file>' command (replaces 'yaml withdraw') - Remove legacy 'yaml' subcommand completely - Align with kubectl conventions for better UX Usage: pirictl apply -f examples/resources/helloworld.yaml pirictl delete -f examples/resources/helloworld.yaml
feat: add kubectl-style apply/delete commands
…ling Nodeagent new feature : model(pod) Desired State Management, Liveness Probe, and Automatic Container Recovery
modify Pullpiri CLI - pirictl
Implementation handling Schedule information for Timpani
fix formatting fail issue during CI workflow
fix build error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.