mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2025-12-16 22:35:11 -06:00
* wip: stub schedule page * wip: stub list * fix: 2025 bug... * feat: wip cron list * feat: addl meta * feat: expose metadata column * feat: sort and created at * cron to recurring * scheduled: with statuses * fix: links * feat: expose schedule ids * feat: delete run * fix: remove search * feat: filterable scheduled * fix: remove broken features * chore: lint * rm metadata for now * chore: lint * chore: recurring to cron job * fix: review comments * fix: populator * wip cron changes * fix: ids are helpful * fix: populator * wip * wip: create crons, stub scheduled * wip: create schedule * wip add trigger buttons to all the pages * wip: reusable trigger form * fix: hash * fixes: cron bugs * fixes: cron sort * fix: out of order migrations * fix: add internalRetryCount * feat: api things survive version transitions * feat: table things * feat: delete disabled for non api * feat: prevent delete non api * feat: filters * require cron name for api * default name * fix: migrations * frontend improvements and migrations * fix: pagination --------- Co-authored-by: Alexander Belanger <alexander@hatchet.run>
177 lines
5.1 KiB
YAML
177 lines
5.1 KiB
YAML
version: "3"
|
|
|
|
tasks:
|
|
setup:
|
|
cmds:
|
|
- task: install-dependencies
|
|
- task: generate-certs
|
|
- task: set-env-db
|
|
- task: migrate
|
|
- task: generate-all
|
|
- task: generate-local-encryption-keys
|
|
- task: set-env-all
|
|
- task: seed-dev
|
|
- task: copy-ca-to-sdks
|
|
set-env-db:
|
|
cmds:
|
|
- |
|
|
cat > .env <<EOF
|
|
DATABASE_URL='postgresql://hatchet:hatchet@127.0.0.1:5431/hatchet'
|
|
EOF
|
|
set-env-all:
|
|
cmds:
|
|
- |
|
|
randstring() { openssl rand -base64 69 | tr -d "\n" | tr -d "=+/" | cut -c1-$1; }
|
|
|
|
cat > .env <<EOF
|
|
DATABASE_URL='postgresql://hatchet:hatchet@127.0.0.1:5431/hatchet'
|
|
SERVER_TLS_CERT_FILE=./hack/dev/certs/cluster.pem
|
|
SERVER_TLS_KEY_FILE=./hack/dev/certs/cluster.key
|
|
SERVER_TLS_ROOT_CA_FILE=./hack/dev/certs/ca.cert
|
|
|
|
SERVER_ENCRYPTION_MASTER_KEYSET_FILE=./hack/dev/encryption-keys/master.key
|
|
SERVER_ENCRYPTION_JWT_PRIVATE_KEYSET_FILE=./hack/dev/encryption-keys/private_ec256.key
|
|
SERVER_ENCRYPTION_JWT_PUBLIC_KEYSET_FILE=./hack/dev/encryption-keys/public_ec256.key
|
|
|
|
SERVER_PORT=8080
|
|
SERVER_URL=http://localhost:8080
|
|
|
|
SERVER_AUTH_COOKIE_SECRETS="$(randstring 16) $(randstring 16)"
|
|
SERVER_AUTH_COOKIE_DOMAIN=app.dev.hatchet-tools.com
|
|
SERVER_AUTH_COOKIE_INSECURE=false
|
|
SERVER_AUTH_SET_EMAIL_VERIFIED=true
|
|
|
|
SERVER_LOGGER_LEVEL=debug
|
|
SERVER_LOGGER_FORMAT=console
|
|
DATABASE_LOGGER_LEVEL=debug
|
|
DATABASE_LOGGER_FORMAT=console
|
|
EOF
|
|
start-db:
|
|
cmds:
|
|
- docker compose up -d
|
|
stop-db:
|
|
cmds:
|
|
- docker compose down
|
|
recreate-db-from-scratch:
|
|
cmds:
|
|
- docker compose down
|
|
- docker volume rm oss_hatchet_postgres_data
|
|
- docker volume rm oss_hatchet_rabbitmq_data
|
|
- docker compose up -d
|
|
- task: setup
|
|
- task: init-dev-env
|
|
set-etc-hosts:
|
|
cmds:
|
|
- sudo sh ./hack/dev/manage-hosts.sh add 127.0.0.1 app.dev.hatchet-tools.com
|
|
migrate:
|
|
cmds:
|
|
- task: generate-sqlc
|
|
- sh ./hack/dev/atlas-migrate.sh {{.CLI_ARGS}}
|
|
- DATABASE_URL='postgresql://hatchet:hatchet@127.0.0.1:5431/hatchet' sh ./hack/db/atlas-apply.sh
|
|
seed-dev:
|
|
cmds:
|
|
- SEED_DEVELOPMENT=true sh ./hack/dev/run-go-with-env.sh run ./cmd/hatchet-admin seed
|
|
start-dev:
|
|
deps:
|
|
- task: start-db
|
|
- task: start-api
|
|
- task: start-engine
|
|
- task: start-frontend
|
|
start-api:
|
|
cmds:
|
|
- sh ./hack/dev/start-api.sh
|
|
start-engine:
|
|
cmds:
|
|
- sh ./hack/dev/start-engine.sh
|
|
start-frontend:
|
|
cmds:
|
|
- sh ./hack/dev/start-frontend.sh
|
|
start-ngrok:
|
|
cmds:
|
|
- ngrok http 8080
|
|
start-lite:
|
|
cmds:
|
|
- sh ./hack/dev/start-lite.sh
|
|
generate-all:
|
|
cmds:
|
|
- task: install-dependencies
|
|
- task: generate-api
|
|
- task: generate-go
|
|
- task: generate-proto
|
|
- task: generate-sqlc
|
|
- task: pre-commit-run
|
|
install-dependencies:
|
|
cmds:
|
|
- go mod download
|
|
- cd frontend/app/ && pnpm install
|
|
- cd frontend/docs/ && pnpm install
|
|
generate-api:
|
|
cmds:
|
|
- task: generate-api-server
|
|
- task: generate-api-client
|
|
generate-certs:
|
|
cmds:
|
|
- sh ./hack/dev/generate-x509-certs.sh ./hack/dev/certs
|
|
generate-local-encryption-keys:
|
|
cmds:
|
|
- sh ./hack/dev/generate-local-encryption-keys.sh ./hack/dev/encryption-keys
|
|
init-dev-env:
|
|
- sh ./hack/dev/init-dev-token-and-env.sh
|
|
generate-dev-api-token:
|
|
cmds:
|
|
- sh ./hack/dev/generate-dev-api-token.sh
|
|
generate-api-server:
|
|
cmds:
|
|
- sh ./hack/oas/generate-server.sh
|
|
silent: true
|
|
generate-api-client:
|
|
cmds:
|
|
- sh ./hack/oas/generate-clients.sh
|
|
silent: true
|
|
generate-go:
|
|
cmds:
|
|
- go generate ./...
|
|
generate-proto:
|
|
cmds:
|
|
- sh ./hack/proto/proto.sh
|
|
generate-proto-python:
|
|
dir: ./python-sdk
|
|
cmds:
|
|
- sh ./generate.sh
|
|
generate-sqlc:
|
|
cmds:
|
|
- go run github.com/sqlc-dev/sqlc/cmd/sqlc@v1.24.0 generate --file pkg/repository/prisma/dbsqlc/sqlc.yaml
|
|
lint:
|
|
cmds:
|
|
- task: lint-go
|
|
- task: lint-frontend
|
|
lint-go:
|
|
cmds:
|
|
- golangci-lint run ./... --config .golangci.yml
|
|
lint-frontend:
|
|
cmds:
|
|
- cd frontend/app/ && pnpm run lint:check
|
|
kill-query-engines:
|
|
cmds:
|
|
- ps -A | grep 'prisma-query-engine-darwin-arm64' | grep -v grep | awk '{print $1}' | xargs kill -9 $1
|
|
kill-apis:
|
|
cmds:
|
|
- ps -A | grep 'cmd/hatchet-api' | grep -v grep | awk '{print $1}' | xargs kill -9 $1
|
|
- ps -A | grep 'exe/hatchet-api' | grep -v grep | awk '{print $1}' | xargs kill -9 $1
|
|
kill-engines:
|
|
cmds:
|
|
- ps -A | grep 'cmd/hatchet-engine' | grep -v grep | awk '{print $1}' | xargs kill -9 $1
|
|
- ps -A | grep 'exe/hatchet-engine' | grep -v grep | awk '{print $1}' | xargs kill -9 $1
|
|
copy-ca-to-sdks:
|
|
cmds:
|
|
- mkdir -p ./python-sdk/certs/ && cp ./hack/dev/certs/ca.cert ./python-sdk/certs/
|
|
pre-commit-install:
|
|
cmds:
|
|
- pip install pre-commit
|
|
- pre-commit install
|
|
pre-commit-run:
|
|
deps:
|
|
- pre-commit-install
|
|
cmds:
|
|
- pre-commit run --all-files || pre-commit run --all-files
|