refactor(archie,webui,gateway): remove the dashboard, which now ships from archie-frontend
This commit is contained in:
636 files changed
+77
-44027
No files matched your search
+15
-100
@@ -64,18 +64,6 @@ tasks:
|
||||
- task: db:generate
|
||||
- git diff --exit-code -- internal/infrastructure/postgres/postgresdb
|
||||
|
||||
pages:generate:
|
||||
desc: Write the dashboard's page catalogue to ui/pages/pages.json
|
||||
dir: ui
|
||||
cmds:
|
||||
- node --experimental-strip-types scripts/pages.ts
|
||||
|
||||
pages:check:
|
||||
desc: Regenerate the page catalogue and reject uncommitted differences
|
||||
cmds:
|
||||
- task: pages:generate
|
||||
- git diff --exit-code -- ui/pages/pages.json
|
||||
|
||||
openapi:generate:
|
||||
desc: Write the API's OpenAPI document to api/openapi.yaml
|
||||
cmds:
|
||||
@@ -103,45 +91,18 @@ tasks:
|
||||
cmds:
|
||||
- golangci-lint run ./...
|
||||
|
||||
ui:deps:
|
||||
desc: Install dashboard dependencies
|
||||
internal: true
|
||||
# Parallel UI checks must share one dependency install.
|
||||
run: once
|
||||
dir: ui
|
||||
cmds:
|
||||
- pnpm install --frozen-lockfile
|
||||
|
||||
ui:
|
||||
desc: Build the dashboard into ui/dist, which the Go build embeds
|
||||
# check builds the dashboard and then build depends on it again; a second
|
||||
# build empties ui/dist under the Go steps that embed it.
|
||||
run: once
|
||||
dir: ui
|
||||
deps: [ui:deps]
|
||||
cmds:
|
||||
- pnpm run build
|
||||
|
||||
test:ui:
|
||||
desc: Test and type-check the dashboard
|
||||
dir: ui
|
||||
deps: [ui:deps]
|
||||
cmds:
|
||||
- pnpm test
|
||||
- pnpm run typecheck
|
||||
|
||||
bench:prreview:
|
||||
desc: Run the PR review benchmark on the configured models and write docs/benchmarks/pr-review-*.md (-- -model ALIAS -judge-model REF; --help for flags)
|
||||
cmds:
|
||||
- go run ./cmd/archied prbench {{.CLI_ARGS}}
|
||||
|
||||
dev:
|
||||
desc: Run archie (with live reload) and Vite at http://localhost:5173
|
||||
deps: [dev:archie, dev:ui]
|
||||
desc: Run archie with live reload on 127.0.0.1:8484; run the dashboard from archie-frontend
|
||||
deps: [dev:archie]
|
||||
|
||||
dev:legacy:
|
||||
desc: Run the legacy multi-service stack and Vite at http://localhost:5173
|
||||
deps: [dev:daemon, dev:gateway, dev:messaging, dev:state-store, dev:dashboard, dev:ui]
|
||||
desc: Run the legacy multi-service stack
|
||||
deps: [dev:daemon, dev:gateway, dev:messaging, dev:state-store, dev:dashboard]
|
||||
|
||||
dev:tls:
|
||||
desc: Issue the development CA and service certificates deployments/dev.toml names
|
||||
@@ -267,7 +228,7 @@ tasks:
|
||||
echo 'listen = "127.0.0.1:8484"'
|
||||
echo 'state_dir = "{{.ROOT_DIR}}/{{.DIR}}/state"'
|
||||
echo "admin_token_sha256 = \"$(printf dev | sha256sum | cut -d' ' -f1)\""
|
||||
echo "age_identity = \"$(go run -tags no_ui ./cmd/archie -new-age-identity)\""
|
||||
echo "age_identity = \"$(go run ./cmd/archie -new-age-identity)\""
|
||||
echo '[database]'
|
||||
echo 'url = "postgres://archie_runtime:archie@127.0.0.1:5432/archie_dev?sslmode=disable"'
|
||||
echo 'owner_url = "postgres://archie_migrator:archie@127.0.0.1:5432/archie_dev?sslmode=disable"'
|
||||
@@ -279,42 +240,10 @@ tasks:
|
||||
if command -v air >/dev/null 2>&1; then
|
||||
exec air -build.args_bin="-config,{{.DIR}}/config.toml"
|
||||
fi
|
||||
exec go run -tags no_ui ./cmd/archie -config {{.DIR}}/config.toml
|
||||
|
||||
dev:ui:
|
||||
desc: Run Vite (proxies API requests to 127.0.0.1:8484 by default; override with ARCHIE_DEV_API)
|
||||
dir: ui
|
||||
deps: [ui:deps]
|
||||
cmds:
|
||||
- pnpm run dev
|
||||
|
||||
e2e:smoke:
|
||||
desc: Run the single-binary smoke check against a disposable archie instance (defaults to dev:archie on 127.0.0.1:8484)
|
||||
cmds:
|
||||
- |
|
||||
ARCHIE_SMOKE_URL="${ARCHIE_SMOKE_URL:-http://127.0.0.1:8484}" \
|
||||
ARCHIE_SMOKE_TOKEN="${ARCHIE_SMOKE_TOKEN:-dev}" \
|
||||
node e2e/archie-smoke.cjs
|
||||
|
||||
e2e:up:
|
||||
desc: Start the legacy local multi-service stack without Docker (PostgreSQL 18, services, Vite) and seed it
|
||||
cmds:
|
||||
- bash e2e/stack.sh start
|
||||
- bash e2e/seed.sh
|
||||
|
||||
e2e:down:
|
||||
desc: Stop the legacy local e2e stack
|
||||
cmds:
|
||||
- bash e2e/stack.sh stop
|
||||
|
||||
e2e:check:
|
||||
desc: List legacy browser checks; use -- all or -- CHECK to run, add --headed to watch
|
||||
cmds:
|
||||
- node e2e/run.cjs {{.CLI_ARGS}}
|
||||
exec go run ./cmd/archie -config {{.DIR}}/config.toml
|
||||
|
||||
build:
|
||||
desc: Build archie services and agent binaries
|
||||
deps: [ui]
|
||||
# Static, like the binaries a release ships, so `dist` reuses these
|
||||
# compiled packages and only links again.
|
||||
env:
|
||||
@@ -341,8 +270,6 @@ tasks:
|
||||
- "modules/**/*.yaml"
|
||||
- go.mod
|
||||
- go.sum
|
||||
- "ui/dist/**"
|
||||
- ui/pages/pages.json
|
||||
generates:
|
||||
- "{{.BIN_DIR}}/archied"
|
||||
- "{{.BIN_DIR}}/archie-gateway"
|
||||
@@ -360,7 +287,6 @@ tasks:
|
||||
|
||||
dist:
|
||||
desc: Build the linux/amd64 binaries a release ships into dist/ (VERSION=1.2.3; needs jq)
|
||||
deps: [ui]
|
||||
env:
|
||||
GOOS: linux
|
||||
GOARCH: amd64
|
||||
@@ -398,12 +324,6 @@ tasks:
|
||||
desc: Run the full quality gate
|
||||
# Finish mutations before starting parallel checks.
|
||||
cmds:
|
||||
# Node packages land under ui/, which `go test ./...` walks: installing
|
||||
# them while the parallel checks scan the tree makes a lockfile update
|
||||
# delete Go sources mid-walk. Install first, then fan out. Every Go step
|
||||
# embeds ui/dist, so the dashboard is built before any of them.
|
||||
- task: ui
|
||||
- task: pages:check
|
||||
- task: fmt
|
||||
- task: proto:check
|
||||
- task: db:check
|
||||
@@ -411,9 +331,8 @@ tasks:
|
||||
- task: check:readonly
|
||||
|
||||
wt:check:
|
||||
desc: "Fix, format and check a worktree's Go packages, and the dashboard if ui/ changed (-- ./pkg/... to name packages; default: those changed since main)"
|
||||
# A worktree has no ui/dist, so the Go steps build with no_ui. The full
|
||||
# gate still runs once, on the merged tree.
|
||||
desc: "Fix, format and check a worktree's Go packages (-- ./pkg/... to name packages; default: those changed since main)"
|
||||
# The full gate still runs once, on the merged tree.
|
||||
cmds:
|
||||
- |
|
||||
set -eu
|
||||
@@ -421,7 +340,7 @@ tasks:
|
||||
changed="$( { git diff --name-only "$base"; git ls-files --others --exclude-standard; } | sort -u)"
|
||||
pkgs="{{.CLI_ARGS}}"
|
||||
if [ -z "$pkgs" ]; then
|
||||
pkgs="$(printf '%s\n' "$changed" | grep '\.go$' | grep -v '^ui/' | xargs -r -n1 dirname | sort -u | while read -r d; do [ -d "$d" ] && echo "./$d"; done | tr '\n' ' ')"
|
||||
pkgs="$(printf '%s\n' "$changed" | grep '\.go$' | xargs -r -n1 dirname | sort -u | while read -r d; do [ -d "$d" ] && echo "./$d"; done | tr '\n' ' ')"
|
||||
fi
|
||||
if [ -n "$pkgs" ]; then
|
||||
echo "packages: $pkgs"
|
||||
@@ -429,8 +348,8 @@ tasks:
|
||||
# packages only; see fmt for why go fix runs until it converges.
|
||||
converged=false
|
||||
for pass in 1 2 3 4 5 6 7 8 9 10; do
|
||||
go fix -tags no_ui $pkgs
|
||||
if go fix -tags no_ui -diff $pkgs >/dev/null; then
|
||||
go fix $pkgs
|
||||
if go fix -diff $pkgs >/dev/null; then
|
||||
converged=true
|
||||
break
|
||||
fi
|
||||
@@ -440,14 +359,11 @@ tasks:
|
||||
exit 1
|
||||
fi
|
||||
golangci-lint fmt $pkgs
|
||||
go vet -tags no_ui $pkgs
|
||||
go test -short -tags no_ui $pkgs
|
||||
golangci-lint run --build-tags no_ui $pkgs
|
||||
go vet $pkgs
|
||||
go test -short $pkgs
|
||||
golangci-lint run $pkgs
|
||||
fi
|
||||
if printf '%s\n' "$changed" | grep -q '^ui/'; then
|
||||
"{{.TASK_EXE}}" test:ui
|
||||
fi
|
||||
if [ -z "$pkgs" ] && ! printf '%s\n' "$changed" | grep -q '^ui/'; then
|
||||
if [ -z "$pkgs" ]; then
|
||||
echo "nothing changed since main"
|
||||
fi
|
||||
|
||||
@@ -459,7 +375,6 @@ tasks:
|
||||
- task: lint
|
||||
- task: build
|
||||
- task: test
|
||||
- task: test:ui
|
||||
|
||||
release:
|
||||
desc: "Tag main as a release (RELEASE=major|minor|patch|1.2.3)"
|
||||
|
||||
Reference in new issue
Block a user