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
3769859a
Commit
3769859a
authored
Jan 07, 2021
by
Fabio Pitino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Spread CI minutes reset from 8 to 24 hours
parent
71c1db7a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
7 deletions
+12
-7
changelogs/unreleased/extend-ci-minutes-reset-window.yml
changelogs/unreleased/extend-ci-minutes-reset-window.yml
+5
-0
ee/app/workers/clear_shared_runners_minutes_worker.rb
ee/app/workers/clear_shared_runners_minutes_worker.rb
+1
-1
ee/spec/workers/clear_shared_runners_minutes_worker_spec.rb
ee/spec/workers/clear_shared_runners_minutes_worker_spec.rb
+6
-6
No files found.
changelogs/unreleased/extend-ci-minutes-reset-window.yml
0 → 100644
View file @
3769859a
---
title
:
Spread monthly CI minutes reset from 8 to 24 hours
merge_request
:
51084
author
:
type
:
performance
ee/app/workers/clear_shared_runners_minutes_worker.rb
View file @
3769859a
...
...
@@ -10,7 +10,7 @@ class ClearSharedRunnersMinutesWorker # rubocop:disable Scalability/IdempotentWo
feature_category
:continuous_integration
LEASE_TIMEOUT
=
3600
TIME_SPREAD
=
8
.
hours
.
seconds
.
freeze
TIME_SPREAD
=
24
.
hours
.
seconds
.
freeze
BATCH_SIZE
=
100_000
def
perform
...
...
ee/spec/workers/clear_shared_runners_minutes_worker_spec.rb
View file @
3769859a
...
...
@@ -146,13 +146,13 @@ RSpec.describe ClearSharedRunnersMinutesWorker do
stub_const
(
"
#{
described_class
}
::BATCH_SIZE"
,
3
)
end
it
'runs a worker per batch'
do
# Spread evenly accross
8 hours (288
00 seconds)
it
'runs a worker per batch'
,
:aggregate_failures
do
# Spread evenly accross
24 hours (86,4
00 seconds)
expect
(
Ci
::
BatchResetMinutesWorker
).
to
receive
(
:perform_in
).
with
(
0
.
seconds
,
2
,
4
)
expect
(
Ci
::
BatchResetMinutesWorker
).
to
receive
(
:perform_in
).
with
(
72
00
.
seconds
,
5
,
7
)
expect
(
Ci
::
BatchResetMinutesWorker
).
to
receive
(
:perform_in
).
with
(
144
00
.
seconds
,
8
,
10
)
expect
(
Ci
::
BatchResetMinutesWorker
).
to
receive
(
:perform_in
).
with
(
216
00
.
seconds
,
11
,
13
)
expect
(
Ci
::
BatchResetMinutesWorker
).
to
receive
(
:perform_in
).
with
(
288
00
.
seconds
,
14
,
16
)
expect
(
Ci
::
BatchResetMinutesWorker
).
to
receive
(
:perform_in
).
with
(
216
00
.
seconds
,
5
,
7
)
expect
(
Ci
::
BatchResetMinutesWorker
).
to
receive
(
:perform_in
).
with
(
432
00
.
seconds
,
8
,
10
)
expect
(
Ci
::
BatchResetMinutesWorker
).
to
receive
(
:perform_in
).
with
(
648
00
.
seconds
,
11
,
13
)
expect
(
Ci
::
BatchResetMinutesWorker
).
to
receive
(
:perform_in
).
with
(
864
00
.
seconds
,
14
,
16
)
subject
end
...
...
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