Skip to content

Conversation

@RoiGlinik
Copy link
Contributor

No description provided.

@RoiGlinik RoiGlinik requested a review from Avi-Robusta January 14, 2026 08:14
@coderabbitai
Copy link

coderabbitai bot commented Jan 14, 2026

Walkthrough

Adds two Helm template helpers to select a Sentry DSN based on ROBUSTA_UI_DOMAIN and updates the runner template to use the helper; runner.sentry_dsn default in values.yaml is cleared, and the Sentry Secret is now rendered only when a DSN is produced.

Changes

Cohort / File(s) Summary
New Template Helpers
helm/robusta/templates/_helpers.tpl
Adds robusta.isSaasEnvironment (checks ROBUSTA_UI_DOMAIN unset or ends with .robusta.dev) and robusta.sentryDsn (returns .Values.runner.sentry_dsn if set; otherwise returns default SaaS DSN when in SaaS environment; else empty).
Runner template update
helm/robusta/templates/runner.yaml
Replaces direct use of .Values.runner.sentry_dsn with include "robusta.sentryDsn" .; computes $sentryDsn and renders the Sentry Secret only if it is non-empty.
Values change
helm/robusta/values.yaml
Clears the default runner.sentry_dsn by setting it to an empty string.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive No description was provided by the author, making it impossible to evaluate whether it relates to the changeset. Add a pull request description explaining the changes and their motivation, such as why Sentry should be disabled for self-hosted environments.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: disabling Sentry for self-hosted environments while allowing user override, which aligns with the changeset's logic for environment-aware DSN selection.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ROB-2062-sentry-self-host


📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1851249 and d13e042.

📒 Files selected for processing (1)
  • helm/robusta/templates/_helpers.tpl
🚧 Files skipped from review as they are similar to previous changes (1)
  • helm/robusta/templates/_helpers.tpl
⏰ 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). (2)
  • GitHub Check: run_tests
  • GitHub Check: run_tests

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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.

@github-actions
Copy link

github-actions bot commented Jan 14, 2026

Docker image ready for b521f9a (built in 46s)

⚠️ Warning: does not support ARM (ARM images are built on release only - not on every PR)

Use this tag to pull the image for testing.

📋 Copy commands

⚠️ Temporary images are deleted after 30 days. Copy to a permanent registry before using them:

gcloud auth configure-docker us-central1-docker.pkg.dev
docker pull us-central1-docker.pkg.dev/robusta-development/temporary-builds/robusta-runner:b521f9a
docker tag us-central1-docker.pkg.dev/robusta-development/temporary-builds/robusta-runner:b521f9a me-west1-docker.pkg.dev/robusta-development/development/robusta-runner-dev:b521f9a
docker push me-west1-docker.pkg.dev/robusta-development/development/robusta-runner-dev:b521f9a

Patch Helm values in one line:

helm upgrade --install robusta robusta/robusta \
  --reuse-values \
  --set runner.image=me-west1-docker.pkg.dev/robusta-development/development/robusta-runner-dev:b521f9a

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
helm/robusta/templates/runner.yaml (1)

321-332: Potential issue: Conditional check may not work as intended with literal "".

The helper robusta.sentryDsn returns "" (a literal two-character string with quotes) for non-SaaS environments. The condition {{- if $sentryDsn }} will evaluate this as truthy since it's not an empty string—it's the string "". This means the Secret will still be created with SENTRY_DSN: "" for self-hosted environments, which may not be the intended behavior.

Consider updating the helper to return an actually empty string instead of "", or adjust the condition here:

Proposed fix in _helpers.tpl (preferred)
 {{- define "robusta.sentryDsn" -}}
 {{- if .Values.runner.sentry_dsn -}}
 {{ .Values.runner.sentry_dsn }}
 {{- else if eq (include "robusta.isSaasEnvironment" .) "true" -}}
 https://[email protected]/6402199
-{{- else -}}
-""
 {{- end -}}
 {{- end -}}
🤖 Fix all issues with AI agents
In `@helm/robusta/templates/_helpers.tpl`:
- Around line 136-144: The helper define "robusta.sentryDsn" returns a literal
quoted string `""` instead of an actual empty value, causing downstream
conditionals to treat it as truthy; update the "robusta.sentryDsn" template to
return an empty string (remove the surrounding quotes) in the final else branch
so the helper yields an actual empty value when Sentry is disabled.
🧹 Nitpick comments (1)
helm/robusta/templates/runner.yaml (1)

333-333: Remove trailing blank line.

Static analysis (YAMLlint) flagged an extra blank line at the end of the file.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a005f90 and 3d40a43.

📒 Files selected for processing (3)
  • helm/robusta/templates/_helpers.tpl
  • helm/robusta/templates/runner.yaml
  • helm/robusta/values.yaml
🧰 Additional context used
🪛 YAMLlint (1.37.1)
helm/robusta/templates/runner.yaml

[warning] 333-333: too many blank lines (1 > 0)

(empty-lines)

⏰ 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). (4)
  • GitHub Check: run_tests
  • GitHub Check: build
  • GitHub Check: run_tests
  • GitHub Check: Deploy docs
🔇 Additional comments (2)
helm/robusta/values.yaml (1)

704-704: LGTM!

Removing the hardcoded default DSN and delegating to the helper template is the correct approach for supporting environment-aware Sentry configuration. Self-hosted users will now have Sentry disabled by default, while SaaS environments will continue to use the DSN defined in the helper.

helm/robusta/templates/_helpers.tpl (1)

118-130: LGTM!

The isSaasEnvironment helper correctly determines the environment by checking if ROBUSTA_UI_DOMAIN is unset or points to a Robusta-managed domain. The iteration over additional_env_vars is appropriate for finding the environment variable.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Signed-off-by: Roi Glinik <[email protected]>
@RoiGlinik RoiGlinik changed the title ROB-2062 disable sentry for selfhost environment, allow use override ROB-2062 disable sentry for selfhost environment, allow user override Jan 14, 2026
Signed-off-by: Roi Glinik <[email protected]>
@RoiGlinik RoiGlinik enabled auto-merge (squash) January 14, 2026 12:10
@RoiGlinik RoiGlinik merged commit 4c28c46 into master Jan 14, 2026
8 of 9 checks passed
@RoiGlinik RoiGlinik deleted the ROB-2062-sentry-self-host branch January 14, 2026 12:19
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