delete and status response#101
Merged
allisoneer merged 5 commits intohumanlayer:mainfrom May 14, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Caution
Changes requested ❌
Reviewed everything up to 85bacf3 in 1 minute and 55 seconds. Click for details.
- Reviewed
558lines of code in3files - Skipped
0files when reviewing. - Skipped posting
1draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. acp/internal/server/server_test.go:324
- Draft comment:
Consider using the apierrors.StatusError alias instead of errors.StatusError for consistency in error handling. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
Workflow ID: wflow_UUGOoezaH4SZBPUP
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
| var mcpServer acp.MCPServer | ||
| if err := s.client.Get(ctx, client.ObjectKey{Namespace: namespace, Name: mcpRef.Name}, &mcpServer); err == nil { | ||
| // Extract key from MCP server name (assuming it follows the pattern: {agent-name}-{key}) | ||
| parts := strings.Split(mcpRef.Name, "-") |
Contributor
There was a problem hiding this comment.
Using strings.Split to extract the MCP server key is brittle if names contain extra dashes. Consider a more robust parsing strategy or storing the key explicitly.
| } | ||
|
|
||
| // Delete MCP servers and secrets | ||
| for _, mcpRef := range agent.Spec.MCPServers { |
Contributor
There was a problem hiding this comment.
The deleteAgent handler stops on the first deletion error for MCP servers or secrets. Consider aggregating errors to attempt deletion of all associated resources for improved idempotency.
dexhorthy
reviewed
May 14, 2025
| Status string `json:"status,omitempty"` // e.g., "Ready", "Error", "Pending" | ||
| StatusDetail string `json:"statusDetail,omitempty"` // Additional status details | ||
| Ready bool `json:"ready,omitempty"` // Indicates if agent is ready | ||
| MCPStatus map[string]string `json:"mcpStatus,omitempty"` // Status of each MCP server |
Contributor
There was a problem hiding this comment.
move into MCPServerConfig as status fields
dexhorthy
approved these changes
May 14, 2025
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.
Important
Add DELETE endpoint for agents and enhance agent status response with new fields, including comprehensive tests.
DELETE /v1/agents/:nameendpoint inserver.goto delete agents and associated resources.AgentResponseinserver.goto includestatus,statusDetail,ready, andMCPStatusfields.TestAgentEndpointStatusinagent_status_test.goto verify agent status response.DELETE /v1/agents/:nameinserver_test.goto ensure agent and resources deletion, handle non-existent agents, and idempotency.This description was created by
for 85bacf3. You can customize this summary. It will automatically update as commits are pushed.