-
Notifications
You must be signed in to change notification settings - Fork 44
feat: execute actor actions through inspector #1416
feat: execute actor actions through inspector #1416
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
PR Review: Execute Actor Actions Through InspectorOverviewThis PR adds the ability to execute actor actions through the inspector API, which is useful for debugging and testing actors. The implementation creates a temporary HTTP connection and executes the action through it. Code Quality & Best Practices✅ Strengths
|
More templates
@rivetkit/actor
@rivetkit/cloudflare-workers
@rivetkit/core
@rivetkit/db
@rivetkit/framework-base
@rivetkit/next-js
@rivetkit/react
rivetkit
@rivetkit/sql-loader
commit: |
0509b6e
to
ee9723e
Compare
Pull Request Review: Execute Actor Actions Through InspectorSummaryThis PR adds the ability to execute actor actions through the inspector API. The implementation creates a temporary HTTP connection for each action execution, similar to how HTTP actions are handled in the regular actor router. Code Quality & Best Practices✅ Strengths
|
ee9723e
to
c1e5de1
Compare
Pull Request Review: Execute Actor Actions Through InspectorSummaryThis PR adds the ability to execute actor actions through the inspector API by creating a temporary HTTP connection and executing the action within that connection context. The implementation is clean and follows existing patterns in the codebase. Code Quality & Best PracticesPositive Observations:
Import Change (packages/rivetkit/src/actor/instance.ts:23): Potential Issues & Concerns1. Error Handling - Missing Try-Catch in Inspector RouteLocation: The new Recommendation: .post(
"/action",
sValidator(
"json",
z.object({ name: z.string(), params: z.array(z.any()).optional() }),
),
async (c) => {
const { name, params } = c.req.valid("json");
try {
const result = await c.var.inspector.accessors.executeAction(
name,
params,
);
return c.json({ result }, 200);
} catch (error) {
return c.json({ error: (error as Error).message }, 500);
}
},
) 2. Connection Lifecycle - Potential Race ConditionLocation: The Concerns:
Recommendation: Consider adding a flag to async createConn(
socket: ConnSocket,
params: any,
token?: string,
opts?: { skipHooks?: boolean }
): Promise<Conn<S, CP, CS, V, I, DB>> 3. Connection Parameters - Using
|
4e07ed5
into
10-20-fix_get_actor_in_remote_driver
* fix: get actor in remote driver * feat: execute actor actions through inspector (#1416)
No description provided.