Add configure connection test subcommand#26
Merged
Conversation
Co-authored-by: ewega <26189114+ewega@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add configure connection test subcommand
Add Feb 19, 2026
configure connection test subcommand
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a gh devlake configure connection test subcommand to verify existing DevLake connections after token rotation or network changes. The implementation follows established patterns from the connection list subcommand, supporting both flag-based (non-interactive) and interactive modes.
Changes:
- New
testsubcommand underconfigure connectionwith dual-mode operation (flag mode requires both--pluginand--id, otherwise enters interactive selection) - Reuses existing
client.TestSavedConnection()API method, no new API surface added - Comprehensive documentation in README.md positioned between
connection listandconfigure scopesections
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| cmd/configure_connection_test_cmd.go | New test subcommand with flag validation, interactive connection selection, and clear success/failure output following terminal output standards |
| cmd/configure_connection_test_cmd_test.go | Unit tests covering command registration, plugin validation via FindConnectionDef, and flag defaults |
| README.md | Documentation for the new command including usage examples, flag descriptions, and output samples |
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.
Adds
gh devlake configure connection testto re-test an existing connection by plugin + ID — useful after token rotation or network changes.Changes
cmd/configure_connection_test_cmd.go— Newtestsubcommand registered underconfigureConnectionsCmd:--pluginand--idprovided → validates plugin, callsTestSavedConnectiondirectlyresult.Success == falsecmd/configure_connection_test_cmd_test.go— Tests for subcommand registration, plugin validation, and flag defaultsREADME.md— Documents the new command between theconnection listandconfigure scopesectionsUsage
Uses the existing
client.TestSavedConnection(plugin, connID)method — no new API surface added.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.