Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e869cbb8
Commit
e869cbb8
authored
Jul 23, 2019
by
Rubén Dávila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't send CI usage email notifications when quota is unlimited
parent
474e5368
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
0 deletions
+18
-0
ee/app/services/ci_minutes_usage_notify_service.rb
ee/app/services/ci_minutes_usage_notify_service.rb
+1
-0
ee/changelogs/unreleased/rd-do-not-send-ci-quota-notifications-when-quota-is-unlimited.yml
...t-send-ci-quota-notifications-when-quota-is-unlimited.yml
+5
-0
ee/spec/services/ci_minutes_usage_notify_service_spec.rb
ee/spec/services/ci_minutes_usage_notify_service_spec.rb
+12
-0
No files found.
ee/app/services/ci_minutes_usage_notify_service.rb
View file @
e869cbb8
...
...
@@ -3,6 +3,7 @@
class
CiMinutesUsageNotifyService
<
BaseService
def
execute
return
unless
::
Gitlab
.
com?
return
unless
namespace
.
shared_runners_minutes_limit_enabled?
notify_on_total_usage
notify_on_partial_usage
...
...
ee/changelogs/unreleased/rd-do-not-send-ci-quota-notifications-when-quota-is-unlimited.yml
0 → 100644
View file @
e869cbb8
---
title
:
Don't send CI usage email notifications when quota is unlimited
merge_request
:
14810
author
:
type
:
fixed
ee/spec/services/ci_minutes_usage_notify_service_spec.rb
View file @
e869cbb8
...
...
@@ -189,6 +189,18 @@ describe CiMinutesUsageNotifyService do
it_behaves_like
'no notification is sent'
end
context
'when quota is unlimited'
do
# Gitlab.com? => true is required in order to excercise the notification
let
(
:gitlab_dot_com
)
{
true
}
let
(
:ci_minutes_used
)
{
1500
}
before
do
namespace
.
update_attribute
(
:shared_runners_minutes_limit
,
0
)
end
it_behaves_like
'no notification is sent'
end
it_behaves_like
'notification for custom level is sent'
,
1500
,
30
context
'when other Pipeline has finished but second level of alert has not been reached'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment