Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add notification event DEPLOYMENT_STARTED #5340

Merged
merged 2 commits into from
Nov 15, 2024

Conversation

Warashi
Copy link
Contributor

@Warashi Warashi commented Nov 15, 2024

What this PR does:

as title

The users can receive notification when the deployments started.

I tested with Slack notification.

スクリーンショット 2024-11-15 9 33 10

Why we need it:

I want to know when the Deployment status changed to RUNNING.

Which issue(s) this PR fixes:

Part of #2002

Does this PR introduce a user-facing change?: Yes

  • How are users affected by this change:
    Users can configure the piped to send notifications when deployments start.

  • Is this breaking change: No

  • How to migrate (if breaking change): N/A

Comment on lines +67 to +71
message NotificationEventDeploymentStarted {
Deployment deployment = 1 [(validate.rules).message.required = true];
repeated string mentioned_accounts = 3;
repeated string mentioned_groups = 4;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I skipped field No. 2 because other codes skipped it.
I don't know why, but I think it's better to do the same as the other codes.

Copy link

codecov bot commented Nov 15, 2024

Codecov Report

Attention: Patch coverage is 0% with 40 lines in your changes missing coverage. Please review.

Project coverage is 25.31%. Comparing base (d4cdb13) to head (3330cb5).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
pkg/app/piped/controller/scheduler.go 0.00% 14 Missing ⚠️
pkg/app/pipedv1/controller/scheduler.go 0.00% 14 Missing ⚠️
pkg/app/piped/notifier/slack.go 0.00% 6 Missing ⚠️
pkg/app/pipedv1/notifier/slack.go 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5340      +/-   ##
==========================================
- Coverage   25.31%   25.31%   -0.01%     
==========================================
  Files         444      444              
  Lines       47601    47641      +40     
==========================================
+ Hits        12049    12059      +10     
- Misses      34609    34640      +31     
+ Partials      943      942       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@ffjlabo ffjlabo left a comment

Choose a reason for hiding this comment

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

Thank you! LGTM

@Warashi Warashi enabled auto-merge (squash) November 15, 2024 01:15
Copy link
Member

@khanhtc1202 khanhtc1202 left a comment

Choose a reason for hiding this comment

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

LGTM 👍
Note: We should have some kind of state machine chart on docs to show the event state order

@Warashi Warashi merged commit 00463a6 into master Nov 15, 2024
17 of 18 checks passed
@Warashi Warashi deleted the notification-event-deployment-started branch November 15, 2024 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants