Skip to content

Validation failure notifications are sent to tenants (regression from 2.2) #760

Open

Description

@sadsfae

Summary

Tenants receive validation failure emails that are intended for admins only. Example subject observed in production:

Validation check failed for cloud06 / atheurer / 5119

Version history

Release Failure To Failure envelope Tenant receives
2.2.6 and earlier dev-null@<domain> To + Cc No
3.0.0 tenant to_addrs=recipients, Cc dropped Yes
3.0.2 tenant To + Cc, admin Cc fixed Yes
3.0.4 tenant To + Cc Yes

The regression first shipped in QUADS 3.0.0 via 24ee8ff3 (QUADS Plugin Architecture), which replaced the dev-null placeholder with the assignment owner. It remains in 3.0.2 and 3.0.4. The separate admin-delivery regression (send_message(to_addrs=recipients) dropping Cc) was fixed in 3.0.2 by b29b6c76, the merge twin of bfadcbed.

Expected

Validation failure notifications are admin-only. In 2.2.6 validate_env.py:notify_failure sent To: dev-null@<domain> with the admins in Cc: report_cc. The README notification table still documents this event as Validation failed (admin), and validation_failed tells admins to fix the environment before the user is notified.

Actual

EnvironmentValidatorPlugin.notify_failure addresses the tenant:

recipient = "%s@%s" % (owner, Config["domain"])
await self.email_dispatcher.send_mail(
    subject=subject,
    content=content,
    recipients=[recipient],
    cc=_cc_users,
)

The tenant is the To recipient and report_cc admins are only Cc.

Fix

Restore admin-only delivery for validation failure notifications: keep the dev-null placeholder as To and report_cc admins as Cc, so the tenant is never addressed while the envelope still reaches the admins. Change 1258038 implements this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions