Skip to content

chore: rename env name for cluster - #4634

Merged
vinayteki95 merged 1 commit into
developfrom
chore.rename-pyroscope-cluster-env
Sep 15, 2025
Merged

vinayteki95 merged 1 commit into
developfrom
chore.rename-pyroscope-cluster-env

Conversation

@vinayteki95

Copy link
Copy Markdown
Contributor

What are the changes introduced in this PR?

Rename ENV variable for cluster name to PYROSCOPE_CLUSTER_NAME

What 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.

@vinayteki95
vinayteki95 requested a review from a team September 12, 2025 12:21
@coderabbitai

coderabbitai Bot commented Sep 12, 2025 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Chores
    • Updated Pyroscope cluster tag to use PYROSCOPE_CLUSTER_NAME instead of CLUSTER.
    • If neither variable is set, the cluster tag defaults to an empty value.
    • All other Pyroscope settings and startup behavior remain unchanged.
    • Operators should set PYROSCOPE_CLUSTER_NAME to preserve cluster labeling in profiles; no impact to runtime outside profiling labels.

Walkthrough

The 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

Cohort / File(s) Summary
Pyroscope cluster tag resolution
src/index.ts
Updated cluster tag source to prefer PYROSCOPE_CLUSTER_NAME, then CLUSTER, else empty string. No other logic or exports modified.

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
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks (3 passed)

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title accurately identifies the change type and intent—renaming an environment variable for the cluster—and matches the changeset which renames the Pyroscope cluster env var; it is concise and correctly labeled as a chore. However, it's slightly generic and could be more explicit by naming the exact variable or mentioning Pyroscope to aid quick scanning. Overall the title is related and informative for reviewers.
Description Check ✅ Passed The PR description follows the repository template and includes the change summary, Linear task reference, objectives section, and the developer/reviewer checklists, and it clearly states the renaming to PYROSCOPE_CLUSTER_NAME. Some implementation details are missing or marked N/A, notably migration/backward-compatibility notes (e.g., whether CLUSTER remains supported), any documentation updates, tests added, and confirmation that developer checklist items are completed. Given the template is followed and core information is present, the description is mostly complete but would benefit from those clarifications.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

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.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

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 Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore.rename-pyroscope-cluster-env

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot 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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between dbacf0a and f05c268.

📒 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 description

src/index.ts:53 — cluster is set to process.env.PYROSCOPE_CLUSTER_NAME || '' and does not fall back to process.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.

Comment thread src/index.ts Resolved
@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

Allure Test reports for this run are available at:

@codecov

codecov Bot commented Sep 12, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.78%. Comparing base (2fd8412) to head (f05c268).
⚠️ Report is 5 commits behind head on develop.

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.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sonarqubecloud

Copy link
Copy Markdown

@vinayteki95
vinayteki95 merged commit 27a949f into develop Sep 15, 2025
@vinayteki95
vinayteki95 deleted the chore.rename-pyroscope-cluster-env branch September 15, 2025 04:55
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.

3 participants