Skip to content

fix(e2e): restore Elasticsearch and search-ingest to the test stack - #488

Merged
camreeves merged 1 commit into
developfrom
e2e/fix-stack-elasticsearch
Aug 24, 2026
Merged

fix(e2e): restore Elasticsearch and search-ingest to the test stack#488
camreeves merged 1 commit into
developfrom
e2e/fix-stack-elasticsearch

Conversation

@camreeves

Copy link
Copy Markdown
Contributor

The workplace e2e job has failed on every run since 13 August. Alex flagged it. This gets it green again.

What was happening

The job dies in "Bring up the local PlaceOS stack", on the first API call the seed makes:

GET /api/engine/v2/oauth_apps?limit=500 -> 500
Error connecting to '127.0.0.1:9200': Connection refused (Socket::ConnectError)

16dc58f removed Elasticsearch and search-ingest from the stack because PPT-2644 moved rest-api's search onto Postgres. That is true of rest-api master, but the stack pins ${PLACEOS_TAG:-latest} and latest is the release channel, not develop. Right now it resolves to placeos-2.2608.1 (revision 54ab6262, built 11 August), which was cut before PPT-2644 landed and still expects Elasticsearch. With no elastic service in the stack it falls back to its default host of 127.0.0.1:9200, so every index route 500s.

The commit that removed them said as much in its own message ("do not merge before rest-api images with PG-backed search are published"). It got merged before that happened.

What is in here

A straight revert of the stack half of 16dc58f. All six files are byte-identical to the last known-green state, so there is no new code to review.

The one addition is a note on the elastic service that records the constraint this ran into, and how to check it before removing these again:

docker pull placeos/rest-api:latest
docker image inspect placeos/rest-api:latest \
  --format '{{index .Config.Labels "org.opencontainers.image.version"}}'
# then in the rest-api clone
git merge-base --is-ancestor 51faa1a <that release's revision>

Today that is false for latest and true for nightly. Once a release carrying PPT-2644 is cut (2.2608.2 is not published yet), re-apply 16dc58f rather than redoing the work. It reverts cleanly.

Verification

Run on this branch: 32687443655, 14 passed, 0 flaky, 2m46s on the self-hosted runner. That matches the pre-break baseline.

Also checked locally first, on an isolated copy of the stack (project placeos-e2e-verify, ports 9081/9444) against placeos/*:latest, so the running singleton was untouched: up.sh --fresh seeds and returns clean, suite 13 passed / 1 flaky / 0 failed.

Two things worth a separate look

  1. Nobody noticed for 11 days. The job is advisory and there is no alert on it, so a red nightly is silent. Worth deciding whether the nightly should notify somewhere.
  2. ensureOAuthApp in seed.ts can report success when it created nothing. rest-api enforces uniqueness on the app name as well as the uid, and alreadyExists() matches any "should be unique" failure, including one on name. Seeding a second dev-server port against the same stack prints "oauth app present" while no app with that uid exists. It does not affect CI (one port), but it is the same "passes for the wrong reason" shape Alex called out on test(e2e): PKCE-on-the-wire, per-user scoping, and desk clash coverage #477. Happy to fix separately.

The e2e CI job has failed on every run since 2026-08-13. It dies in "Bring
up the local PlaceOS stack", where the seed's first API call comes back 500:

    GET /api/engine/v2/oauth_apps?limit=500 -> 500
    Error connecting to '127.0.0.1:9200': Connection refused

16dc58f removed Elasticsearch and search-ingest on the basis that PPT-2644
serves search from Postgres. That is true of rest-api's master branch, but
the stack pins ${PLACEOS_TAG:-latest}, and `latest` is the RELEASE channel:
it currently resolves to placeos-2.2608.1 (revision 54ab6262, built
2026-08-11), which was cut before PPT-2644 landed and still expects
Elasticsearch. With no `elastic` service it falls back to its default host,
127.0.0.1:9200, and every index route 500s.

The commit that removed them said so itself — "do not merge before rest-api
images with PG-backed search are published" — and was merged before that
happened. It went unnoticed for 11 days because the job is advisory and
nothing alerts on it.

This is a straight revert of the stack half of 16dc58f, plus a note on the
`elastic` service recording the constraint that was violated and how to
check it before removing them again. All six files are byte-identical to
the last known-green state.

Re-apply 16dc58f once `latest` carries PPT-2644; it reverts cleanly. As of
today that is true of `nightly` and not of `latest`.

Verified on an isolated copy of the stack (project placeos-e2e-verify,
ports 9081/9444) against placeos/*:latest: `up.sh --fresh` seeds and
returns clean, and the suite runs 13 passed / 1 flaky / 0 failed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
frontend-templates Ignored Ignored Preview Aug 24, 2026 3:51am

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@camreeves
camreeves merged commit 13cf211 into develop Aug 24, 2026
2 of 6 checks passed
@camreeves
camreeves deleted the e2e/fix-stack-elasticsearch branch August 24, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant