Cesar/update main#6
Closed
Cesar-M-Diaz wants to merge 1332 commits into
Closed
Conversation
Replace real-time sleeps with testing/synctest fake clock. Tests now run in ~0ms instead of ~100ms and are no longer susceptible to timing flakiness.
| datasource | package | from | to | | ---------- | ------- | ----- | ----- | | npm | vite | 8.0.2 | 8.0.5 | Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com> Co-authored-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>
…ecurity] (grafana#4984) | datasource | package | from | to | | ---------- | ----------------------------- | ------ | ------ | | go | github.com/go-jose/go-jose/v4 | v4.1.3 | v4.1.4 | Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com> Co-authored-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>
Bumps [rack-session](https://github.com/rack/rack-session) from 2.1.1 to 2.1.2. - [Release notes](https://github.com/rack/rack-session/releases) - [Changelog](https://github.com/rack/rack-session/blob/main/releases.md) - [Commits](rack/rack-session@v2.1.1...v2.1.2) --- updated-dependencies: - dependency-name: rack-session dependency-version: 2.1.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [rack-session](https://github.com/rack/rack-session) from 2.1.1 to 2.1.2. - [Release notes](https://github.com/rack/rack-session/releases) - [Changelog](https://github.com/rack/rack-session/blob/main/releases.md) - [Commits](rack/rack-session@v2.1.1...v2.1.2) --- updated-dependencies: - dependency-name: rack-session dependency-version: 2.1.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.23 to 4.18.1. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.17.23...4.18.1) --- updated-dependencies: - dependency-name: lodash dependency-version: 4.18.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
) * chore: remove orphaned .husky pre-commit hook The root package.json and lint-staged config were removed in grafana#4948 (embedded UI v2 refactor), but the husky pre-commit hook was left behind. It now fails on every commit since lint-staged has no config. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: replace broken husky pre-commit hook with UI linter The root package.json and lint-staged config were removed in grafana#4948 (embedded UI v2 refactor), leaving the old hook broken. Replace it with a lightweight script that runs `yarn lint` in ui/ when UI source files are staged. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * test: verify hook catches lint errors * Revert "test: verify hook catches lint errors" This reverts commit 3c18e6c. * fix: use git-compatible pathspec in pre-commit hook Git pathspecs don't support ** without :(glob) prefix. Use simpler 'ui/*.ts' patterns which match recursively by default. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Unit tests and integration tests previously ran together in the same CI job. This separates them so they can run in parallel for faster feedback. The go/test target now excludes pkg/test/integration via package filtering, and a new go/test-integration target and CI job run only the integration tests with a 2x2 matrix (arch x race flags). Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs: add security patch check step to patch release process Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add security patch check step before tagging releases Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: drop branch targeting wording from security check step Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: move security check to before creating release branch Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add security check step before tagging patch releases Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs: add v1.20.1 release notes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add v1.20.2 release notes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* ci: add test runs without -race -cover to the matrix Add a go_test_flags dimension to the CI test matrix so tests run both with and without the race detector and coverage. This produces 4 jobs (amd64/arm64 x race+cover/plain) instead of the previous 2. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ci: drop redundant -v from GO_TEST_FLAGS gotestsum passes -json to go test, which implies -v, making the explicit flag redundant I/O overhead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: make upgrade-go-version.sh macOS compatible Use -E -i.bak instead of GNU-only -i and \+ syntax on the toolchain sed command so the script works on both Linux and macOS. Also update the skill to always create a feature branch first. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Update golang version to 1.25.9 --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…receiving a SIGTERM (grafana#4992) * Add cfg for compactor shutdown timeout * run make reference-help * chore: regenerate configuration reference docs for shutdown_timeout --------- Co-authored-by: Bryan Huhta <32787160+bryanhuhta@users.noreply.github.com> Co-authored-by: Christian Simon <simon@swine.de>
…4989) * fix(profilecli): preserve label name casing in table output tablewriter auto-formats headers by default, uppercasing words and treating underscores/dots/spaces as word separators. This mangled label names like service_name → SERVICE NAME, http.method → HTTP METHOD, 中文标签 → (stripped), etc. Add SetAutoFormatHeaders(false) to every table in profilecli so label names are rendered exactly as received from the backend. * refactor(profilecli): extract newTableWriter helper to centralize header formatting
* feat(v2): move default storage paths under ./data/v2/ Ensures all persistent V2 storage (metastore raft WAL, snapshots, and FSM BoltDB) defaults to paths under ./data/v2/, so Docker users mounting -v storage:/data have all state inside the volume. * fix(helm): pin metastore data dirs to old paths to avoid breaking upgrades The binary defaults for metastore.data-dir, metastore.raft.dir, and metastore.raft.snapshots-dir changed from ./data-metastore/* to ./data/v2/metastore/*. Explicitly set the old paths in the Helm chart so existing deployments don't lose their data on upgrade.
…les (grafana#5037) Updates all OpenTelemetry Go packages to v1.43.0 (log packages to v0.19.0) across the root module, api, and all example modules. Supersedes grafana#5023, grafana#5024, grafana#5025, grafana#5026, grafana#5027, grafana#5028, grafana#5029, grafana#5030, grafana#5031,
Bumps [axios](https://github.com/axios/axios) from 1.13.5 to 1.15.0. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](axios/axios@v1.13.5...v1.15.0) --- updated-dependencies: - dependency-name: axios dependency-version: 1.15.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat(query-frontend): log user_agent on query log lines Add User-Agent header to query log lines so we can identify which client (Grafana UI, profilecli, gcx, Alloy, etc.) sent each query. This enables aggregate analysis by client type directly in LogQL without needing to correlate across separate log lines via traceID. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor: use connect.AnyRequest in logWithRequestMetadata Accept connect.AnyRequest instead of http.Header for flexibility, and rename to logWithRequestMetadata to better reflect its purpose. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* helm: add HTTPRoute support * apply cursor's comment * restore the blank line * fix errors * fix docs and default value for sectionName
…rafana#4977) When GracefulStop races with Serve startup, gRPC returns ErrServerStopped. Using Require().NoError() in the goroutine caused a spurious test failure unrelated to the actual test being run.
Timestamp represents the right edge (x_max) of the slot, covering the half-open interval (timestamp - step, timestamp].
…re signed (grafana#5347) * ci(release): create Homebrew formula commits via GitHub API so they are signed The homebrew-pyroscope ruleset now requires verified commit signatures on all branches, so the release workflow's plain git push of the formula update branch is rejected (GH013). Move the formula update to a separate workflow that creates the tap commit through the createCommitOnBranch API, which GitHub signs on behalf of the app. The release workflow now just dispatches it, always from main, so future fixes to the formula logic don't need backporting to release branches. The dispatch input also allows re-running the update manually for an already-published release. * ci: grant id-token permission for minting the app token via OIDC
… commits (grafana#5351) The v2.1.1 chart release failed pushing index.yaml to gh-pages with GH013 (helm-charts requires verified signatures). Upstream fixed this in grafana/helm-charts on 2026-05-26 by publishing the index through the GitHub API (planetscale/ghcommit-action); our pin predates the fix.
…se (grafana#5352) The v2.1.1 chart release failed at the index.yaml push (GH013, fixed by grafana#5351), leaving the chart tgz published but absent from the helm repo index. Re-runs skip: ct list-changed compares against the latest tag on main, which is now a weekly tag newer than the chart bump, so a chart-dir change is needed for the release workflow to pick the chart up again. The pyroscope-2.1.1 tag has been deleted so the release can re-run.
- Bump devcontainer image to mcr.microsoft.com/devcontainers/go:1.25-bookworm to match go.mod - Add docker-in-docker feature to support containerized `make build` targets - Commit devcontainer-lock.json to pin feature dependencies
) Picks up trace id support: the parser now reads the traceIdHi/traceIdLo fields emitted by our async-profiler fork and exposes the 128-bit W3C trace id as a trace_id pprof label on samples. jfr-parser: grafana/pyroscope-jfr-parser#115 Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(query): return trace IDs in span heatmaps * fixup: address review feedback on trace ID exemplars - profilecli: only show the Trace ID column in span exemplar tables when at least one entry actually has a trace ID - attributetable: document why HeatmapPoint.TraceId values that don't round-trip through model.TraceID (16 bytes) are dropped
* feat(querier): unify merged profile query formats * fix(queryfrontend): validate span and trace selectors
* fix(examples): repair Django rideshare startup * fix exmples test harness
* docs: document Python SDK fork safety * fix(examples): reset Django connections after fork * docs: surface fork warning after configuration
* feat: keep totals and labels of sampled-out profiles Profiles rejected by adaptive sampling were dropped entirely, which left gaps in the time series and made the affected series disappear. They are now retained with their stacktraces stripped: each sample keeps its value (so totals stay accurate) and its labels, while the location references are cleared. The unreferenced symbols are pruned by the write path. The resulting series is marked with a __sampled__="true" label. Stack-based queries (tree, pprof, heatmap) exclude these series with a __sampled__!="true" matcher, since they have no stacktraces to show. Time-series and totals queries include them, but suppress their exemplars as there is nothing to drill into. The __sampled__ marker is hidden from label and series enumeration. * feat(distributor): gate keeping of sampled-out profiles behind a flag Add -distributor.sampling.keep-stripped-profiles (default false). When off, sampled-out profiles are dropped as before; when on, they are retained with stacktraces stripped and marked __sampled__. This lets the read capability roll out and bake before any __sampled__ data is written: the flag is enabled only after the query path that understands the label is deployed, and can be turned off to stop producing such data without a rollback. * feat(query-backend): exclude sampled-out profiles from time series unless enabled Time-series queries now exclude __sampled__ series (profiles sampled out and kept as totals-only) unless distributor.sampling.keep-stripped-profiles is set, reusing the same flag that gates writing them. With the flag off, time series match the pre-sampling behavior, so disabling the feature (or rolling back) does not leave already-written __sampled__ data inflating historical totals. Stack queries already exclude these series unconditionally. * fix(distributor): account received vs discarded bytes for stripped profiles When a sampled-out profile is retained (stacktraces stripped), account its bytes by what is kept versus dropped, instead of counting the whole profile as received: - The kept size is measured after normalization (the collapsed samples' values and labels, deduplicated by label set) — this is what ends up stored — and the received metrics (received_decompressed_bytes and the usage-group received bytes) count that. - discarded_bytes_total gets the rest: symbol tables, stacktrace references, and the duplicate sample data that normalization removes. Fully dropped profiles (feature disabled) still account the whole profile as discarded. received_compressed_bytes is left as the raw wire size. * chore(querybackend): remove leftover commented annotations column * chore(distributor): regenerate config and help reference for keep-stripped-profiles flag Regenerate the generated files that reference the new flag (they broke the docs-up-to-date and TestHelp CI checks): cmd/pyroscope/pyroscope.yaml, the configuration-parameters reference, and the -h / -help-all golden files. Also simplify the flag help text. * let __sampled__ label be present in series and labels queries * feat(distributor): strip stacktraces from sampled-out profiles When a profile is sampled out and keep-stripped-profiles is enabled, strip its stacktraces (clear sample locations, drop the location/function/mapping tables) and rebuild the string table to keep only the strings still referenced by the sample types, period type, comments and per-sample labels, remapping every string index. The profile retains its totals and labels and is marked __sampled__. Account the kept (normalized, post-strip) size as ingested and the removed bytes as discarded, and factor out the labelsSize and profileSizeBytesWithSize helpers. * refactor(distributor): strip sampled-out profiles to totals upfront Collapse a sampled-out profile to a single sample holding the summed values at the sampling decision point, and account the stripped part as discarded right there. The profile then flows through the rest of the push path as a regular (small) profile: the stripped-specific metric branches disappear, and received plus discarded bytes add up to the original profile size. Sample labels are dropped along with the stacktraces: after the series split, the only per-sample labels left are span/trace IDs, which are unusable for stripped profiles (exemplars are suppressed and heatmaps exclude them). Samples that Normalize would reject (negative values, value length mismatch) are excluded from the totals to keep them identical to what the previous implementation stored. Language detection moves before the strip, since it reads the string table. * refactor(distributor): keep per-label-set totals for sampled-out profiles Instead of collapsing a sampled-out profile into a single totals sample, keep one aggregated sample per distinct sample label set. After the series split, the labels left at the sample level are span/trace IDs (and any labels the split preserves), so this retains span-attributed totals, e.g. for heatmaps built from stripped profiles. Samples are grouped the way Normalize would deduplicate them: non-string labels are removed first, and samples Normalize rejects (negative values, value length mismatch) are excluded from the totals. Profiles without sample labels still reduce to a single sample. * refactor: make stripped-profile handling per-tenant overrides Move the keep-stripped-profiles setting off the distributor Config and into per-tenant limits, and split it into two independent overrides: - keep_stripped_profiles (write path, distributor): when a profile is sampled out, retain its totals and labels with stacktraces stripped instead of dropping it. - include_stripped_profiles (read path, query-backend): whether those __sampled__ profiles are included in query results. Both default to false and can be enabled globally via limits or per tenant. The query-backend resolves include_stripped_profiles per querying tenant via AllTruePerTenant. * moving log line and fixing lint * minor PR comments --------- Co-authored-by: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com>
) The default Alloy scrape config maps the profiles.grafana.com/service_repository, service_git_ref and service_root_path annotations to labels, but not service_name. Without an explicit service_name label, Alloy falls back to inferring it from the target metadata (e.g. namespace + app.kubernetes.io labels), which is often not what the user intends — a pod whose inferred name is generic (a component literally named "default", etc.) shows up under a useless service_name and cannot be overridden via annotation like the other service_* labels can. Add a relabel rule that sets service_name from the first non-empty value of an ordered annotation list, matching the logic in the k8s-monitoring-helm chart's feature-profiling eBPF config: - profiles.grafana.com/service_name - resource.opentelemetry.io/service.name No-op unless a pod sets one of these annotations, so existing deployments are unaffected. Regenerated rendered manifests and bumped the chart version. Closes grafana#2051 Signed-off-by: Stephane Loeuillet <stephane.loeuillet@kaiko.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…/ingest paths (grafana#5372) When a tenant exceeds its ingestion limit the distributor rejects the push with connect.CodeResourceExhausted. The OTLP HTTP handler mapped every non-validation error to 500, so these client-side quota rejections were returned as server errors and logged at error level — making expected limit enforcement look like a server fault and counting against the write-path error budget. Map CodeResourceExhausted to 429 (as the Connect push path already does) and log it at warn. Unexpected failures still return 500.
…API (grafana#5317) * feat(symbolizer): expose address-level symbol resolution as a public API Add a Resolver interface and a Resolve(ctx, buildID, binaryName, addrs) method that pulls per-address symbol lookup out from behind the pprof-only entry point. It gives future consumers a narrow interface to depend on directly, without detouring through a synthetic pprof profile just to get symbols resolved -- groundwork for moving tree-shaped query symbolization out of the query rewrite. SymbolizePprof now calls Resolve internally, and its output is unchanged byte-for-byte on every existing fixture. Two deliberate behavior notes: - Resolve no longer synthesizes the "binary!0xaddr" fallback text itself. A nil/empty result slot means "unresolved," and rendering the fallback is now the caller's job: SymbolizePprof's per-mapping goroutine does it immediately after Resolve returns, so nothing downstream sees a difference. - Resolve returns a non-nil error only when the context is done during resolution. That now surfaces as a real error out of SymbolizePprof, instead of silently returning a fallback-filled profile with a nil error. This is the one externally-visible behavior change here, and it only affects a path no existing fixture exercised. Resolve also independently validates buildID with the same sanitizer extractBuildID already applies, before doing any object-store or debuginfod I/O. The only caller today already sanitizes first, so this is a no-op in practice, but it's defense in depth now that Resolve is a public entry point a future caller could reach directly with unsanitized input. Part of grafana/pyroscope-squad#487. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(symbolizer): isolate callers from each other's context cancellation The debuginfod fetch flight is shared by every concurrent caller for a build ID, but ran on the initiating caller's context, so one caller's cancellation failed all waiters. Run the flight on a context detached from the caller (values preserved, cancellation dropped); the HTTP client timeout and bounded retries keep it from running unbounded. Correspondingly, Resolve no longer classifies context errors propagated from the fetch layer as its own: only the caller's context ending fails the call, and every other failure - including another caller's cancellation surfacing through a shared flight - degrades to unresolved slots, which render as fallback symbols. Suggested by simonswine in review. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * review: rename detached context, drop singleflight jargon from comments Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * review: clarify that Resolve returns unresolved slots, callers render fallbacks Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * review: bound callers to their own context around the shared debuginfod fetch Detaching the deduplicated debuginfod fetch from caller cancellation had cut callers loose in both directions: a caller canceled mid-fetch could still receive a successful result, and a canceled caller had to wait out the whole detached fetch (HTTP timeout times retries) before returning. FetchDebuginfo now waits on the shared result and the caller's context, whichever ends first, and its doc comment owns the error contract: a done caller gets its own context error immediately; any other error comes from the shared fetch and says nothing about the caller's own context. Resolve folds its post-fetch checks into a single own-context check instead of explaining client internals at the call site. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…ery API (grafana#5318) * feat(query): add SymbolRefTable and symbol_refs tree fields to the query API Define the wire schema for tree reports that carry unresolved symbol references: a compact side table of resolved frame names, interned build IDs with their binary names, and per-entry (build ID, address) pairs sorted for deterministic merges. TreeQuery.symbol_refs requests the new report shape; TreeReport.symbol_refs carries the table. Schema and generated code only -- no producers or consumers yet, and symbol_refs is mutually exclusive with full_symbols. Part of grafana/pyroscope-squad#487. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * refactor(query): replace tree symbol bool flags with a SymbolMode enum Replace the per-request symbol bool flags on TreeQuery with a single SymbolMode enum (NAME/FULL/REFS) and migrate every producer and consumer. full_symbols is kept and deprecated for wire compatibility during rolling deploys; the never-released symbol_refs bool is dropped in favor of the enum. treeSymbolMode resolves the effective mode and rejects a request that sets the deprecated bool together with symbol_mode. Also expand the SymbolRefTable field docs to spell out the parallel unresolved_* arrays and the 1:1 build_ids/binary_names pairing. Part of grafana/pyroscope-squad#487. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(query): allow repeated build IDs in the SymbolRefTable contract Binary rows are identified by the (build ID, binary name) pair, not by build ID alone: the same build ID can legitimately appear under several binary names (e.g. a renamed binary), and each is retained exactly as stored so the wire encoding is independent of merge arrival order. The unresolved sort order gains the binary name accordingly. Part of grafana/pyroscope-squad#487. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(querybackend): reject symbol modes the backend does not implement treeSymbolMode passed SYMBOL_MODE_REFS (and any unknown value) through, silently degrading such requests to a names-only tree. Resolve through an explicit whitelist instead so an unimplemented mode fails the query; the branch adding REFS support lifts this rejection. Part of grafana/pyroscope-squad#487. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(query): carry the unresolved-locations limit on tree queries Add TreeQuery.max_unresolved_locations: the per-tenant bound on how many distinct unresolved locations a symbol-ref tree query may carry, resolved by the frontend and enforced wherever the table grows. The query fails past the limit rather than degrading, so results never mix resolved and fallback representations. Zero means unlimited. Part of grafana/pyroscope-squad#487. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…curity] (grafana#5378) | datasource | package | from | to | | ---------- | ---------------- | ------- | ------- | | go | golang.org/x/net | v0.55.0 | v0.56.0 | Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com> Co-authored-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>
…rafana#5321) * feat(model): add symbolref package for symbol-aware tree references Introduce pkg/model/symbolref: an intern table pairing a LocationRefNameTree with a compact side table (queryv1.SymbolRefTable) so tree nodes can reference either resolved frame names or unresolved {build ID, address} locations in one integer reference space. Implements content-addressed interning, cross-merge reference rebasing compatible with TreeMerger's node-name remap hook, and marshal-time compaction that orders unresolved entries by (build ID, address) for deterministic merges. Job grouping and the final tree rebuild land separately. Two design notes reflected in the doc comments: reference 0 is reserved (trees that round-trip the unmarshal path surface a synthetic virtual-root frame carrying the zero ref, which existing consumers already special-case), and merge determinism is semantic rather than byte-identical (per-stack values and the unresolved wire encoding are arrival-order independent; name-table order is not). Part of grafana/pyroscope-squad#487. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(symbolref): keep wire refs aligned when a marshaled tree drops refs ResultBuilder compacted pb.Names to the refs KeepRef observed, while unresolved wire refs were offset by the full snapshot name count. The wire contract reads unresolved entry i as ref - len(names), so whenever an interned name was not kept — any truncating marshal, which KeepRef documents itself as supporting — every unresolved lookup shifted by the number of dropped names, resolving against the wrong build ID and address or failing the range check. Current callers always marshal untruncated, so all interned refs are kept and the encodings coincide, but the contract must hold for the documented truncating use as well. Unresolved wire refs must be final when first returned, before the kept set is known, so a kept-set-compacted encoding cannot be assigned in a single pass without breaking the sorted unresolved wire order. Emit the full name snapshot instead: resolved wire refs are the table's own name indices, and len(pb.Names) always matches the offset KeepRef applies. Reported by cursor bugbot. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(symbolref): make the Add remap total instead of panicking on undescribed refs The remap Add returns indexed unresolvedRemap for any non-negative ref beyond the name range, so a nil or empty table — input Add's contract explicitly accepts — panicked as soon as the merge machinery invoked the remap on the marshal format's zero-valued root frame, and a tree carrying refs beyond its table (a skewed or buggy peer) panicked the read path the same way. Bounds-check both ranges and degrade undescribed refs to the reserved ref 0, which renders as the placeholder. Reported by cursor bugbot. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(symbolref): return the built table from ResultBuilder.Build Build accepted nil and allocated a fresh SymbolRefTable, but the void signature made that allocation unreachable, so the documented allocate-on-nil behavior was unusable. Return pb like the sibling builders (attributetable.Table.Build) so Build(nil) yields the built table; existing callers that pass a table and ignore the return are unaffected. Reported by cursor bugbot. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(symbolref): restrict remap negative passthrough to OtherLocationRef The remap Add returns passed every negative ref through unchanged, but only model.OtherLocationRef is a valid negative wire ref; any other negative from a malformed tree aliases the destination table's internal unresolved encoding (-2-idx), misattributing samples to an existing unresolved entry or panicking KeepRef on an absent slot. Degrade such refs to the reserved ref 0, matching how out-of-range positive refs are treated. Reported by cursor bugbot. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * refactor(util): extract symdb's hashedSlice into a shared package Share one content-addressed slice implementation between SymbolMerger and symbolref.Table instead of keeping a string-specialized copy in pkg/model/symbolref. No behavior change. Part of grafana/pyroscope-squad#487. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(symbolref): retain binary names as stored instead of first-writer-wins Key each binary row on the (build ID, binary name) pair: the same build ID can legitimately appear under several names (e.g. a renamed binary), and collapsing rows per build ID made the kept name depend on merge arrival order. Unresolved wire entries are now sorted by (build ID, binary name, address), and Build emits binary rows from contiguous runs of that order, sizing build_ids/binary_names exactly instead of reserving one slot per unresolved entry. Part of grafana/pyroscope-squad#487. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(model): detach the virtual root when unmarshaling a tree UnmarshalTree removed the marshal format's virtual root node from the tree structure but left it in the parent chain, so IterateStacks — which rebuilds each stack by walking parent pointers — surfaced a spurious zero-valued root frame in every stack of an unmarshaled tree, and every consumer of that path grew its own drop-the-phantom-frame workaround. Detach the node instead and remove symbolref's workarounds; the equivalent guards remaining elsewhere are now dead but harmless. Part of grafana/pyroscope-squad#487. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(symbolref): expose the distinct unresolved-location count Table.UnresolvedCount lets consumers enforce the per-query unresolved-locations limit while merging, alongside HasUnresolved. Part of grafana/pyroscope-squad#487. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…es (grafana#5397) * build: remove go workspace, wire modules via replace directives go.work.sum drifts whenever a single workspace module changes its dependencies, which breaks CI's unstaged-changes checks on every cross-module version skew (most visibly on Renovate security PRs). Wire api and lidia into the root module with replace directives instead, run tests and lint per module (./... does not cross module boundaries — this also starts running the api tests, which were never covered), and drop go work sync from go/mod. Local go.work files remain supported but gitignored. * chore(renovate): reduce config to security-only updates Mirrors pyroscope-cloud-backend. Regular dependency updates were rarely merged; security updates (plus the release branch coverage) are what we actually act on. * build: lint the api module too Bugbot flagged that go/lint covered lidia but not api after the workspace removal; api lints clean, so include it rather than carrying the pre-existing gap forward.
Updates the chart version and appVersion to the v2.2.0 release. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…ecurity] (grafana#5379) | datasource | package | from | to | | ---------- | ----------------- | ------- | ------- | | go | golang.org/x/text | v0.38.0 | v0.39.0 | Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com> Co-authored-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>
…[security] (grafana#5390) | datasource | package | from | to | | ---------- | ---------------------- | ------- | ------- | | go | google.golang.org/grpc | v1.81.0 | v1.82.1 | Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com> Co-authored-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>
…rafana#5359) SelectSeries fetches one extra step before the window so the boundary point at start renders as a complete bucket in charts; that point aggregates (start-step, start]. query top uses step = window size and summed it, roughly doubling reported totals. Skip points at or before the window start; totals now match SelectMergeProfile exactly.
|
Important Review skippedToo many files! This PR contains 1692 files, which is 1542 over the limit of 150. To get a review, narrow the scope: Upgrade to Pro+ to raise the limit. Usage-priced reviews support at most 300 files. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (238)
📒 Files selected for processing (2762)
You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests (beta)
|
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.
No description provided.