Fe overhaul docs (#1640)

* api changes

* doc changes

* move docs

* generated

* generate

* pkg

* backmerge main

* revert to main

* revert main

* race?

* remove go tests
This commit is contained in:
Gabe Ruttner
2025-04-30 17:10:09 -04:00
committed by GitHub
parent 799b5d0dcf
commit 8e80faf2d6
1503 changed files with 36645 additions and 1235 deletions
+29
View File
@@ -0,0 +1,29 @@
name: Sync Go Quickstart
on:
push:
branches:
- main
paths:
- 'examples/go/quickstart/**'
workflow_dispatch:
inputs:
manual_trigger:
description: 'Manually trigger the sync'
default: 'true'
required: false
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run sync script
env:
SYNC_TOKEN: ${{ secrets.SYNC_TOKEN }}
run: |
./hack/sync-quickstart.sh --source-dir "examples/go/quickstart" --target-repo "hatchet-dev/hatchet-go-quickstart"
@@ -0,0 +1,29 @@
name: Sync Python Quickstart
on:
push:
branches:
- main
paths:
- 'examples/python/quickstart/**'
workflow_dispatch:
inputs:
manual_trigger:
description: 'Manually trigger the sync'
default: 'true'
required: false
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run sync script
env:
SYNC_TOKEN: ${{ secrets.SYNC_TOKEN }}
run: |
./hack/sync-quickstart.sh --source-dir "examples/python/quickstart" --target-repo "hatchet-dev/hatchet-python-quickstart"
@@ -0,0 +1,29 @@
name: Sync TypeScript Quickstart
on:
push:
branches:
- main
paths:
- 'examples/typescript/quickstart/**'
workflow_dispatch:
inputs:
manual_trigger:
description: 'Manually trigger the sync'
default: 'true'
required: false
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run sync script
env:
SYNC_TOKEN: ${{ secrets.SYNC_TOKEN }}
run: |
./hack/sync-typescript-quickstart.sh --source-dir "examples/typescript/quickstart" --target-repo "grutt/hatchet-typescript-quickstart"
+126 -11
View File
@@ -68,7 +68,7 @@ jobs:
run: go generate ./...
- name: Test
run: go test ./... -v -failfast
run: go test $(go list ./... | grep -v "quickstart") -v -failfast
integration:
runs-on: ubuntu-latest
@@ -109,7 +109,7 @@ jobs:
task generate-local-encryption-keys
- name: Test
run: go test -tags integration ./... -v -failfast
run: go test -tags integration $(go list ./... | grep -v "quickstart") -v -failfast
- name: Teardown
run: docker compose down
@@ -293,11 +293,8 @@ jobs:
load:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
migrate-strategy: ["latest", "penultimate"]
rabbitmq-enabled: ["true", "false"]
pg-version: ["17-alpine", "16-alpine", "15-alpine"]
env:
DATABASE_URL: postgresql://hatchet:hatchet@127.0.0.1:5431/hatchet?sslmode=disable
steps:
- uses: actions/checkout@v4
@@ -315,13 +312,131 @@ jobs:
version: 9.15.4
run_install: false
- name: Install Atlas
run: |
curl -sSf https://atlasgo.sh | sh
- name: Compose
run: docker compose up -d
- name: Go deps
run: go mod download
- name: Prepare
run: |
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_PORT=8080
SERVER_URL=http://localhost:8080
SERVER_AUTH_COOKIE_SECRETS="something something"
SERVER_AUTH_COOKIE_DOMAIN=app.dev.hatchet-tools.com
SERVER_AUTH_COOKIE_INSECURE=false
SERVER_AUTH_SET_EMAIL_VERIFIED=true
SERVER_LOGGER_LEVEL=warn
SERVER_LOGGER_FORMAT=console
DATABASE_LOGGER_LEVEL=warn
DATABASE_LOGGER_FORMAT=console
EOF
- name: Generate
run: |
go run ./cmd/hatchet-migrate
task generate-go
task generate-certs
task generate-local-encryption-keys
- name: Setup
run: |
set -a
. .env
set +a
go run ./cmd/hatchet-admin quickstart --generated-config-dir ./generated/
- name: Test
run: |
export HATCHET_CLIENT_TOKEN="$(go run ./cmd/hatchet-admin token create --config ./generated/ --tenant-id 707d0855-80ab-4e1f-a156-f1c4546cbf52)"
go test -tags load ./... -p 1 -v -race -failfast
env:
TESTING_MATRIX_MIGRATE: ${{ matrix.migrate-strategy }}
TESTING_MATRIX_RABBITMQ_ENABLED: ${{ matrix.rabbitmq-enabled }}
TESTING_MATRIX_PG_VERSION: ${{ matrix.pg-version }}
- name: Teardown
run: docker compose down
load-pgmq:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
DATABASE_URL: postgresql://hatchet:hatchet@127.0.0.1:5431/hatchet?sslmode=disable
steps:
- uses: actions/checkout@v4
- name: Install Task
uses: arduino/setup-task@v2
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.4
run_install: false
- name: Install Atlas
run: |
curl -sSf https://atlasgo.sh | sh
- name: Compose
run: docker compose up -d
- name: Go deps
run: go mod download
- name: Prepare
run: |
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_PORT=8080
SERVER_URL=http://localhost:8080
SERVER_AUTH_COOKIE_SECRETS="something something"
SERVER_AUTH_COOKIE_DOMAIN=app.dev.hatchet-tools.com
SERVER_AUTH_COOKIE_INSECURE=false
SERVER_AUTH_SET_EMAIL_VERIFIED=true
SERVER_LOGGER_LEVEL=warn
SERVER_LOGGER_FORMAT=console
DATABASE_LOGGER_LEVEL=warn
DATABASE_LOGGER_FORMAT=console
SERVER_TASKQUEUE_KIND=postgres
EOF
- name: Generate
run: |
go run ./cmd/hatchet-migrate
task generate-go
task generate-certs
task generate-local-encryption-keys
- name: Setup
run: |
set -a
. .env
set +a
go run ./cmd/hatchet-admin quickstart --generated-config-dir ./generated/
- name: Test
run: |
export HATCHET_CLIENT_TOKEN="$(go run ./cmd/hatchet-admin token create --config ./generated/ --tenant-id 707d0855-80ab-4e1f-a156-f1c4546cbf52)"
RAMP_UP_DURATION_TIMEOUT=20s go test -tags load ./... -p 1 -v -race -failfast
- name: Teardown
run: docker compose down