Skip to content

fix(notifications): handle pipelines without a project or hook - #1437

Open
dexyk wants to merge 1 commit into
mainfrom
dk/notifications/pipeline_without_project_or_hook
Open

dexyk wants to merge 1 commit into
mainfrom
dk/notifications/pipeline_without_project_or_hook

Conversation

@dexyk

@dexyk dexyk commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

📝 Description

The finished-pipeline consumer raised in two cases, so the event was retried and then dead-lettered:

  • The pipeline finished after its project was deleted. The event is now acknowledged and skipped, with an info log and a pipeline_finished_notifier.project_not_found counter.
  • The pipeline's hook could not be described. Slack and webhook messages are now built from the pipeline's commit and reference, and a pipeline_finished_notifier.hook_not_found counter is incremented. The Slack message leaves out the author and commit link. The webhook payload keeps its shape, with empty repository and sender fields.

Messages for pipelines with a hook are unchanged. New tests cover a missing project, a missing hook, and tag and pull request hooks. Without this change, the missing-project and missing-hook tests fail.

✅ Checklist

  • I have tested this change
  • This change requires documentation update

A pipeline can finish after its project is deleted. The finished-pipeline
consumer now acknowledges such events without notifying, and logs and
counts them, instead of raising on every delivery.

When a pipeline's hook cannot be described, Slack and webhook messages
are built from the pipeline's commit and reference. Messages for
pipelines with a hook are unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant