feat(cli): update quickstarts with package manager support, e2e tests for quickstarts#2801
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive package manager support to Hatchet quickstarts and refactors the CLI trigger system. It enables Python projects to use Poetry, uv, or pip, and TypeScript projects to use npm, pnpm, Yarn, or Bun. The PR also renames "scripts" to "triggers" and moves hatchet worker run --script functionality to hatchet trigger.
Changes:
- Adds package manager selection for Python (poetry, uv, pip) and TypeScript (npm, pnpm, yarn, bun)
- Refactors quickstart generation to support shared and package-manager-specific templates
- Renames "scripts" to "triggers" with new
hatchet triggercommand - Extracts worker dev logic into reusable
RunWorkerDevfunction for testing - Adds TUI navigation to workflow runs via
--runflag
Reviewed changes
Copilot reviewed 36 out of 51 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| cmd/hatchet-cli/cli/worker.go | Removed run command, extracted dev logic into RunWorkerDev for testability |
| cmd/hatchet-cli/cli/trigger.go | New trigger command supporting config triggers and manual workflow triggering |
| cmd/hatchet-cli/cli/quickstart.go | Added package manager selection and multi-source template processing |
| cmd/hatchet-cli/cli/tui.go | Added --run flag for navigating to specific workflow runs |
| cmd/hatchet-cli/cli/internal/config/worker/config.go | Renamed Scripts to Triggers |
| cmd/hatchet-cli/cli/templates/... | Added package manager-specific templates for Python and TypeScript |
| frontend/docs/pages/cli/triggering-workflows.mdx | Updated documentation for new trigger command |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| if selectedWorkflow == nil { | ||
| cli.Logger.Fatalf("workflow '%s' not found", workflowName) | ||
| return // Make linter happy |
There was a problem hiding this comment.
This comment and return statement are unnecessary. The cli.Logger.Fatalf call on line 428 never returns, so the linter should not complain about missing return. Remove line 429.
Description
uv,pip,poetry,npm,pnpm,yarn, andbun. Also adds e2e tests to ensure that all of these quickstarts successfully can start a worker.scriptswithtriggersin the CLIhatchet triggercommandType of change