Skip to content

Fix nil pointer dereference in popCurrentExecution for non-email alert notifiers#9707

Merged
nishantmonu51 merged 2 commits into
mainfrom
nishant/fix-alert-notifier-nil-panic
Jul 20, 2026
Merged

Fix nil pointer dereference in popCurrentExecution for non-email alert notifiers#9707
nishantmonu51 merged 2 commits into
mainfrom
nishant/fix-alert-notifier-nil-panic

Conversation

@nishantmonu51

Copy link
Copy Markdown
Collaborator
  • In Rill Developer, admin.GetAlertMetadata returns ErrNotImplemented, which executeAll tolerates by leaving adminMeta nil. The email notifier branch guards against this, but the non-email branch dereferenced adminMeta.RecipientURLs unconditionally, so an alert with a Slack (or any non-email) notifier panicked instead of sending.
  • Guard the non-email branch the same way as the email branch: when admin metadata is unavailable, leave OpenLink/EditLink blank and still send the notification.
  • Cloud behavior is unchanged, including the error when metadata is present but has no anon-user entry.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

…email notifiers

In Rill Developer, admin.GetAlertMetadata returns ErrNotImplemented and adminMeta
stays nil. The non-email notifier branch dereferenced adminMeta.RecipientURLs
without a nil guard, causing alerts with e.g. Slack notifiers to panic instead of
sending. Now the links are left blank when admin metadata is unavailable, matching
the email branch's behavior.
@nishantmonu51 nishantmonu51 changed the title Fix nil pointer dereference in \popCurrentExecution\ for non-email alert notifiers Fix nil pointer dereference in popCurrentExecution for non-email alert notifiers Jul 19, 2026
@nishantmonu51

Copy link
Copy Markdown
Collaborator Author

@codex: review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 63a0815561

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

return fmt.Errorf("failed to build recipient open url: %w", err)
// Note: adminMeta may not always be available (if outside of cloud). In that case, we leave the links blank (no clickthrough available).
msg.OpenLink = ""
msg.EditLink = ""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: may be reset msg.UnsubscribeLink as well defensively and for consistency

@nishantmonu51
nishantmonu51 merged commit 4726d84 into main Jul 20, 2026
13 of 14 checks passed
@nishantmonu51
nishantmonu51 deleted the nishant/fix-alert-notifier-nil-panic branch July 20, 2026 06:46
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.

2 participants