Compare commits
4 Commits
4bfbac8b7d
...
fix/db-pgl
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7210b7391a | ||
|
|
80570f7040 | ||
| e6b53ea103 | |||
| 4da87640e8 |
7
.gitignore
vendored
7
.gitignore
vendored
@@ -15,3 +15,10 @@ infra/step-ca/dev-password
|
|||||||
|
|
||||||
# Scratch dirs created by the framework git-wrapper shell test harnesses
|
# Scratch dirs created by the framework git-wrapper shell test harnesses
|
||||||
.mosaic-test-work/
|
.mosaic-test-work/
|
||||||
|
|
||||||
|
# Transient config files vite/vitest/esbuild write next to a *.config.ts while
|
||||||
|
# loading it, then unlink. They are untracked but were not ignored, so turbo's
|
||||||
|
# package traversal hashed them and intermittently failed CI with "Package
|
||||||
|
# traversal error: ... .timestamp-*.mjs: No such file or directory" when the
|
||||||
|
# file vanished mid-scan. Ignoring them removes the race.
|
||||||
|
*.timestamp-*.mjs
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ export default tseslint.config(
|
|||||||
'apps/web/e2e/helpers/*.ts',
|
'apps/web/e2e/helpers/*.ts',
|
||||||
'apps/web/playwright.config.ts',
|
'apps/web/playwright.config.ts',
|
||||||
'apps/gateway/vitest.config.ts',
|
'apps/gateway/vitest.config.ts',
|
||||||
|
'packages/db/vitest.config.ts',
|
||||||
'packages/storage/vitest.config.ts',
|
'packages/storage/vitest.config.ts',
|
||||||
'packages/mosaic/__tests__/*.ts',
|
'packages/mosaic/__tests__/*.ts',
|
||||||
'tools/federation-harness/*.ts',
|
'tools/federation-harness/*.ts',
|
||||||
|
|||||||
@@ -4,5 +4,22 @@ export default defineConfig({
|
|||||||
test: {
|
test: {
|
||||||
globals: true,
|
globals: true,
|
||||||
environment: 'node',
|
environment: 'node',
|
||||||
|
// The migration suite spins up a real PGlite (WASM Postgres) instance per
|
||||||
|
// test and applies the full drizzle migration set. Each case legitimately
|
||||||
|
// takes ~5s locally and considerably longer on CI, where turbo runs many
|
||||||
|
// packages' test suites concurrently. The 5s vitest default then expires
|
||||||
|
// mid-migration and the run fails as a phantom "Test timed out in 5000ms"
|
||||||
|
// (often surfacing the underlying WASM `memory access out of bounds` when
|
||||||
|
// the heap is starved). Give migrations real headroom.
|
||||||
|
testTimeout: 120_000,
|
||||||
|
hookTimeout: 120_000,
|
||||||
|
// Each PGlite instance carries a multi-hundred-MB WASM heap. Running test
|
||||||
|
// files in parallel forks multiplies that peak and is what tips the CI
|
||||||
|
// runner into the WASM OOM. A single fork keeps only one instance resident
|
||||||
|
// at a time — slightly slower, but deterministic.
|
||||||
|
pool: 'forks',
|
||||||
|
poolOptions: {
|
||||||
|
forks: { singleFork: true },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -128,8 +128,8 @@ PY
|
|||||||
merge_gitea_with_api() {
|
merge_gitea_with_api() {
|
||||||
local host="$1" api_url token basic_auth body_file raw_code payload
|
local host="$1" api_url token basic_auth body_file raw_code payload
|
||||||
api_url="https://${host}/api/v1/repos/${OWNER}/${REPO}/pulls/${PR_NUMBER}/merge"
|
api_url="https://${host}/api/v1/repos/${OWNER}/${REPO}/pulls/${PR_NUMBER}/merge"
|
||||||
mkdir -p "${AGENT_WORK_ROOT:-/home/hermes/agent-work}"
|
mkdir -p "${AGENT_WORK_ROOT:-${HOME:-/tmp}/mosaic/agent-work}"
|
||||||
body_file=$(mktemp "${AGENT_WORK_ROOT:-/home/hermes/agent-work}/pr-merge-api-response.XXXXXX")
|
body_file=$(mktemp "${AGENT_WORK_ROOT:-${HOME:-/tmp}/mosaic/agent-work}/pr-merge-api-response.XXXXXX")
|
||||||
payload='{"Do":"squash"}'
|
payload='{"Do":"squash"}'
|
||||||
|
|
||||||
token=$(get_gitea_token "$host" || true)
|
token=$(get_gitea_token "$host" || true)
|
||||||
@@ -214,8 +214,8 @@ case "$PLATFORM" in
|
|||||||
TEA_LOGIN="$(get_gitea_login_for_host "$HOST" || true)"
|
TEA_LOGIN="$(get_gitea_login_for_host "$HOST" || true)"
|
||||||
|
|
||||||
if [[ -n "$TEA_LOGIN" ]]; then
|
if [[ -n "$TEA_LOGIN" ]]; then
|
||||||
mkdir -p "${AGENT_WORK_ROOT:-/home/hermes/agent-work}"
|
mkdir -p "${AGENT_WORK_ROOT:-${HOME:-/tmp}/mosaic/agent-work}"
|
||||||
TEA_ERROR_FILE=$(mktemp "${AGENT_WORK_ROOT:-/home/hermes/agent-work}/pr-merge-tea-error.XXXXXX")
|
TEA_ERROR_FILE=$(mktemp "${AGENT_WORK_ROOT:-${HOME:-/tmp}/mosaic/agent-work}/pr-merge-tea-error.XXXXXX")
|
||||||
if tea pr merge "$PR_NUMBER" --style squash --repo "$OWNER/$REPO" --login "$TEA_LOGIN" 2> "$TEA_ERROR_FILE"; then
|
if tea pr merge "$PR_NUMBER" --style squash --repo "$OWNER/$REPO" --login "$TEA_LOGIN" 2> "$TEA_ERROR_FILE"; then
|
||||||
rm -f "$TEA_ERROR_FILE"
|
rm -f "$TEA_ERROR_FILE"
|
||||||
elif is_known_tea_empty_identity_failure "$TEA_ERROR_FILE"; then
|
elif is_known_tea_empty_identity_failure "$TEA_ERROR_FILE"; then
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
WORK_ROOT="${AGENT_WORK_ROOT:-/home/hermes/agent-work}"
|
WORK_ROOT="${AGENT_WORK_ROOT:-${HOME:-/tmp}/mosaic/agent-work}"
|
||||||
SANDBOX="$WORK_ROOT/pr-merge-empty-uid-test-$$"
|
SANDBOX="$WORK_ROOT/pr-merge-empty-uid-test-$$"
|
||||||
MOCK_BIN="$SANDBOX/bin"
|
MOCK_BIN="$SANDBOX/bin"
|
||||||
REPO_DIR="$SANDBOX/repo"
|
REPO_DIR="$SANDBOX/repo"
|
||||||
|
|||||||
Reference in New Issue
Block a user