fix: Dynamic port resolution and Script node improvements#186
fix: Dynamic port resolution and Script node improvements#186betterclever merged 4 commits intomainfrom
Conversation
- Backend: Add port resolution in parse() method when workflows are saved - Backend: Get componentId from node.type field (where it's stored in graph) - Backend: Import worker components to populate componentRegistry - Backend: Add dynamicInputs/dynamicOutputs fields to WorkflowNodeDataSchema - Frontend: Update deserializeNodes() to copy dynamic ports to node data This ensures all dynamic input/output ports are resolved and persisted when a workflow is saved, and rendered immediately when loaded in the frontend. Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
- Refactored logic-script component from inline to docker runner - Uses runComponentWithRunner for proper PTY/terminal integration - Enables Docker log streaming in the frontend terminal viewer - Updated demo-threat-hunter.ts with: - Runtime input for threat feed URL - Human-readable workflow name - Cleaner secret management with reusable names Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Only initialize with default code when code is truly empty. Don't overwrite user's existing code just because it lacks the auto-generated type interfaces. Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const baseRunner: DockerRunnerConfig = { | ||
| kind: 'docker', | ||
| image: 'oven/bun:alpine', | ||
| entrypoint: 'sh', | ||
| command: ['-c', ''], // Will be set dynamically in execute() |
There was a problem hiding this comment.
Reinstate CPU/memory limits for Script Docker runs
The Script component now routes execution through the generic Docker runner but no longer applies the previous --memory 256m and --cpus 0.5 constraints from the direct docker run invocation. The new DockerRunnerConfig lacks any resource caps, and the SDK runner does not support them, so user scripts can now consume unbounded CPU/RAM (e.g., tight loops or large allocations) and destabilize the worker host. This is a regression in isolation and should be addressed either by adding resource-limit support to the runner or by reintroducing limits for this component.
Useful? React with 👍 / 👎.
Summary
This PR fixes several issues related to dynamic port resolution and the Script node editor:
Dynamic Port Resolution (Backend)
Frontend Improvements
Script Node Docker Runner
Testing
Commits