Skip to content

feat: allow retaining cmperf CM2 temp files for debug - #4392

Merged
cgrinds merged 2 commits into
mainfrom
cbg-cmperf-debug
Aug 7, 2026
Merged

feat: allow retaining cmperf CM2 temp files for debug#4392
cgrinds merged 2 commits into
mainfrom
cbg-cmperf-debug

Conversation

@cgrinds

@cgrinds cgrinds commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Add HARVEST_CMPERF_RETAIN_FILES so CM2 pb files can be kept for troubleshooting, with newest-N pruning.
Isolate temp dirs as
cmperf-{poller}-{uid}/{object} so different Unix users do not collide.

Add HARVEST_CMPERF_RETAIN_FILES so CM2 pb files can be kept for troubleshooting,
with newest-N pruning.
Isolate temp dirs as
cmperf-{poller}-{uid}/{object} so different Unix users do not collide.
Copilot AI lite review requested due to automatic review settings August 7, 2026 13:22
@cla-bot cla-bot Bot added the cla-signed label Aug 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an opt-in debugging mechanism for CMPerf CM2 protobuf downloads by retaining the newest N temp .pb files (via HARVEST_CMPERF_RETAIN_FILES) and reduces temp-dir collisions by isolating temp directories per poller and Unix user.

Changes:

  • Introduces HARVEST_CMPERF_RETAIN_FILES parsing and temp-directory pruning logic (newest-N retention).
  • Updates CMPerf temp directory layout to cmperf-{poller}-{uid}/{object} under the chosen temp root.
  • Adds unit tests for retain parsing and pruning behavior.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
cmd/collectors/cmperf/cmperf.go Changes CM2 temp-dir path to include poller + UID + object for better isolation.
cmd/collectors/cmperf/cm2.go Adds retention env var handling and pruning logic; integrates pruning into download/parse lifecycle.
cmd/collectors/cmperf/cm2_test.go Adds tests covering retain parsing and pruning “keep newest N” semantics.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cmd/collectors/cmperf/cmperf.go Outdated
Comment thread cmd/collectors/cmperf/cm2.go
Add HARVEST_CMPERF_RETAIN_FILES so CM2 pb files can be kept for troubleshooting,
with newest-N pruning.
Isolate temp dirs as
cmperf-{poller}-{uid}/{object} so different Unix users do not collide.
Copilot AI review requested due to automatic review settings August 7, 2026 13:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@cgrinds
cgrinds merged commit 8557074 into main Aug 7, 2026
14 checks passed
@cgrinds
cgrinds deleted the cbg-cmperf-debug branch August 7, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants