Migrate issue triage workflow from Docker to ToolHive Actions#1
Migrate issue triage workflow from Docker to ToolHive Actions#1
Conversation
|
Just a heads up, when trying out the ToolHive Actions workflow, I hit an issue with the secrets manager in pkg/runner/env.go. Found it was a nil pointer problem, added a nil check, and now it works fine locally. Actions are still failing though since they’re picking up the older CLI without the fix. Would a quick pre-release with this patch make sense, or do you want to verify a different way, or just merge the patch as-is? |
|
Moved the fix to another PR. #2252 |
|
@kofort9 We recently released a new version of ToolHive that should have your PR merged included 👍 |
- Replace Docker-based MCP server setup with ToolHive Actions - Add comparative integration test (Docker vs ToolHive Actions) - Add ToolHive Actions validation test This is a draft to test the migration. Legacy Docker code is kept in the comparison test for validation purposes. Addresses stacklok#1469
This ensures we use the latest ToolHive release that includes the bug fix for nil pointer dereference in environment variable validation. The toolhive-actions/install@v0 action supports a version parameter that allows us to specify the exact ToolHive version to install.
The Install ToolHive step was incorrectly indented under the checkout step's 'with' section instead of being at the same level as other steps. This fixes the workflow file syntax errors that were preventing the ToolHive Actions workflows from running.
af38c93 to
f50ed3c
Compare
This fixes a panic that occurs when running MCP servers via GitHub Actions with environment variables when no secrets manager is configured. The code now gracefully handles the case where secretsManager is nil, allowing both Actions-based (env vars) and Docker-based (secrets manager) workflows to coexist. Fixes stacklok#1469
gofmt fixed a formatting issue with an extra blank line in the nil check code.
- Add 'thv secret provider none' step after ToolHive installation - Prevents blocking on missing secrets/provider configuration - Applied to all workflows that use ToolHive MCP servers: - toolhive-actions-validation-test.yml - issue-triage.yml - toolhive-migration-comparison-test.yml This change ensures CI workflows can proceed without interactive secrets setup, based on successful local testing.
- Add GITHUB_PERSONAL_ACCESS_TOKEN env var to all steps that run thv commands - Use secrets.GITHUB_TOKEN consistently across all workflows - Ensures GitHub authentication is available for ToolHive MCP operations
|
For the CI workflow is the missing GITHUB_PERSONAL_ACCESS_TOKEN environment variable, which the MCP server requires. Is there an existing GitHub personal access token that could be added to this repository's secrets (or is it possible to create one for this purpose)? @ChrisJBurns |
|
@kofort9 Would the |
The mcp-config action requires GitHub token to generate proper MCP server configuration for the GitHub MCP server. This step was missing the env variable mapping in all three workflows. - toolhive-actions-validation-test.yml - issue-triage.yml - toolhive-migration-comparison-test.yml
…w steps Only steps that actually interact with GitHub MCP server need the token: - Run GitHub MCP Server (needs token to authenticate) - Generate MCP Config (needs token to configure GitHub server) Removed from steps that don't need GitHub authentication: - Initialize ToolHive Secrets Provider (local config only) - Test MCP Tools Availability (thv list queries local state) - Test Config Compatibility (JSON validation only) - Cleanup (thv stop manages local containers) This reduces unnecessary environment variable declarations while keeping authentication where it's actually required.
6bab2cd to
f893f79
Compare
|
@ChrisJBurns I think it should but I can't tell because this is a forked repo. Custom secret failed also. |
|
@JAORMX You've got a bit more knowledge than me on the toolhive action side of things, would you be able to give this PR a look over? |
.github/workflows/issue-triage.yml
Outdated
| - name: Install ToolHive | ||
| uses: StacklokLabs/toolhive-actions/install@v0 | ||
| with: | ||
| version: v0.3.11 |
There was a problem hiding this comment.
should we use the latest toolhive version? you could do so by removing this version key.
Remove version: v0.3.11 specification from all workflow files to allow ToolHive Actions to use the latest available version. Addresses reviewer feedback in PR #1
|
I built a comparison workflow (.github/workflows/toolhive-migration-comparison-test.yml) that runs the legacy Docker and new ToolHive Actions side‑by‑side to validate MCP config parity (structure, servers, commands, args). In this fork, Docker can’t authenticate to generate the baseline, so the comparison job is skipped. |
The +build syntax has been deprecated in favor of //go:build. All affected files already have the modern //go:build directive, so removing the redundant +build lines fixes golangci-lint warnings. Signed-off-by: kofort9 <kofort9@gmail.com>
Migrates the claude issue triage action from Docker-based MCP server setup to ToolHive Actions. Fixes stacklok#1469