release: v0.10.7#138
Merged
Merged
Conversation
Adds axis daemon mesh to query the /v2/mesh HTTP endpoint and display active gossip peers in a colored table. - fetchDaemonMesh: authenticated GET to /v2/mesh with error handling - printMeshPeers: color-coded state rendering for trusted/verified/discovered/suspect - humanizeTime: relative timestamps for LastSeen - Tests for peer fetching, empty state, CLI rendering, and time formatting Quality gates passed: lint, test-race, coverage 72.4 percent, build. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Register /mesh endpoint in daemon router (internal/daemon/handlers.go) - Add Mesh() to SnapshotCache interface; mockCache already satisfies it - Add MarshalJSON/UnmarshalJSON to mesh.PeerState so it serializes as string - Refactor fetchDaemonMesh to use shared newDaemonRequest helper - Guard empty response body in mesh query error messages - Remove ANSI color codes from tabwriter rows to avoid misalignment - Handle negative durations in humanizeTime (clock skew) - Update tests to use /mesh endpoint and string state values Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Bump version to 0.10.7 - Update CHANGELOG.md with daemon mesh subcommand release notes - Update summary golden files - Refresh docs/current-state.md Quality gates passed: lint, test-race, coverage 72.3%, build. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces the axis daemon mesh subcommand for inspecting the operator mesh, alongside a new /mesh API endpoint. Key changes include the implementation of JSON serialization for mesh.PeerState, a refactored newDaemonRequest helper for standardized API calls, and comprehensive testing for the new functionality. Review feedback suggests further consolidating the daemon request logic across other commands, utilizing the existing mesh.Peer struct to avoid duplication in the CLI, and removing a redundant nil check in the mesh handler.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Refactor invalidateDaemonCache and refreshDaemonCacheWithTrigger to use newDaemonRequest helper, consolidating duplicated token loading logic. - Replace local meshPeer struct with mesh.Peer; leverage PeerState JSON serialization and String() for consistent CLI rendering. - Truncate mesh peer list at 50 peers with remaining count indicator. - Remove redundant nil check for peers in daemon meshHandler. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Release v0.10.7 — daemon mesh subcommand.
Changes:
axis daemon meshsubcommand for operator mesh introspection/meshendpoint registered in daemon routermesh.PeerStatenow serializes as human-readable strings in JSONQuality gates (all passed):
make lint✅make test-race✅make coverage✅ (72.3%)make build✅Release checklist:
internal/buildinfo/version.godocs/current-state.mdrefreshed via./hack/refresh-current-state.sh./hack/verify-repo-truth.shpasses