Repository navigation
Delete dead code and call the Collector window a tumbling window - #612
Merged
Merged
Conversation
The runtime only ever runs tumbling windows: the CollectorPlan decoder rejects every non-tumbling framework and the edge processor checks for Tumbling. Delete the Sliding mode, the WindowSpec.Slide field, the closed-window ring and the helpers only it used, and their tests.
pane_secs had to equal window_secs and state_layout had to be the constant anchored-pane-v1, so both carried no information. Remove them from the Go and Rust plan decoders, the shared fixture and the tests, and rename window_secs to tumbling_window_secs so the field says which window it sizes.
Nothing in this repo or the backend depends on it. run_demo.sh only checked that the directory existed and passed it as a docker build context that no current backend Dockerfile reads.
No deploy config uses the serf or serfhttp component types, and the MVP excludes the Serf comparison. Remove the three components and their entries in the asap-otel builder config.
pipelineconfig.go is a file added by the patch, not an upstream file, and nothing outside it and its test calls it.
The endpoint, tsdb_bucket, tenant, region, access_key_id, secret_access_key and use_ssl cold fields were only read by config validation; no code writes to S3 from the edge. Remove them and the one deploy config that still set them.
design-gos-unified-edge-telemetry.md was removed when the design docs were consolidated, but about 25 code comments still cited it. Drop the dangling citations and leave the comments' content as is.
Point otel-app/probes.go at the runbook's current path and drop the missing freshness-probe config it cited, drop the mention of a telegraf restore script that does not exist, and mark the dual-mode aggregation plan and the asap_edge design as implemented.
With the sliding mode gone, rotationStepMs only forwarded to windowSizeMs.
zzylol
marked this pull request as ready for review
November 9, 2026 03:36
zzylol
force-pushed
the
refactor/remove-dead-code
branch
from
November 9, 2026 03:38
adb26b2 to
76e96b9
Compare
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.
Why
The Collector carries code that no build, test, deploy script or CI job uses, and its CollectorPlan contract has two fields that can only take one value. That code costs review and build time, and the "pane" wording makes readers think the Collector runs something other than a tumbling window. The Collector runs exactly one window type: a tumbling window of width W.
What
asap-precompute-go. That coversAggregationMode.Sliding,WindowSpec.Slide, the ring of closed windows,slideMs,panesPerWindow,rotateSlidingLockedand their tests. Without the sliding mode,rotationStepMsonly forwarded towindowSizeMs, so its callers now callwindowSizeMsdirectly.pane_secsandstate_layout(they had to equalwindow_secsand"anchored-pane-v1");window_secstotumbling_window_secs(Go:TumblingWindowSecs).The Go decoder, the Rust mirror, the shared fixture and all tests are updated.
window_implementation_idstayscollector-tumbling-v1.asap-gorilla-rust/, the Serf processor/exporter/receiver,otel_collector_benchmark/, and the unusedPipelineConfigloader in the Go SDK patch.asap_edgeand remove them from the one deploy config that still set them.design-gos-unified-edge-telemetry.md, which was deleted when the design docs were consolidated. Fix other stale file paths and status lines.How
Slidingmode,WindowSpec.Slide, closed-window ring,slideMs,panesPerWindow,rotateSlidingLocked,windowState.sketchFactory,rotationStepMsasap_edgealso checksMode == Tumbling.git grep -w Sliding: no users outsidewindow.go,config.goand their tests. The onlySlidereader was theasap_edgeshape check, which compared it to the window size.pane_secs,state_layoutpane_secs == window_secsandstate_layout == "anchored-pane-v1", so neither field carried information.collector_plan.go/collector_plan.rsvalidation. No other repo produces CollectorPlan on main.asap-gorilla-rust/run_demo.shonly checked that the directory existed and passed it as a--build-context. Backend main has nodata_plane/Dockerfileorcontrol_plane/Dockerfileand no reference to gorilla.serfprocessor,serfexporter,serfreceiverserforserfhttpcomponent types. The MVP README excludes the Serf comparison.git grep -i serf: only the builder manifest and comments.otel_collector_benchmark/.gitignoreline, also removed.opentelemetry-go-patch/sdk/metric/pipelineconfig.go(+ test)opentelemetry-go). Only its own test calls it.git grep PipelineConfig: self-references only.asap_edgecoldendpoint,tsdb_bucket,tenant,region,access_key_id,secret_access_key,use_sslgrepin the processor: no reads outsideconfig_validate.go. Removed fromasap-otel-agent-asap-gzip.yaml, the only config that set them.ship_endpointis untouched.run_demo.shno longer requires or passesasap-gorilla-rust. Theasap-otelbuilder manifest no longer lists the three Serf components.Before
WindowSpec{Size, Slide, AllowedLateness}, with a Sliding mode that no producer could configure.After
WindowSpec{Size, AllowedLateness}, with Tumbling and Batch modes. A plan that still sendswindow_secs,pane_secsorstate_layoutis now rejected as having unknown fields (the Rust decoder usesdeny_unknown_fields, and the Go decoder rejects unknown fields too). This is the intended contract change.Verification
cd asap-precompute-go && go vet ./... && go test ./...: pass.cd opentelemetry-collector-contrib-patch/processor/asapedgeprocessor && go vet ./... && go test ./...: pass.opentelemetry-go/sdk/metric(after restore):go build ./... && go vet . && go test . && go test ./internal/aggregate -run 'TestRowSampledSketch_': pass.cd asap-precompute-rs && cargo fmt -- --check && cargo clippy --all-features --all-targets && cargo test --all-features: pass.python3 -m unittest discover -s deploy/mvp-multinode/scripts/tests -p 'test_*.py': 20 tests OK.bash -n deploy/mvp-multinode/scripts/run_demo.sh: OK.asap-oteldistribution builds with OCB v0.141.0 from the updated manifest.asap-otel componentslists no Serf component.MVP collectorcheck fails on this PR as it already does on main: CI checks outasap_sketchlibmain, andasap-precompute-rsdoes not build against its newerDdSketchAPI. This PR does not change that crate's sketch code; moving the collector to the latestasap_sketchlibandsketchlib-gois separate work.