fix(pipedv1): use correct event for deployment notification mentions - #7382
Open
Vishakha7-Kumari wants to merge 1 commit into
Open
Vishakha7-Kumari wants to merge 1 commit into
Vishakha7-Kumari wants to merge 1 commit into
Conversation
The succeeded and failed branches of reportDeploymentCompleted resolved the Slack mention accounts and groups using EVENT_DEPLOYMENT_CANCELLED, while the notification itself was sent as EVENT_DEPLOYMENT_SUCCEEDED / EVENT_DEPLOYMENT_FAILED. As a result, mentions configured for the succeeded and failed events were silently ignored, and the mentions configured for the cancelled event were used instead. Pass the matching event to getApplicationNotificationMentions, mirroring the legacy piped implementation, and add a regression test covering all three completed statuses. Signed-off-by: Vishakha7-Kumari <singhdaisy669@gmail.com>
✅ Deploy Preview for pipecd-site canceled.
|
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved review comments remain, and regression coverage was added.
Pull request overview
Updates deployment notifications to use status-specific mention events, with regression coverage.
Changes:
- Correct success and failure event lookups.
- Add tests for success, failure, and cancellation mentions.
File summaries
| File | Summary |
|---|---|
pkg/app/pipedv1/controller/scheduler.go |
Uses matching notification event types. |
pkg/app/pipedv1/controller/scheduler_test.go |
Tests event-specific mention selection. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Fixes Slack mention resolution for completed deployments in
pipedv1.In
reportDeploymentCompleted, the succeeded and failed branches were resolving mention accounts/groups usingEVENT_DEPLOYMENT_CANCELLED, even though the actual notification events areEVENT_DEPLOYMENT_SUCCEEDEDandEVENT_DEPLOYMENT_FAILED.Why
Because of this, mentions configured under
deploymentNotification.mentionsforDEPLOYMENT_SUCCEEDEDandDEPLOYMENT_FAILEDwere being ignored, and the cancelled-event mentions were used instead.The legacy piped implementation already handles this correctly (
pkg/app/piped/controller/scheduler.go:736,751), so this brings pipedv1 in line with it.Also adds a regression test covering succeeded, failed, and cancelled deployments.
Which issue(s) this PR fixes
Fixes #
Does this PR introduce a user-facing change?