Skip to content

Blocked users are still getting notifications for scheduled pipeline onwership takeover

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

We are getting bounce errors as notifications are being sent to users that are currently blocked (even since years ago).

The notifications are related to scheduled pipelines.

It seems that notifications are not send for "normal actions" like comments, MRs, etc, as expected, but when there is a special action live a Scheduled Pipeline left with no owner, it sends notifications again to all the users involved in the project including those that have the blocked status.

Steps to reproduce

  1. Create a project with 2 or more users
  2. Set scheduled pipeline and set owner userB
  3. Block userA and delete it in SAML.
  4. Block userB
  5. Notification is sent to userA even if this is already blocked.

What is the current bug behavior?

Getting bounce email notifications as user doesn't exist anymore.

What is the expected correct behavior?

No notification should be send as fixed in gitlab-foss#27841 (closed)

Relevant logs and/or screenshots

{
    "bounce": {
        "bouncedRecipients": [
            {
                "action": "failed",
                "diagnosticCode": "smtp; 550 5.4.1 Recipient address rejected: Access denied. REDACTED",
                "emailAddress": "REDACTED@REDACTED.com",
                "status": "5.4.1"
            }
        ],
        "bounceSubType": "General",
        "bounceType": "Permanent",
        "feedbackId": "REDACTED",
        "remoteMtaIp": "REDACTED",
        "reportingMTA": "REDACTED",
        "timestamp": "2025-10-29T07:33:12.000Z"
    },
    "mail": {
        "callerIdentity": "gitlab",
        "commonHeaders": {
            "date": "Wed, 29 Oct 2025 07:33:11 +0000",
            "from": [
                "GitLab <gitlab@REDACTED>"
            ],
            "messageId": "<REDACTED@gitlab.mail>",
            "replyTo": [
                "GitLab <noreply@REDACTED>"
            ],
            "subject": "Take ownership of the pipeline schedule: NAME_OF_PIPELINE_REDACTED",
            "to": [
                "REDACTED_BLOCKED_USER@REDACTED"
            ]
        },
        "destination": [
            "REDACTED_BLOCKED_USER@REDACTED"
        ],
        "headers": [
            {
                "name": "Date",
                "value": "Wed, 29 Oct 2025 07:33:11 +0000"
            },
            {
                "name": "From",
                "value": "GitLab <gitlab@REDACTED>"
            },
            {
                "name": "Reply-To",
                "value": "GitLab <noreply@REDACTED>"
            },
            {
                "name": "To",
                "value": "REDACTED_BLOCKED_USER@REDACTED"
            },
            {
                "name": "Message-ID",
                "value": "<REDACTED@gitlab.mail>"
            },
            {
                "name": "Subject",
                "value": "Take ownership of the pipeline schedule: NAME_OF_PIPELINE_REDACTED"
            },
            {
                "name": "Mime-Version",
                "value": "1.0"
            },
            {
                "name": "Content-Type",
                "value": "multipart/alternative; boundary=\"--==_mimepart_REDACTED\"; charset=UTF-8"
            },
            {
                "name": "Content-Transfer-Encoding",
                "value": "7bit"
            },
            {
                "name": "Auto-Submitted",
                "value": "auto-generated"
            },
            {
                "name": "X-Auto-Response-Suppress",
                "value": "All"
            }
        ],
        "headersTruncated": false,
        "messageId": "REDACTED-000000",
        "sendingAccountId": "REDACTED",
        "source": "GitLab <gitlab@REDACTED>",
        "sourceArn": "arn:aws:ses:eu-west-1:REDACTED:identity/REDACTED",
        "sourceIp": "REDACTED",
        "timestamp": "2025-10-29T07:33:12.091Z"
    },
    "notificationType": "Bounce"
}

Results of GitLab environment info

gitlab_ee_package_version: "18.4.2-ee.0" gitlab_runner_version: "18.4.0"

Edited by 🤖 GitLab Bot 🤖