Skip to content

fix: correct envoy cluster type and wire compose build for extproc image - #20

Merged
wrossmorrow merged 2 commits into
mainfrom
fix/run-example-envoy-config-and-compose-build
Oct 28, 2026
Merged

wrossmorrow merged 2 commits into
mainfrom
fix/run-example-envoy-config-and-compose-build

Conversation

@wrossmorrow-pi-bot

Copy link
Copy Markdown
Contributor

Summary

Fixes the ./gradlew clean build && docker compose up --build example run failing with two errors.

1. Envoy bootstrap config failure (fatal)

envoy.yaml used an invalid cluster discovery type on the router cluster:

      type: LOGICAL_D_NS   # invalid

LOGICAL_D_NS is not a valid envoy.config.cluster.v3.Cluster.DiscoveryType value; the correct value is LOGICAL_DNS. Envoy aborted bootstrap config validation (static_resources.clusters[10].type) and exited, so no extproc could ever be reached.

Fix: type: LOGICAL_DNS on the router cluster.

2. ExtProc ClassNotFoundException for example processors (stale image)

The compose file wires each extproc example via
-Dextproc.class=com.github.wrossmorrow.extproc.processors.<X>RequestProcessor.

The freshly built jar (./gradlew clean build) does contain and successfully load these classes (verified by running the jar locally), and the source package com.github.wrossmorrow.extproc.processors is current. However, the stack trace frames (ExternalProcessorServer.getProcessorFromProperties at line 210, ExternalProcessorServer.main at line 222) don't match the current source (where those methods now live at lines 289/300), confirming the container was running an older jar.

Root cause: the docker-compose.yaml extproc services declare only an image: (defaulting to the published ghcr.io/wrossmorrow/envoy-extproc-sdk-java:${IMAGE_TAG:-local}) with no build: context. docker compose up --build therefore never rebuilds the extproc image — it just pulls the published one — which is stale and predates the example processors, hence the ClassNotFoundException.

Fix: added the missing build: context to all ten extproc services so docker compose up --build builds the image from the locally built jar (build/libs/extproc-*.jar, per the Dockerfile).

Testing

  • ./gradlew clean build -x test — BUILD SUCCESSFUL
  • docker compose config — valid YAML

Docker was unavailable in the authoring sandbox, so the full compose stack should be re-verified with a real docker compose up --build run.

Closes the run-example failure reported in the README quickstart.

- envoy.yaml: fix invalid cluster discovery type on the 'router' cluster,
  LOGICAL_D_NS -> LOGICAL_DNS, which caused envoy to fail bootstrap config
  validation and exit.
- docker-compose.yaml: add missing build context to the extproc services so
  'docker compose up --build' builds the local image from the freshly built
  jar instead of pulling a stale published image (ClassNotFoundException).
@wrossmorrow
wrossmorrow merged commit 6485802 into main Oct 28, 2026
4 checks passed
@wrossmorrow
wrossmorrow deleted the fix/run-example-envoy-config-and-compose-build branch October 28, 2026 17:00
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