Remove JenkinsDeprecatedService
What does this MR do?
Related to #1600 (closed)
Removes the deprecated CI service, JenkinsDeprecatedService
.
This MR is based on the work performed in:
Stats:
Total number of records to be removed: 4112
Number of active JenkinsDeprecatedService
records on GitLab.com
[ gprd ] production> JenkinsDeprecatedService.without_defaults.active.count
=> 757
Active projects using JenkinsDeprecatedService
this year:
gitlabhq_production=> SELECT date_trunc('year', last_activity_at) AS year, COUNT(*) FROM projects WHERE id IN (SELECT project_id FROM services WHERE type = 'JenkinsDeprecatedService' AND active) GROUP BY year ORDER BY year DESC;
year | count
------------------------+-------
2020-01-01 00:00:00+00 | 43
2019-01-01 00:00:00+00 | 94
2018-01-01 00:00:00+00 | 107
2017-01-01 00:00:00+00 | 57
2016-01-01 00:00:00+00 | 118
2015-01-01 00:00:00+00 | 294
2014-01-01 00:00:00+00 | 38
(7 rows)
gitlabhq_production=> SELECT id, last_activity_at FROM projects WHERE id IN (SELECT project_id FROM services WHERE type = 'JenkinsDeprecatedService' AND active) AND last_activity_at > '2020-01-01';
id | last_activity_at
----------+-------------------------------
123025 | 2020-03-09 08:23:09.329792+00
2116667 | 2020-03-23 08:11:08.564885+00
12379308 | 2020-03-30 07:44:28.852251+00
1539588 | 2020-03-27 10:50:11.777196+00
143138 | 2020-03-28 22:31:20.515136+00
711172 | 2020-03-29 14:30:29.557656+00
6567641 | 2020-01-28 15:02:46.250195+00
17088049 | 2020-03-06 09:00:03.721886+00
16290053 | 2020-01-17 05:12:31.156306+00
9346246 | 2020-03-26 01:22:00.220637+00
2819309 | 2020-03-25 11:36:33.159141+00
324796 | 2020-01-10 08:11:43.538468+00
9346207 | 2020-03-10 02:54:23.399035+00
14305393 | 2020-02-20 16:02:18.620378+00
250993 | 2020-03-30 07:28:37.582495+00
16893660 | 2020-03-04 16:09:33.559167+00
411183 | 2020-01-31 05:39:51.801375+00
324810 | 2020-01-10 08:11:54.964925+00
14991344 | 2020-02-12 09:19:16.972753+00
11562122 | 2020-01-29 08:01:50.914554+00
15107085 | 2020-02-06 09:29:49.110337+00
300673 | 2020-02-17 05:46:01.027178+00
500849 | 2020-02-13 11:14:14.021267+00
6117649 | 2020-02-06 06:09:47.210228+00
345533 | 2020-01-10 08:13:27.630293+00
5373566 | 2020-03-27 19:58:26.045558+00
1680494 | 2020-03-27 22:16:14.032502+00
369583 | 2020-03-30 07:03:19.474736+00
4225210 | 2020-03-30 05:11:44.163888+00
257944 | 2020-03-16 18:16:03.047546+00
9032697 | 2020-03-30 04:11:52.755477+00
177159 | 2020-03-29 22:33:26.436509+00
327898 | 2020-01-10 08:11:33.078192+00
17578087 | 2020-03-25 10:32:17.538334+00
9056306 | 2020-03-27 21:40:37.14085+00
3258386 | 2020-02-04 19:44:30.478107+00
124750 | 2020-03-30 07:01:20.791249+00
17172394 | 2020-03-05 08:55:15.850241+00
9346212 | 2020-02-22 05:42:41.341623+00
657492 | 2020-03-20 23:09:21.133711+00
371796 | 2020-03-27 03:04:18.218921+00
573834 | 2020-03-06 23:13:20.985074+00
241210 | 2020-03-30 01:11:06.874858+00
(43 rows)
Database changes
VERSION=20200511130129 bin/rake db:migrate:up
== 20200511130129 RemoveDeprecatedJenkinsServiceRecords: migrating ============
-- execute("DELETE FROM services WHERE type = 'JenkinsDeprecatedService';")
-> 0.0010s
== 20200511130129 RemoveDeprecatedJenkinsServiceRecords: migrated (0.0010s) ===
VERSION=20200511130129 bin/rake db:migrate:down
== 20200511130129 RemoveDeprecatedJenkinsServiceRecords: reverting ============
== 20200511130129 RemoveDeprecatedJenkinsServiceRecords: reverted (0.0000s) ===
VERSION=20200511130130 bin/rake db:migrate:up
== 20200511130130 EnsureDeprecatedJenkinsServiceRecordsRemoval: migrating =====
-- execute("DELETE FROM services WHERE type = 'JenkinsDeprecatedService';")
-> 0.0010s
== 20200511130130 EnsureDeprecatedJenkinsServiceRecordsRemoval: migrated (0.0011s)
VERSION=20200511130130 bin/rake db:migrate:down
== 20200511130130 EnsureDeprecatedJenkinsServiceRecordsRemoval: reverting =====
== 20200511130130 EnsureDeprecatedJenkinsServiceRecordsRemoval: reverted (0.0000s)
bin/rake db:migrate
== 20200511130129 RemoveDeprecatedJenkinsServiceRecords: migrating ============
-- execute("DELETE FROM services WHERE type = 'JenkinsDeprecatedService';")
-> 0.0010s
== 20200511130129 RemoveDeprecatedJenkinsServiceRecords: migrated (0.0011s) ===
== 20200511130130 EnsureDeprecatedJenkinsServiceRecordsRemoval: migrating =====
-- execute("DELETE FROM services WHERE type = 'JenkinsDeprecatedService';")
-> 0.0004s
== 20200511130130 EnsureDeprecatedJenkinsServiceRecordsRemoval: migrated (0.0004s)
Query details
ModifyTable on public.services (cost=0.56..5434.31 rows=4696 width=6) (actual time=2313.745..2313.745 rows=0 loops=1)
Buffers: shared hit=10300 read=1959 dirtied=1901
I/O Timings: read=2252.163
-> Index Scan using index_services_on_type on public.services (cost=0.56..5434.31 rows=4696 width=6) (actual time=28.422..2268.041 rows=4112 loops=1)
Index Cond: ((services.type)::text = 'JenkinsDeprecatedService'::text)
Buffers: shared hit=186 read=1954 dirtied=41
I/O Timings: read=2247.372
Summary:
Time: 2.938 s
- planning: 0.144 ms
- execution: 2.938 s
- I/O read: 2.252 s
- I/O write: 0.000 ms
Shared buffers:
- hits: 10300 (~80.50 MiB) from the buffer pool
- reads: 1959 (~15.30 MiB) from the OS file cache, including disk I/O
- dirtied: 1901 (~14.90 MiB)
- writes: 0
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Edited by Mayra Cabrera