feat(block): Add Dagster block#3924
feat(block): Add Dagster block#3924abhinavDhulipala wants to merge 2 commits intosimstudioai:stagingfrom
Conversation
|
@abhinavDhulipala is attempting to deploy a commit to the Sim Team on Vercel. A member of the Team first needs to authorize it. |
PR SummaryMedium Risk Overview Introduces a new Reviewed by Cursor Bugbot for commit 0eca5e8. Bugbot is set up for automated code reviews on this repo. Configure here. |
ae73ab1 to
fcd8ace
Compare
Greptile SummaryThis PR adds a new Dagster integration block (5 operations: Launch Run, Get Run, List Runs, List Jobs, Terminate Run) and a CloudWatch block (7 operations), both following the standard tool → block → icon → registry pattern. The implementation is functionally solid: the GraphQL queries and mutations are well-structured, the Key points:
Confidence Score: 5/5Safe to merge; all remaining findings are minor style and type-correctness suggestions that do not affect runtime correctness for typical usage. The core integration logic is correct — GraphQL queries/mutations are well-formed, the block params merge behaviour was verified against the executor, and edge-case error paths are handled. The only functional concern (limit=0 falsy guard) affects an impractical edge case. Remaining items are style violations and a type annotation improvement. apps/sim/blocks/blocks/dagster.ts (non-TSDoc comments + limit=0 guard), apps/sim/tools/dagster/types.ts (apiKey optionality), apps/sim/tools/dagster/terminate_run.ts (non-TSDoc comments) Important Files Changed
Sequence DiagramsequenceDiagram
participant UI as Sim Workflow UI
participant Exec as Block Executor
participant Tool as Dagster Tool
participant DG as Dagster GraphQL API
UI->>Exec: Execute DagsterBlock (operation, host, apiKey, ...params)
Exec->>Exec: tools.config.tool(params) resolves tool name
Exec->>Exec: merge(inputs, tools.config.params(inputs))
Exec->>Tool: executeTool(finalInputs)
alt Launch Run
Tool->>DG: POST /graphql mutation LaunchRun
DG-->>Tool: LaunchRunSuccess or Error
Tool-->>Exec: output runId
else Get Run
Tool->>DG: POST /graphql query GetRun
DG-->>Tool: Run or RunNotFoundError
Tool-->>Exec: output run details
else List Runs
Tool->>DG: POST /graphql query ListRuns
DG-->>Tool: Runs results
Tool-->>Exec: output runs array
else List Jobs
Tool->>DG: POST /graphql query ListJobNames
DG-->>Tool: RepositoryConnection nodes
Tool-->>Exec: output jobs array
else Terminate Run
Tool->>DG: POST /graphql mutation TerminateRun
DG-->>Tool: TerminateRunSuccess or Failure
Tool-->>Exec: output success status
end
Exec-->>UI: Block output
Reviews (1): Last reviewed commit: "feat(blocks): add dagster block" | Re-trigger Greptile |
| value: () => 'launch_run', | ||
| }, | ||
|
|
||
| // ── Launch Run ── |
There was a problem hiding this comment.
Non-TSDoc comments violate project style guide
The project's coding standards (CLAUDE.md) explicitly state: "No non-TSDoc comments". Several inline section-separator comments should be removed. This same pattern appears throughout both the block file and tool files:
apps/sim/blocks/blocks/dagster.ts:34—// ── Launch Run ──apps/sim/blocks/blocks/dagster.ts:88—// ── Get Run / Terminate Run ──apps/sim/blocks/blocks/dagster.ts:98—// ── List Runs ──apps/sim/blocks/blocks/dagster.ts:123—// ── Connection (common) ──apps/sim/blocks/blocks/dagster.ts:153—// Map list_runs job name filter to the correct paramapps/sim/blocks/blocks/dagster.ts:179,181,189,191,193— output section commentsapps/sim/tools/dagster/terminate_run.ts:82,94,106— discriminator inline comments
Please remove all non-TSDoc comments. If documentation is needed, use /** TSDoc */ block comments instead.
Context Used: Global coding standards that apply to all files (source)
fcd8ace to
473ea94
Compare
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0eca5e8. Configure here.
| } | ||
| } | ||
| ` | ||
| } |
There was a problem hiding this comment.
List runs silently swallows GraphQL errors as empty results
Medium Severity
The buildListRunsQuery GraphQL query only includes ... on Runs { results { ... } } but omits any error fragment (e.g., ... on PythonError { message }). The Dagster API's runsOrError returns a union of Runs | PythonError. When a PythonError occurs, result will be {}, so result.results ?? [] evaluates to [], and the function returns { success: true, output: { runs: [] } } — silently swallowing the error as an empty successful response. Compare with get_run.ts and terminate_run.ts, which correctly include error fragments.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 0eca5e8. Configure here.


Summary
Add a new Dagster integration with 5 operations that work with both
Dagster instances via the GraphQL API.
Type of Change
Testing
Tested this by doing the following.
uv run dg dev --port 4000http://127.0.0.1:4000.Checklist
Screenshots/Videos