Repository navigation
chore: rename env name for cluster - #4634
Conversation
Summary by CodeRabbit
WalkthroughThe code updates the source to prefer the PYROSCOPE_CLUSTER_NAME environment variable for the Pyroscope cluster tag, falling back to CLUSTER, and ultimately to an empty string if neither is set. No exports or other Pyroscope configuration/startup logic were changed. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant App as App Startup
participant Env as Environment
participant Pyro as Pyroscope Config
App->>Env: Read PYROSCOPE_CLUSTER_NAME
alt PYROSCOPE_CLUSTER_NAME set
Env-->>App: value
else not set
App->>Env: Read CLUSTER
alt CLUSTER set
Env-->>App: value
else not set
Env-->>App: "" (empty)
end
end
App->>Pyro: Initialize with cluster tag
Pyro-->>App: Profiling started
note right of Pyro: Only cluster tag source changed
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks (3 passed)✅ Passed checks (3 passed)
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. ✨ Finishing touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/index.ts (1)
53-53: Nit: prefer nullish coalescing and trim.If you don’t add the legacy fallback, at least use nullish coalescing and trim to avoid treating empty strings/whitespace as “unset”.
- cluster: process.env.PYROSCOPE_CLUSTER_NAME || '', + cluster: (process.env.PYROSCOPE_CLUSTER_NAME ?? '').trim(),
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/index.ts(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
- GitHub Check: Build User Transformer Docker Image - PR / Build Transformer Docker Image AMD64
- GitHub Check: Build Transformer Docker Image - PR / Build Transformer Docker Image AMD64
- GitHub Check: Code Coverage
- GitHub Check: UT Tests
- GitHub Check: test_and_publish
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Analyze (go)
🔇 Additional comments (1)
src/index.ts (1)
53-53: Action required: implement CLUSTER fallback or update PR descriptionsrc/index.ts:53 — cluster is set to
process.env.PYROSCOPE_CLUSTER_NAME || ''and does not fall back toprocess.env.CLUSTER. Either implement the fallback (e.g.cluster: process.env.PYROSCOPE_CLUSTER_NAME || process.env.CLUSTER || '') or remove the “fall back to CLUSTER” claim from the PR/AI summary.I attempted the repo search you ran; ripgrep returned "No files were searched", so I could not confirm a fallback elsewhere — verify other occurrences if needed.
|
Allure Test reports for this run are available at:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #4634 +/- ##
========================================
Coverage 91.78% 91.78%
========================================
Files 642 642
Lines 33941 33949 +8
Branches 8042 8035 -7
========================================
+ Hits 31153 31161 +8
- Misses 2536 2558 +22
+ Partials 252 230 -22 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|



What are the changes introduced in this PR?
Rename ENV variable for cluster name to
PYROSCOPE_CLUSTER_NAMEWhat is the related Linear task?
Resolves INT-XXX
Please explain the objectives of your changes below
Put down any required details on the broader aspect of your changes. If there are any dependent changes, mandatorily mention them here
Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?
N/A
Any new dependencies introduced with this change?
N/A
Any new generic utility introduced or modified. Please explain the changes.
N/A
Any technical or performance related pointers to consider with the change?
N/A
@coderabbitai review
Developer checklist
My code follows the style guidelines of this project
No breaking changes are being introduced.
All related docs linked with the PR?
All changes manually tested?
Any documentation changes needed with this change?
Is the PR limited to 10 file changes?
Is the PR limited to one linear task?
Are relevant unit and component test-cases added in new readability format?
Reviewer checklist
Is the type of change in the PR title appropriate as per the changes?
Verified that there are no credentials or confidential data exposed with the changes.