Skip to content

[pdata/pprofile] fix wrong error sentinel in SetString#15511

Merged
mx-psi merged 2 commits into
open-telemetry:mainfrom
florianl:pprofile-fix-1
Jun 29, 2026
Merged

[pdata/pprofile] fix wrong error sentinel in SetString#15511
mx-psi merged 2 commits into
open-telemetry:mainfrom
florianl:pprofile-fix-1

Conversation

@florianl

Copy link
Copy Markdown
Member

Description

SetString returned errTooManyMappingTableEntries when the StringTable reached capacity, a copy-paste error from a sibling function. This caused callers checking for a full StringTable via errors.Is to not match the returned error.

Fix this by returning errTooManyStringTableEntries instead.

Link to tracking issue

Fixes #

Testing

Documentation

Authorship

  • I, a human, wrote this pull request description myself.

@florianl
florianl requested review from a team, dmathieu and mx-psi as code owners June 29, 2026 09:42
@github-actions
github-actions Bot requested review from bogdandrutu and dmitryax June 29, 2026 09:43
SetString returned errTooManyMappingTableEntries when the StringTable
reached capacity, a copy-paste error from a sibling function. This caused
callers checking for a full StringTable via errors.Is to not match the
returned error.

Fix this by returning errTooManyStringTableEntries instead.

Signed-off-by: Florian Lehner <[email protected]>
@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 91.08%. Comparing base (5244834) to head (80593e6).

Files with missing lines Patch % Lines
pdata/pprofile/string_table.go 0.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #15511   +/-   ##
=======================================
  Coverage   91.08%   91.08%           
=======================================
  Files         726      726           
  Lines       47937    47937           
=======================================
  Hits        43664    43664           
  Misses       2978     2978           
  Partials     1295     1295           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mx-psi
mx-psi added this pull request to the merge queue Jun 29, 2026
Merged via the queue into open-telemetry:main with commit 45a36a4 Jun 29, 2026
68 of 69 checks passed
lazureykis added a commit to lazureykis/opentelemetry-collector that referenced this pull request Jul 6, 2026
- FromAttributeIndices now returns (pcommon.Map, error) after open-telemetry#15517; update
  the assertSampleDictAttr test helper to check the error.
- setString now returns errTooManyStringTableEntries, matching the sentinel
  fix in open-telemetry#15511; drop the stale "preserve parity" workaround.

Assisted-by: Claude Opus 4.8
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.

2 participants