Skip to content

control-plane: thread cold ship_endpoint + external_labels into EdgeStageConfig - #313

Merged
zzylol merged 1 commit into
mainfrom
feat/edgeconfig-cold-fields
May 23, 2026
Merged

zzylol merged 1 commit into
mainfrom
feat/edgeconfig-cold-fields

Conversation

@zzylol

@zzylol zzylol commented May 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #311. The merged emit_edge_yaml_asap_edge derived the fused asap_edge cold tier target from a placeholder: ship_endpoint came from the OTLP backend host (http://<backend>:9098/ingest/gorilla) and external_labels.cluster was read inline from ASAP_CLUSTER — because EdgeStageConfig carried neither field. Both were wrong: the cold tier ships to the gorilla-merger over HTTP ingest port 10908 (gRPC 10907), not backend:9098.

  • Add cold_ship_endpoint: Option<String> and cold_external_labels: Vec<(String, String)> to EdgeStageConfig (physical/colored_dag/emitter.rs).
  • Add two named defaults in one place — default_cold_ship_endpoint() (http://gorilla-merger:10908/ingest/gorilla) and default_cold_external_labels() (cluster=<ASAP_CLUSTER|asap-mvp>) — and route both the emit fallback and the L5 build site through them (no more inline guess).
  • emit_edge_yaml_asap_edge now reads the threaded fields (falling back to the named defaults when unset). ASAP_EDGE_FUSED gating untouched.
  • Populated the new fields at every EdgeStageConfig struct-literal site (~18 across 6 files) so the crate compiles. The colored_dag L5 build site uses the named defaults because that layer is deployment-independent (no DeploymentConstraints plumbed in — reported, not fabricated); a deploy-aware layer can overwrite edge.cold_* post-emit the same way exporter_target is.

Threading-from-plan note

The colored_dag L5 emitter is explicitly deployment-independent — it has no access to a real per-deploy cold endpoint or cluster name. So the L5 site populates the named defaults (gorilla-merger:10908, cluster=asap-mvp), not a plan-resolved value. The new fields make it trivial for a future deploy-aware caller to thread real values; this PR fixes the wrong host/port and removes the inline placeholder.

Test plan

  • cargo build -p control_plane clean — no new warnings vs origin/main baseline (lib 4 / bin 2 warnings, identical set, all pre-existing).
  • cargo test -p control_plane --lib emit::stage_config — 84 pass.
  • cargo test -p control_plane --lib physical::colored_dag — 21 pass.
  • Extended fused_asap_edge_emits_single_pipeline_and_metrics_list to thread cold_ship_endpoint = http://gorilla-merger:10908/ingest/gorilla + cluster=asap-mvp and assert the emitted cold block surfaces exactly that (and never emits :9098).
  • Full --lib suite passes single-threaded (769/769). NOTE: the full parallel --lib run flakes on a pre-existing ASAP_EDGE_FUSED process-global std::env race introduced by control-plane: emit fused asap_edge edge config #311 (its fused emit test sets the env var while parallel mvp46 tests read it without the shared lock) — reproduced identically on the untouched origin/main baseline (5/8 parallel failures there). Out of scope for this PR; not caused by this change.

…tageConfig

PR #311's emit_edge_yaml_asap_edge derived the fused asap_edge cold tier's
ship_endpoint from the OTLP backend host (http://<backend>:9098/ingest/gorilla)
and read external_labels.cluster from ASAP_CLUSTER inline, because
EdgeStageConfig carried neither field. Both were wrong: the cold tier ships to
the gorilla-merger over HTTP ingest port 10908 (gRPC 10907), not backend:9098.

Add cold_ship_endpoint: Option<String> and cold_external_labels:
Vec<(String,String)> to EdgeStageConfig and read them in the emitter instead of
the inline placeholder. The colored_dag L5 layer is deployment-independent (no
DeploymentConstraints plumbed in), so it cannot resolve a real per-deploy
endpoint; it populates the single named defaults (default_cold_ship_endpoint /
default_cold_external_labels), which a deploy-aware layer can override post-emit
the same way exporter_target is. All struct-literal construction sites updated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zzylol
zzylol merged commit 735b993 into main May 23, 2026
@zzylol
zzylol deleted the feat/edgeconfig-cold-fields branch July 17, 2026 20:05
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