fix: give the engine this stack's admin UI links - #172
Merged
Merged
Conversation
The engine reads DFE_ADMIN_LINKS since hyperi-io/dfe-engine#598 and Compose was handing it nothing. resolve_profile.py now builds the list in one place, from the footprint that starts Kafbat and HyperDX plus the Makefile's KAFBAT_GATED and HYPERDX_GATED, which make passes in as --unpublished. So a UI is listed only when it runs AND its port is published. Each url is DFE_EXTERNAL_ORIGIN (or the per-surface override compose already builds that UI's URLs from) plus the host port. Each probe_url is the in-network address. ClickHouse Play, dfe-ui and the engine API stay out: Play is an operator port on DFE_BIND_HOST, and the other two are the product. Tests cover the transport, footprint, gate, auth and origin matrix, and run the real Makefile in a scratch copy through docker compose config, so the JSON is shown to reach the engine service byte for byte. Nothing is started. Part of hyperi-io/dfe-engine#594.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The engine reads
DFE_ADMIN_LINKSsince hyperi-io/dfe-engine#598, and Compose was handing it nothing. This is the Compose half of hyperi-io/dfe-engine#594.scripts/resolve_profile.pybuilds the list in ONE place and writes it to.profile.mkasDFE_ADMIN_LINKS_RESOLVED.KAFBAT_GATED/HYPERDX_GATED, passed in as--unpublished kafbat|hyperdx. Nothing re-derives the dials in Python.urlisDFE_EXTERNAL_ORIGIN(defaulthttp://localhost) plus the host port, with the same per-surface overrides compose uses:DFE_HYPERDX_APP_URLfor HyperDX, andDFE_OAUTH2_PROXY_EXTERNAL_ORIGINfor both once the auth profile puts the proxies in front.probe_urlis the in-network address:http://kafka-ui:8080andhttp://dfe-hyperdx-proxy:8090.DFE_BIND_HOST, loopback by design and outside the UI dials. The other two are the product, not admin consoles.docker-compose.ymlhands the engineDFE_ADMIN_LINKS: ${DFE_ADMIN_LINKS_RESOLVED:-}, so a rawdocker composeoutside make gets no links.What it renders, read off the test runs:
[{"name":"HyperDX","purpose":"Logs, metrics and traces search","url":"http://localhost:8090","probe_url":"http://dfe-hyperdx-proxy:8090"}]DFE_BIND_SCOPE=all,DFE_EXTERNAL_ORIGIN=http://dfe.example.test: Kafbat onhttp://dfe.example.test:8081and HyperDX onhttp://dfe.example.test:8090DFE_INFRA_UIS_EXTERNAL=false:[]Tests:
scripts/tests/test_admin_links.py, 147 of them.resolve_profile.main().docker compose configfor dfe-engine, so the JSON is shown to survive make, the environment and compose interpolation byte for byte. Nothing is started.make check-python check-tests check-compose check-docs check-hardfailall pass locally (609 tests).Done when the engine on a Compose stack lists exactly the infra UIs that stack publishes.