Skip to content

feat(cli): introduce the dirctl doctor network diagnose command#1515

Merged
tkircsi merged 3 commits into
mainfrom
feat/dirctl-doctor
May 26, 2026
Merged

feat(cli): introduce the dirctl doctor network diagnose command#1515
tkircsi merged 3 commits into
mainfrom
feat/dirctl-doctor

Conversation

@tkircsi
Copy link
Copy Markdown
Contributor

@tkircsi tkircsi commented May 18, 2026

Closes #1512

@tkircsi tkircsi self-assigned this May 18, 2026
@github-actions github-actions Bot added the size/L Denotes a PR that changes 1000-1999 lines label May 18, 2026
@tkircsi tkircsi added kind/feature Categorizes issue or PR as related to a new feature. area/cli and removed size/L Denotes a PR that changes 1000-1999 lines labels May 18, 2026
@tkircsi tkircsi force-pushed the feat/dirctl-doctor branch from 49cca9f to e0c0d9b Compare May 18, 2026 13:48
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 18, 2026

The latest Buf updates on your PR. Results from workflow Buf CI / verify-proto (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed⏩ skipped⏩ skipped✅ passedMay 26, 2026, 1:16 PM

@github-actions github-actions Bot added the size/L Denotes a PR that changes 1000-1999 lines label May 18, 2026
@tkircsi tkircsi marked this pull request as ready for review May 18, 2026 13:52
@tkircsi tkircsi requested a review from a team as a code owner May 18, 2026 13:52
@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

@github-actions github-actions Bot added size/XL Denotes a PR that changes 2000+ lines and removed size/L Denotes a PR that changes 1000-1999 lines labels May 20, 2026
Comment thread client/config/config.go
Comment on lines +57 to 59
type Doctor struct {
BootstrapPeers []string `yaml:"bootstrap_peers"`
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need this on the client side? the client is currently not aware of the DHT that is used under the hood of a given APIserver.

maybe the approach here would be:

  • the client can be: RoutingClient, ApiClient, or Client (which includes both)
  • the config for the ApiClient are what we have now (server/issuer/etc)
  • the config for the RoutingClient are things needed to interact with a specific network/DHT (routing address, routing keypath, etc)

this would nicely decouple the client into API vs DHT without having to define anything related for diagnostics (since it can be inferred from the configs natively)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a low level and basic DHT/libp2p network diagnostic tool not only for the client. besides the TCP/gRPC API checks it can help to the operators to validate the DHT part. It checks:

  1. is the multiaddress is valid?
  2. does this bootstrap peer accept libp2p connection and expose peer metadata?
  3. can a temporary DHT client reached bootstrap peer and communicate with it? (ie. populate routing table)

Copy link
Copy Markdown
Member

@ramizpolic ramizpolic May 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how is that any different from a reusable client for DHT operations (interaction with the low-level DHT outside of the apiserver scope)? defining a DHT-only client helps with decoupling and reusability not only in the Go SDK (client) but also in the CLI and other places.

Im okay not doing it right now, i was only pointing out that the client can be decoupled for DHT-only operations, and probably we could fully reuse the libp2p go client for this, including the config.

@tkircsi tkircsi force-pushed the feat/dirctl-doctor branch from 0386cd2 to e01b3c5 Compare May 26, 2026 11:31
tkircsi added 2 commits May 26, 2026 13:35
Signed-off-by: Tibor Kircsi <tkircsi@cisco.com>
Signed-off-by: Tibor Kircsi <tkircsi@cisco.com>
@tkircsi tkircsi force-pushed the feat/dirctl-doctor branch from e01b3c5 to 2c33ebd Compare May 26, 2026 11:36
Signed-off-by: Tibor Kircsi <tkircsi@cisco.com>
@tkircsi tkircsi merged commit 8b830b3 into main May 26, 2026
47 of 57 checks passed
@tkircsi tkircsi deleted the feat/dirctl-doctor branch May 26, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cli kind/feature Categorizes issue or PR as related to a new feature. size/XL Denotes a PR that changes 2000+ lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add dirctl doctor diagnostics for Directory endpoints

2 participants