feat(genkit-tools/cli): support ephemeral runtime commands#5079
feat(genkit-tools/cli): support ephemeral runtime commands#5079
Conversation
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for ephemeral runtimes across several CLI commands, including eval:extractData, eval:flow, eval:run, flow:batchRun, and flow:run, by allowing users to provide a runtime command after a '--' separator. It also refactors logging to use debug levels for internal processes and enhances the output with colored results and Trace IDs. Review feedback identifies logic issues in parsing the '--' separator when optional data arguments are used and suggests adding a check to prevent logging broken Trace URLs when the ID is missing.
There was a problem hiding this comment.
Code Review
This pull request introduces support for ephemeral runtimes across several CLI commands, including eval:extractData, eval:flow, eval:run, flow:batchRun, and flow:run. By using the -- delimiter, users can now specify a runtime command that the CLI will manage for the duration of the operation. The implementation includes a new runWithEphemeralManager utility and updates to argument parsing to correctly handle data inputs alongside runtime commands. Additionally, logging has been refined by moving progress messages to the debug level and enhancing output with colored labels and Trace IDs. I have no feedback to provide as no issues were identified.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for running Genkit CLI commands (eval:extractData, eval:flow, eval:run, flow:batchRun, flow:run) with an ephemeral runtime. This allows users to specify a custom command (e.g., 'npm run dev') that Genkit will start and manage for the duration of the CLI command execution, rather than relying on a pre-existing running Genkit development server. This is achieved by parsing runtime commands separated by '--' in the CLI arguments and using a new 'runWithEphemeralManager' utility. Additionally, logging verbosity has been adjusted (many logger.info calls changed to logger.debug) and output formatting improved with colored text for results and trace IDs. A '.agents/*' entry was also added to .gitignore. There are no review comments to address.
Supports specifying runtime startup with runtime commands.
Eg:
genkit flow:run simpleEcho '"hello world"' -- pnpm run devChecklist (if applicable):