mirror of
https://github.com/block/buzz.git
synced 2026-10-27 04:30:52 +00:00
fix(ci): restore E2E flakiness fixes for pgschema, docker-pull, and spec timing (#1396)
Signed-off-by: Will Pfleger <pfleger.will@gmail.com> Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@sprout-oss.stage.blox.sqprod.co>
This commit is contained in:
40
.github/workflows/ci.yml
vendored
40
.github/workflows/ci.yml
vendored
@@ -305,7 +305,18 @@ jobs:
|
|||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
||||||
- uses: cashapp/activate-hermit@e49f5cb4dd64ff0b0b659d1d8df499595451155a # v1
|
- uses: cashapp/activate-hermit@e49f5cb4dd64ff0b0b659d1d8df499595451155a # v1
|
||||||
- name: Start integration services
|
- name: Start integration services
|
||||||
run: docker compose up -d postgres redis minio minio-init
|
run: |
|
||||||
|
for attempt in 1 2 3; do
|
||||||
|
if docker compose up -d postgres redis minio minio-init; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
if [ "$attempt" -eq 3 ]; then
|
||||||
|
echo "docker compose up failed after 3 attempts" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "docker compose up failed (attempt $attempt), retrying in $((attempt * 5))s..." >&2
|
||||||
|
sleep $((attempt * 5))
|
||||||
|
done
|
||||||
- name: Get pnpm store directory
|
- name: Get pnpm store directory
|
||||||
id: pnpm-cache
|
id: pnpm-cache
|
||||||
run: echo "STORE_PATH=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
|
run: echo "STORE_PATH=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
|
||||||
@@ -380,6 +391,13 @@ jobs:
|
|||||||
PGUSER: buzz
|
PGUSER: buzz
|
||||||
PGPASSWORD: buzz_dev
|
PGPASSWORD: buzz_dev
|
||||||
PGDATABASE: buzz
|
PGDATABASE: buzz
|
||||||
|
# Use the already-running docker postgres for desired-state planning instead of
|
||||||
|
# downloading an embedded Postgres from Maven Central (transient-fetch flake source).
|
||||||
|
PGSCHEMA_PLAN_HOST: localhost
|
||||||
|
PGSCHEMA_PLAN_PORT: "5432"
|
||||||
|
PGSCHEMA_PLAN_DB: buzz
|
||||||
|
PGSCHEMA_PLAN_USER: buzz
|
||||||
|
PGSCHEMA_PLAN_PASSWORD: buzz_dev
|
||||||
run: |
|
run: |
|
||||||
./bin/pgschema apply --file schema/schema.sql --auto-approve
|
./bin/pgschema apply --file schema/schema.sql --auto-approve
|
||||||
docker exec -i -e PGPASSWORD=buzz_dev buzz-postgres \
|
docker exec -i -e PGPASSWORD=buzz_dev buzz-postgres \
|
||||||
@@ -471,7 +489,18 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
save-if: ${{ github.event_name != 'pull_request' }}
|
save-if: ${{ github.event_name != 'pull_request' }}
|
||||||
- name: Start integration services
|
- name: Start integration services
|
||||||
run: docker compose up -d postgres redis minio minio-init
|
run: |
|
||||||
|
for attempt in 1 2 3; do
|
||||||
|
if docker compose up -d postgres redis minio minio-init; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
if [ "$attempt" -eq 3 ]; then
|
||||||
|
echo "docker compose up failed after 3 attempts" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "docker compose up failed (attempt $attempt), retrying in $((attempt * 5))s..." >&2
|
||||||
|
sleep $((attempt * 5))
|
||||||
|
done
|
||||||
- name: Wait for integration services
|
- name: Wait for integration services
|
||||||
run: |
|
run: |
|
||||||
wait_healthy() {
|
wait_healthy() {
|
||||||
@@ -513,6 +542,13 @@ jobs:
|
|||||||
PGUSER: buzz
|
PGUSER: buzz
|
||||||
PGPASSWORD: buzz_dev
|
PGPASSWORD: buzz_dev
|
||||||
PGDATABASE: buzz
|
PGDATABASE: buzz
|
||||||
|
# Use the already-running docker postgres for desired-state planning instead of
|
||||||
|
# downloading an embedded Postgres from Maven Central (transient-fetch flake source).
|
||||||
|
PGSCHEMA_PLAN_HOST: localhost
|
||||||
|
PGSCHEMA_PLAN_PORT: "5432"
|
||||||
|
PGSCHEMA_PLAN_DB: buzz
|
||||||
|
PGSCHEMA_PLAN_USER: buzz
|
||||||
|
PGSCHEMA_PLAN_PASSWORD: buzz_dev
|
||||||
run: |
|
run: |
|
||||||
./bin/pgschema apply --file schema/schema.sql --auto-approve
|
./bin/pgschema apply --file schema/schema.sql --auto-approve
|
||||||
docker exec -i -e PGPASSWORD=buzz_dev buzz-postgres \
|
docker exec -i -e PGPASSWORD=buzz_dev buzz-postgres \
|
||||||
|
|||||||
@@ -331,11 +331,14 @@ test("persona model options follow the selected LLM provider", async ({
|
|||||||
|
|
||||||
// Switch to Default (no explicit provider) — model resets to "Default model".
|
// Switch to Default (no explicit provider) — model resets to "Default model".
|
||||||
await llmProvider.click();
|
await llmProvider.click();
|
||||||
const llmProviderMenu = page.getByRole("menu").filter({
|
// Wait for Radix menu animations to settle before locating the menu item.
|
||||||
has: page.getByRole("menuitemradio", { name: "OpenAI", exact: true }),
|
// The prior approach held a filtered locator across the open→animate boundary
|
||||||
});
|
// and clicked a node that Radix was still re-mounting, producing
|
||||||
await llmProviderMenu
|
// "element is not stable" / "element was detached from the DOM" failures.
|
||||||
.last()
|
// Matching the OpenAI/Anthropic steps above: wait for animations, then
|
||||||
|
// locate fresh at click-time so no stale reference crosses the re-render.
|
||||||
|
await waitForAnimations(page);
|
||||||
|
await page
|
||||||
.getByRole("menuitemradio", { name: "Default", exact: true })
|
.getByRole("menuitemradio", { name: "Default", exact: true })
|
||||||
.click();
|
.click();
|
||||||
await expect(model).toBeVisible();
|
await expect(model).toBeVisible();
|
||||||
|
|||||||
Reference in New Issue
Block a user