Skip to content

feat(cli): configure sourcemap upload concurrency - #70314

Merged
hpouillot merged 2 commits into
PostHog:masterfrom
DebadityaHait:feat/cli-sourcemap-upload-concurrency
Jul 15, 2026
Merged

hpouillot merged 2 commits into
PostHog:masterfrom
DebadityaHait:feat/cli-sourcemap-upload-concurrency

Conversation

@DebadityaHait

Copy link
Copy Markdown
Contributor

Problem

Closes #70238

Sourcemap S3 uploads use a process-wide Rayon pool hardcoded to 10 threads, so large builds cannot tune upload concurrency.

Changes

  • Add --concurrency and POSTHOG_CLI_SOURCEMAP_UPLOAD_CONCURRENCY to sourcemap upload and sourcemap process.
  • Replace the global Rayon pool with a local symbol-set upload pool.
  • Keep 10 as the default for all existing upload paths, and reject zero or malformed values.

How did you test this code?

  • cargo +1.91.1 test concurrency --lib – 9 concurrency tests pass.
  • cargo +1.91.1 test --all-features -- --skip test_pair_inject – 136 tests pass. On this Windows checkout, the skipped fixture test has the same CRLF/LF mismatch on unmodified master.
  • cargo +1.91.1 clippy --all-targets --all-features -- -D warnings -A clippy::needless-borrows-for-generic-args – clean; the allowed lint is an unchanged Windows-only finding in login.rs.
  • cargo +1.91.1 fmt --all -- --check, release build, and Rustdoc with warnings denied – clean.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Docs update

Updated cli/README.md with the default, precedence, direct CLI usage, and build-environment usage for @posthog/nextjs-config.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Codex made the changes and ran the checks using the public contribute skill. I chose a PostHog-specific setting and a local pool so sourcemap builds can tune their upload workload without changing unrelated global Rayon behavior.

@DebadityaHait
DebadityaHait marked this pull request as ready for review July 12, 2026 20:49
@hpouillot

Copy link
Copy Markdown
Contributor

Thanks for your contribution @DebadityaHait !

@hpouillot
hpouillot merged commit 97457ef into PostHog:master Jul 15, 2026
224 of 267 checks passed
@deployment-status-posthog

deployment-status-posthog Bot commented Jul 15, 2026 •

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-07-15 10:50 UTC Run
prod-us ✅ Deployed 2026-07-15 11:03 UTC Run
prod-eu ✅ Deployed 2026-07-15 11:09 UTC Run

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.

CLI: sourcemap upload thread pool hardcoded to 10 — make it configurable for large builds

2 participants