Validate FKs p_ci_job_artifacts self managed
Ref: #439028 (closed)
What does this MR do and why?
Following up !144569 (merged) where we successfully added those FKs for gitlab.com.
This MR validates our new FKs for self-managed users.
This is a similar approach we used for ci_builds
in !122087 (merged).
Why are we doing this?
This is a prerequisite in order to partition this table.
Merge request reports
Activity
changed milestone to %16.10
assigned to @morefice
mentioned in issue #439028 (closed)
added workflowin review label and removed workflowin dev label
Database migrations (on the main database)
1 Warnings 20240219092326 - ValidateFkCiBuildTraceMetadataPCiJobArtifacts had a query that exceeded
timing guidelines. Run time should not exceed 100ms, but it was 516.79ms. Please consider possible
options to improve the query performance.SELECT $1 AS one
FROM "postgres_foreign_keys" WHERE "postgres_foreign_keys"."constrained_table_name" = $2 AND
"postgres_foreign_keys"."name" = $3
LIMIT $4Migrations included in this change have been executed on gitlab.com data for testing purposes. For details, please see the migration testing pipeline (limited access).
Migration Type Total runtime Result DB size change 20240219092326 - ValidateFkCiBuildTraceMetadataPCiJobArtifacts Post deploy 2.5 s +0.00 B 20240219092340 - ValidateFkCiJobArtifactStatesPCiJobArtifacts Post deploy 1.8 s +0.00 B Runtime Histogram for all migrations
Query Runtime Count 0 seconds - 0.01 seconds 0 0.01 seconds - 0.1 seconds 7 0.1 seconds - 1 second 1 1 second - 5 seconds 0 5 seconds - 15 seconds 0 15 seconds - 5 minutes 0 5 minutes + 0 Migration: 20240219092326 - ValidateFkCiBuildTraceMetadataPCiJobArtifacts- Type: Post deploy
- Duration: 2.5 s
- Database size change: +0.00 B
Calls Total Time Max Time Mean Time Rows Query 1 516.8 ms 516.8 ms 516.8 ms 1 SELECT $1 AS one
FROM "postgres_foreign_keys" WHERE "postgres_foreign_keys"."constrained_table_name" = $2 AND "postgres_foreign_keys"."name" = $3
LIMIT $41 0.7 ms 0.7 ms 0.7 ms 0 ALTER TABLE ci_build_trace_metadata VALIDATE CONSTRAINT tmp_fk_21d25cac1a_p
2 0.0 ms 0.0 ms 0.0 ms 2 SELECT pg_backend_pid()
Histogram for ValidateFkCiBuildTraceMetadataPCiJobArtifacts
Query Runtime Count 0 seconds - 0.01 seconds 0 0.01 seconds - 0.1 seconds 3 0.1 seconds - 1 second 1 1 second - 5 seconds 0 5 seconds - 15 seconds 0 15 seconds - 5 minutes 0 5 minutes + 0 Migration: 20240219092340 - ValidateFkCiJobArtifactStatesPCiJobArtifacts
- Type: Post deploy
- Duration: 1.8 s
- Database size change: +0.00 B
Calls Total Time Max Time Mean Time Rows Query 1 2.1 ms 2.1 ms 2.1 ms 1 SELECT $1 AS one
FROM "postgres_foreign_keys" WHERE "postgres_foreign_keys"."constrained_table_name" = $2 AND "postgres_foreign_keys"."name" = $3
LIMIT $41 0.3 ms 0.3 ms 0.3 ms 0 ALTER TABLE ci_job_artifact_states VALIDATE CONSTRAINT tmp_fk_rails_80a9cba3b2_p
2 0.0 ms 0.0 ms 0.0 ms 2 SELECT pg_backend_pid()
Histogram for ValidateFkCiJobArtifactStatesPCiJobArtifacts
Query Runtime Count 0 seconds - 0.01 seconds 0 0.01 seconds - 0.1 seconds 4 0.1 seconds - 1 second 0 1 second - 5 seconds 0 5 seconds - 15 seconds 0 15 seconds - 5 minutes 0 5 minutes + 0 Background Migration: BackfillDefaultOrganizationUsers
Sampled 119 batches. Estimated Time to complete: 1 week, 7 hours, and 6 minutes
- Interval: 120s
- Total tuple count: 15759400
- Max batch size: 10000
- Estimated seconds to complete: 630360s
- Estimated number of batches: 5253
- Average batch time: 4.11s
- Batch size: 3000
- N. of batches sampled: 119
- N. of failed batches: 0
Time estimation is conservative and based on sampling production data in a test environment. It represents the max time that migration could take. The actual time may differ from this estimation.
_Consider changing max_batch_size and interval if this estimate is unacceptable._
Calls Total Time Max Time Mean Time Rows Query 1428 8547.3 ms 240.5 ms 6.0 ms 356907 INSERT INTO organization_users (user_id, organization_id, access_level, created_at, updated_at) VALUES ($1, $2, $3, current_timestamp, current_timestamp), ($4, $5, $6, current_timestamp, current_timestamp), ($7, $8, $9, current_timestamp, current_timestamp), ($10, $11, $12, current_timestamp, current_timestamp), ($13, $14, $15, current_timestamp, current_timestamp), ($16, $17, $18, current_timestamp, current_timestamp), ($19, $20, $21, current_timestamp, current_timestamp), ($22, $23, $24, current_timestamp, current_timestamp), ($25, $26, $27, current_timestamp, current_timestamp), ($28, $29, $30, current_timestamp, current_timestamp), ($31, $32, $33, current_timestamp, current_timestamp), ($34, $35, $36, current_timestamp, current_timestamp), ($37, $38, $39, current_timestamp, current_timestamp), ($40, $41, $42, current_timestamp, current_timestamp), ($43, $44, $45, current_timestamp, current_timestamp), ($46, $47, $48, current_timestamp, current_timestamp), ($49, $50, $51, current_timestamp, current_timestamp), ($52, $53, $54, current_timestamp, current_timestamp), ($55, $56, $57, current_timestamp, current_timestamp), ($58, $59, $60, current_timestamp, current_timestamp), ($61, $62, $63, current_timestamp, current_timestamp), ($64, $65, $66, current_timestamp, current_timestamp), ($67, $68, $69, current_timestamp, current_timestamp), ($70, $71, $72, current_timestamp, current_timestamp), ($73, $74, $75, current_timestamp, current_timestamp), ($76, $77, $78, current_timestamp, current_timestamp), ($79, $80, $81, current_timestamp, current_timestamp), ($82, $83, $84, current_timestamp, current_timestamp), ($85, $86, $87, current_timestamp, current_timestamp), ($88, $89, $90, current_timestamp, current_timestamp), ($91, $92, $93, current_timestamp, current_timestamp), ($94, $95, $96, current_timestamp, current_timestamp), ($97, $98, $99, current_timestamp, current_timestamp), ($100, $101, $102, current_timestamp, current_timestamp), ($103, $104, $105, current_timestamp, current_timestamp), ($106, $107, $108, current_timestamp, current_timestamp), ($109, $110, $111, current_timestamp, current_timestamp), ($112, $113, $114, current_timestamp, current_timestamp), ($115, $116, $117, current_timestamp, current_timestamp), ($118, $119, $120, current_timestamp, current_timestamp), ($121, $122, $123, current_timestamp, current_timestamp), ($124, $125, $126, current_timestamp, current_timestamp), ($127, $128, $129, current_timestamp, current_timestamp), ($130, $131, $132, current_timestamp, current_timestamp), ($133, $134, $135, current_timestamp, current_timestamp), ($136, $137, $138, current_timestamp, current_timestamp), ($139, $140, $141, current_timestamp, current_timestamp), ($142, $143, $144, current_timestamp, current_timestamp), ($145, $146, $147, current_timestamp, current_timestamp), ($148, $149, $150, current_timestamp, current_timestamp), ($151, $152, $153, current_timestamp, current_timestamp), ($154, $155, $156, current_timestamp, current_timestamp), ($157, $158, $159, current_timestamp, current_timestamp), ($160, $161, $162, current_timestamp, current_timestamp), ($163, $164, $165, current_timestamp, current_timestamp), ($166, $167, $168, current_timestamp, current_timestamp), ($169, $170, $171, current_timestamp, current_timestamp), ($172, $173, $174, current_timestamp, current_timestamp), ($175, $176, $177, current_timestamp, current_timestamp), ($178, $179, $180, current_timestamp, current_timestamp), ($181, $182, $183, current_timestamp, current_timestamp), ($184, $185, $186, current_timestamp, current_timestamp), ($187, $188, $189, current_timestamp, current_timestamp), ($190, $191, $192, current_timestamp, current_timestamp), ($193, $194, $195, current_timestamp, current_timestamp), ($196, $197, $198, current_timestamp, current_timestamp), ($199, $200, $201, current_timestamp, current_timestamp), ($202, $203, $204, current_timestamp, current_timestamp), ($205, $206, $207, current_timestamp, current_timestamp), ($208, $209, $210, current_timestamp, current_timestamp), ($211, $212, $213, current_timestamp, current_timestamp), ($214, $215, $216, current_timestamp, current_timestamp), ($217, $218, $219, current_timestamp, current_timestamp), ($220, $221, $222, current_timestamp, current_timestamp), ($223, $224, $225, current_timestamp, current_timestamp), ($226, $227, $228, current_timestamp, current_timestamp), ($229, $230, $231, current_timestamp, current_timestamp), ($232, $233, $234, current_timestamp, current_timestamp), ($235, $236, $237, current_timestamp, current_timestamp), ($238, $239, $240, current_timestamp, current_timestamp), ($241, $242, $243, current_timestamp, current_timestamp), ($244, $245, $246, current_timestamp, current_timestamp), ($247, $248, $249, current_timestamp, current_timestamp), ($250, $251, $252, current_timestamp, current_timestamp), ($253, $254, $255, current_timestamp, current_timestamp), ($256, $257, $258, current_timestamp, current_timestamp), ($259, $260, $261, current_timestamp, current_timestamp), ($262, $263, $264, current_timestamp, current_timestamp), ($265, $266, $267, current_timestamp, current_timestamp), ($268, $269, $270, current_timestamp, current_timestamp), ($271, $272, $273, current_timestamp, current_timestamp), ($274, $275, $276, current_timestamp, current_timestamp), ($277, $278, $279, current_timestamp, current_timestamp), ($280, $281, $282, current_timestamp, current_timestamp), ($283, $284, $285, current_timestamp, current_timestamp), ($286, $287, $288, current_timestamp, current_timestamp), ($289, $290, $291, current_timestamp, current_timestamp), ($292, $293, $294, current_timestamp, current_timestamp), ($295, $296, $297, current_timestamp, current_timestamp), ($298, $299, $300, current_timestamp, current_timestamp), ($301, $302, $303, current_timestamp, current_timestamp), ($304, $305, $306, current_timestamp, current_timestamp), ($307, $308, $309, current_timestamp, current_timestamp), ($310, $311, $312, current_timestamp, current_timestamp), ($313, $314, $315, current_timestamp, current_timestamp), ($316, $317, $318, current_timestamp, current_timestamp), ($319, $320, $321, current_timestamp, current_timestamp), ($322, $323, $324, current_timestamp, current_timestamp), ($325, $326, $327, current_timestamp, current_timestamp), ($328, $329, $330, current_timestamp, current_timestamp), ($331, $332, $333, current_timestamp, current_timestamp), ($334, $335, $336, current_timestamp, current_timestamp), ($337, $338, $339, current_timestamp, current_timestamp), ($340, $341, $342, current_timestamp, current_timestamp), ($343, $344, $345, current_timestamp, current_timestamp), ($346, $347, $348, current_timestamp, current_timestamp), ($349, $350, $351, current_timestamp, current_timestamp), ($352, $353, $354, current_timestamp, current_timestamp), ($355, $356, $357, current_timestamp, current_timestamp), ($358, $359, $360, current_timestamp, current_timestamp), ($361, $362, $363, current_timestamp, current_timestamp), ($364, $365, $366, current_timestamp, current_timestamp), ($367, $368, $369, current_timestamp, current_timestamp), ($370, $371, $372, current_timestamp, current_timestamp), ($373, $374, $375, current_timestamp, current_timestamp), ($376, $377, $378, current_timestamp, current_timestamp), ($379, $380, $381, current_timestamp, current_timestamp), ($382, $383, $384, current_timestamp, current_timestamp), ($385, $386, $387, current_timestamp, current_timestamp), ($388, $389, $390, current_timestamp, current_timestamp), ($391, $392, $393, current_timestamp, current_timestamp), ($394, $395, $396, current_timestamp, current_timestamp), ($397, $398, $399, current_timestamp, current_timestamp), ($400, $401, $402, current_timestamp, current_timestamp), ($403, $404, $405, current_timestamp, current_timestamp), ($406, $407, $408, current_timestamp, current_timestamp), ($409, $410, $411, current_timestamp, current_timestamp), ($412, $413, $414, current_timestamp, current_timestamp), ($415, $416, $417, current_timestamp, current_timestamp), ($418, $419, $420, current_timestamp, current_timestamp), ($421, $422, $423, current_timestamp, current_timestamp), ($424, $425, $426, current_timestamp, current_timestamp), ($427, $428, $429, current_timestamp, current_timestamp), ($430, $431, $432, current_timestamp, current_timestamp), ($433, $434, $435, current_timestamp, current_timestamp), ($436, $437, $438, current_timestamp, current_timestamp), ($439, $440, $441, current_timestamp, current_timestamp), ($442, $443, $444, current_timestamp, current_timestamp), ($445, $446, $447, current_timestamp, current_timestamp), ($448, $449, $450, current_timestamp, current_timestamp), ($451, $452, $453, current_timestamp, current_timestamp), ($454, $455, $456, current_timestamp, current_timestamp), ($457, $458, $459, current_timestamp, current_timestamp), ($460, $461, $462, current_timestamp, current_timestamp), ($463, $464, $465, current_timestamp, current_timestamp), ($466, $467, $468, current_timestamp, current_timestamp), ($469, $470, $471, current_timestamp, current_timestamp), ($472, $473, $474, current_timestamp, current_timestamp), ($475, $476, $477, current_timestamp, current_timestamp), ($478, $479, $480, current_timestamp, current_timestamp), ($481, $482, $483, current_timestamp, current_timestamp), ($484, $485, $486, current_timestamp, current_timestamp), ($487, $488, $489, current_timestamp, current_timestamp), ($490, $491, $492, current_timestamp, current_timestamp), ($493, $494, $495, current_timestamp, current_timestamp), ($496, $497, $498, current_timestamp, current_timestamp), ($499, $500, $501, current_timestamp, current_timestamp), ($502, $503, $504, current_timestamp, current_timestamp), ($505, $506, $507, current_timestamp, current_timestamp), ($508, $509, $510, current_timestamp, current_timestamp), ($511, $512, $513, current_timestamp, current_timestamp), ($514, $515, $516, current_timestamp, current_timestamp), ($517, $518, $519, current_timestamp, current_timestamp), ($520, $521, $522, current_timestamp, current_timestamp), ($523, $524, $525, current_timestamp, current_timestamp), ($526, $527, $528, current_timestamp, current_timestamp), ($529, $530, $531, current_timestamp, current_timestamp), ($532, $533, $534, current_timestamp, current_timestamp), ($535, $536, $537, current_timestamp, current_timestamp), ($538, $539, $540, current_timestamp, current_timestamp), ($541, $542, $543, current_timestamp, current_timestamp), ($544, $545, $546, current_timestamp, current_timestamp), ($547, $548, $549, current_timestamp, current_timestamp), ($550, $551, $552, current_timestamp, current_timestamp), ($553, $554, $555, current_timestamp, current_timestamp), ($556, $557, $558, current_timestamp, current_timestamp), ($559, $560, $561, current_timestamp, current_timestamp), ($562, $563, $564, current_timestamp, current_timestamp), ($565, $566, $567, current_timestamp, current_timestamp), ($568, $569, $570, current_timestamp, current_timestamp), ($571, $572, $573, current_timestamp, current_timestamp), ($574, $575, $576, current_timestamp, current_timestamp), ($577, $578, $579, current_timestamp, current_timestamp), ($580, $581, $582, current_timestamp, current_timestamp), ($583, $584, $585, current_timestamp, current_timestamp), ($586, $587, $588, current_timestamp, current_timestamp), ($589, $590, $591, current_timestamp, current_timestamp), ($592, $593, $594, current_timestamp, current_timestamp), ($595, $596, $597, current_timestamp, current_timestamp), ($598, $599, $600, current_timestamp, current_timestamp), ($601, $602, $603, current_timestamp, current_timestamp), ($604, $605, $606, current_timestamp, current_timestamp), ($607, $608, $609, current_timestamp, current_timestamp), ($610, $611, $612, current_timestamp, current_timestamp), ($613, $614, $615, current_timestamp, current_timestamp), ($616, $617, $618, current_timestamp, current_timestamp), ($619, $620, $621, current_timestamp, current_timestamp), ($622, $623, $624, current_timestamp, current_timestamp), ($625, $626, $627, current_timestamp, current_timestamp), ($628, $629, $630, current_timestamp, current_timestamp), ($631, $632, $633, current_timestamp, current_timestamp), ($634, $635, $636, current_timestamp, current_timestamp), ($637, $638, $639, current_timestamp, current_timestamp), ($640, $641, $642, current_timestamp, current_timestamp), ($643, $644, $645, current_timestamp, current_timestamp), ($646, $647, $648, current_timestamp, current_timestamp), ($649, $650, $651, current_timestamp, current_timestamp), ($652, $653, $654, current_timestamp, current_timestamp), ($655, $656, $657, current_timestamp, current_timestamp), ($658, $659, $660, current_timestamp, current_timestamp), ($661, $662, $663, current_timestamp, current_timestamp), ($664, $665, $666, current_timestamp, current_timestamp), ($667, $668, $669, current_timestamp, current_timestamp), ($670, $671, $672, current_timestamp, current_timestamp), ($673, $674, $675, current_timestamp, current_timestamp), ($676, $677, $678, current_timestamp, current_timestamp), ($679, $680, $681, current_timestamp, current_timestamp), ($682, $683, $684, current_timestamp, current_timestamp), ($685, $686, $687, current_timestamp, current_timestamp), ($688, $689, $690, current_timestamp, current_timestamp), ($691, $692, $693, current_timestamp, current_timestamp), ($694, $695, $696, current_timestamp, current_timestamp), ($697, $698, $699, current_timestamp, current_timestamp), ($700, $701, $702, current_timestamp, current_timestamp), ($703, $704, $705, current_timestamp, current_timestamp), ($706, $707, $708, current_timestamp, current_timestamp), ($709, $710, $711, current_timestamp, current_timestamp), ($712, $713, $714, current_timestamp, current_timestamp), ($715, $716, $717, current_timestamp, current_timestamp), ($718, $719, $720, current_timestamp, current_timestamp), ($721, $722, $723, current_timestamp, current_timestamp), ($724, $725, $726, current_timestamp, current_timestamp), ($727, $728, $729, current_timestamp, current_timestamp), ($730, $731, $732, current_timestamp, current_timestamp), ($733, $734, $735, current_timestamp, current_timestamp), ($736, $737, $738, current_timestamp, current_timestamp), ($739, $740, $741, current_timestamp, current_timestamp), ($742, $743, $744, current_timestamp, current_timestamp), ($745, $746, $747, current_timestamp, current_timestamp), ($748, $749, $750, current_timestamp, current_timestamp) ON CONFLICT (organization_id, user_id) DO
UPDATE
SET updated_at =
CASE WHEN organization_users.access_level IS NOT DISTINCT
FROM excluded.access_level THEN organization_users.updated_at ELSE current_timestamp END, access_level = excluded.access_level1309 809.1 ms 92.5 ms 0.6 ms 327250 SELECT users.id
FROM users
WHERE users.id BETWEEN $1 AND $2 AND users.admin = $3 AND users.id >= $4 AND users.id < $51428 729.5 ms 13.1 ms 0.5 ms 1309 SELECT users.id
FROM users
WHERE users.id BETWEEN $1 AND $2 AND users.admin = $3 AND users.id >= $4
ORDER BY users.id ASC
LIMIT $5
OFFSET $6238 50.4 ms 11.3 ms 0.2 ms 238 INSERT INTO batched_background_migration_job_transition_logs (batched_background_migration_job_id, created_at, updated_at, previous_status, next_status) VALUES ($1, $2, $3, $4, $5) RETURNING id
119 50.9 ms 9.0 ms 0.4 ms 119 UPDATE batched_background_migration_jobs
SET updated_at = $1, finished_at = $2, status = $3, metrics = $4
WHERE batched_background_migration_jobs.id = $5119 65.3 ms 3.2 ms 0.5 ms 29657 SELECT users.id
FROM users
WHERE users.id BETWEEN $1 AND $2 AND users.admin = $3 AND users.id >= $4119 8.3 ms 2.9 ms 0.1 ms 119 SELECT batched_background_migrations.*
FROM batched_background_migrations
WHERE batched_background_migrations.id = $1
LIMIT $2119 23.2 ms 2.2 ms 0.2 ms 119 UPDATE batched_background_migration_jobs
SET updated_at = $1, started_at = $2, status = $3, attempts = $4
WHERE batched_background_migration_jobs.id = $5119 12.4 ms 0.8 ms 0.1 ms 119 SELECT sum(batched_background_migration_jobs.batch_size)
FROM batched_background_migration_jobs
WHERE batched_background_migration_jobs.batched_background_migration_id = $1 AND batched_background_migration_jobs.status IN ($2)238 12.9 ms 0.5 ms 0.1 ms 238 SELECT batched_background_migration_jobs.*
FROM batched_background_migration_jobs
WHERE batched_background_migration_jobs.id = $1
LIMIT $2119 5.4 ms 0.4 ms 0.0 ms 119 SELECT users.id
FROM users
WHERE users.id BETWEEN $1 AND $2 AND users.admin = $3
ORDER BY users.id ASC
LIMIT $4Histogram of batch runtimes for BackfillDefaultOrganizationUsers
Batch Runtime Count 0 seconds - 10 seconds 119 10 seconds - 1 minute 0 1 minute - 2 minutes 0 2 minutes - 3 minutes 0 3 minutes - 5 minutes 0 5 minutes + 0 Histogram across all sampled batches of BackfillDefaultOrganizationUsers
Query Runtime Count 0 seconds - 0.1 seconds 5174 0.1 seconds - 0.5 seconds 181 0.5 seconds - 1 second 0 1 second - 2 seconds 0 2 seconds - 5 seconds 0 5 seconds + 0 Other information
Other migrations pending on GitLab.com
Migration Type Total runtime Result DB size change 20240124043507 - MigrateSidekiqQueuedAndFutureJobs Post deploy 2.7 s +0.00 B 20240209153126 - AddTmpIndexForSucceededSecurityScans Post deploy 168.6 s +135.73 MiB 20240209153920 - QueuePurgeSecurityScansWithEmptyFindingData Post deploy 1.6 s +0.00 B 20240212120012 - RemoveIndexOnPipelineMetadata Post deploy 2.1 s -8.00 KiB 20240213210124 - QueueBackfillDefaultOrganizationUsers Post deploy 2.0 s +0.00 B 20240214204757 - FinalizeFindingIdMigrations Post deploy 1.9 s +0.00 B 20240214204805 - MakeFindingIdNotNull Post deploy 223.7 s +0.00 B 20240222000000 - RemovePackagesProtectionRulesPackageNamePatternIlikeQueryColumn Post deploy 1.9 s +0.00 B Clone details
Clone ID Clone Created At Clone Data Timestamp Expected Removal Time database-testing-2882718-12889593-main
2024-02-19T10:05:01Z 2024-02-19T08:08:50Z 2024-02-19 22:35:13 +0000 database-testing-2882718-12889593-ci
2024-02-19T10:05:01Z 2024-02-19T08:46:58Z 2024-02-19 22:35:13 +0000 Database migrations (on the ci database)
1 Warnings 20240219092326 - ValidateFkCiBuildTraceMetadataPCiJobArtifacts had a query that exceeded
timing guidelines. Run time should not exceed 100ms, but it was 725.03ms. Please consider possible
options to improve the query performance.SELECT $1 AS one
FROM "postgres_foreign_keys" WHERE "postgres_foreign_keys"."constrained_table_name" = $2 AND
"postgres_foreign_keys"."name" = $3
LIMIT $4Migrations included in this change have been executed on gitlab.com data for testing purposes. For details, please see the migration testing pipeline (limited access).
Migration Type Total runtime Result DB size change 20240219092326 - ValidateFkCiBuildTraceMetadataPCiJobArtifacts Post deploy 3.6 s +0.00 B 20240219092340 - ValidateFkCiJobArtifactStatesPCiJobArtifacts Post deploy 2.8 s +0.00 B Runtime Histogram for all migrations
Query Runtime Count 0 seconds - 0.01 seconds 0 0.01 seconds - 0.1 seconds 7 0.1 seconds - 1 second 1 1 second - 5 seconds 0 5 seconds - 15 seconds 0 15 seconds - 5 minutes 0 5 minutes + 0 Migration: 20240219092326 - ValidateFkCiBuildTraceMetadataPCiJobArtifacts- Type: Post deploy
- Duration: 3.6 s
- Database size change: +0.00 B
Calls Total Time Max Time Mean Time Rows Query 1 725.0 ms 725.0 ms 725.0 ms 1 SELECT $1 AS one
FROM "postgres_foreign_keys" WHERE "postgres_foreign_keys"."constrained_table_name" = $2 AND "postgres_foreign_keys"."name" = $3
LIMIT $41 1.7 ms 1.7 ms 1.7 ms 0 ALTER TABLE ci_build_trace_metadata VALIDATE CONSTRAINT tmp_fk_21d25cac1a_p
2 0.0 ms 0.0 ms 0.0 ms 2 SELECT pg_backend_pid()
Histogram for ValidateFkCiBuildTraceMetadataPCiJobArtifacts
Query Runtime Count 0 seconds - 0.01 seconds 0 0.01 seconds - 0.1 seconds 3 0.1 seconds - 1 second 1 1 second - 5 seconds 0 5 seconds - 15 seconds 0 15 seconds - 5 minutes 0 5 minutes + 0 Migration: 20240219092340 - ValidateFkCiJobArtifactStatesPCiJobArtifacts
- Type: Post deploy
- Duration: 2.8 s
- Database size change: +0.00 B
Calls Total Time Max Time Mean Time Rows Query 1 2.4 ms 2.4 ms 2.4 ms 1 SELECT $1 AS one
FROM "postgres_foreign_keys" WHERE "postgres_foreign_keys"."constrained_table_name" = $2 AND "postgres_foreign_keys"."name" = $3
LIMIT $41 2.0 ms 2.0 ms 2.0 ms 0 ALTER TABLE ci_job_artifact_states VALIDATE CONSTRAINT tmp_fk_rails_80a9cba3b2_p
2 0.0 ms 0.0 ms 0.0 ms 2 SELECT pg_backend_pid()
Histogram for ValidateFkCiJobArtifactStatesPCiJobArtifacts
Query Runtime Count 0 seconds - 0.01 seconds 0 0.01 seconds - 0.1 seconds 4 0.1 seconds - 1 second 0 1 second - 5 seconds 0 5 seconds - 15 seconds 0 15 seconds - 5 minutes 0 5 minutes + 0 Other information
Other migrations pending on GitLab.com
Migration Type Total runtime Result DB size change 20240124043507 - MigrateSidekiqQueuedAndFutureJobs Post deploy 2.8 s +0.00 B 20240209153126 - AddTmpIndexForSucceededSecurityScans Post deploy 3.4 s +8.00 KiB [note] 20240209153920 - QueuePurgeSecurityScansWithEmptyFindingData Post deploy 2.4 s +0.00 B 20240212120012 - RemoveIndexOnPipelineMetadata Post deploy 2.8 s -660.27 MiB 20240213210124 - QueueBackfillDefaultOrganizationUsers Post deploy 2.5 s +0.00 B 20240214204757 - FinalizeFindingIdMigrations Post deploy 2.4 s +0.00 B 20240214204805 - MakeFindingIdNotNull Post deploy 3.0 s +0.00 B 20240222000000 - RemovePackagesProtectionRulesPackageNamePatternIlikeQueryColumn Post deploy 3.0 s +0.00 B Clone details
Clone ID Clone Created At Clone Data Timestamp Expected Removal Time database-testing-2882718-12889593-main
2024-02-19T10:05:01Z 2024-02-19T08:08:50Z 2024-02-19 22:35:13 +0000 database-testing-2882718-12889593-ci
2024-02-19T10:05:01Z 2024-02-19T08:46:58Z 2024-02-19 22:35:13 +0000
Brought to you by gitlab-org/database-team/gitlab-com-database-testing. Epic
Edited by Ghost User- A deleted user
added databasereview pending label
2 Warnings 21ae2540: Commits that change 30 or more lines across at least 3 files should describe these changes in the commit body. For more information, take a look at our Commit message guidelines. You've made some app changes, but didn't add any tests.
That's OK as long as you're refactoring existing code,
but please consider adding any of the maintenancepipelines, maintenancerefactor, maintenanceworkflow, documentation, QA labels.2 Messages CHANGELOG missing: If this merge request needs a changelog entry, add the
Changelog
trailer to the commit message you want to add to the changelog.If this merge request doesn't need a CHANGELOG entry, feel free to ignore this message.
This merge request adds or changes files that require a review from the Database team. This merge request requires a database review. To make sure these changes are reviewed, take the following steps:
- Ensure the merge request has database and databasereview pending labels. If the merge request modifies database files, Danger will do this for you.
- Prepare your MR for database review according to the docs.
- Assign and mention the database reviewer suggested by Reviewer Roulette.
The following files require a review from the Database team:
db/post_migrate/20240219092326_validate_fk_ci_build_trace_metadata_p_ci_job_artifacts.rb
db/post_migrate/20240219092340_validate_fk_ci_job_artifact_states_p_ci_job_artifacts.rb
db/schema_migrations/20240219092326
db/schema_migrations/20240219092340
db/structure.sql
Reviewer roulette
Category Reviewer Maintainer database @dgruzd
(UTC+1, same timezone as author)
@tigerwnz
(UTC+11, 10 hours ahead of author)
Please check reviewer's status!
Please refer to documentation page for guidance on how you can benefit from the Reviewer Roulette, or use the GitLab Review Workload Dashboard to find other available reviewers.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
DangerEdited by Ghost User- A deleted user
added Data WarehouseImpact Check label
- A deleted user
added database-testing-automation label
added 1 commit
- 21ae2540 - Validate FKs p_ci_job_artifacts self managed
requested review from @panoskanell
- Resolved by Marius Bobin
@panoskanell can you review this MR please?
- Resolved by Marius Bobin
@panoskanell
, thanks for approving this merge request.This is the first time the merge request has been approved. To ensure we don't only run predictive pipelines, and we don't break
master
, a new pipeline will be started shortly.Please wait for the pipeline to start before resolving this discussion and set auto-merge for the new pipeline. See merging a merge request for more details.
added pipeline:mr-approved label
requested review from @mbobin and removed review request for @panoskanell
E2E Test Result Summary
allure-report-publisher
generated test report!e2e-test-on-gdk:
test report for 21ae2540expand test summary
+------------------------------------------------------------------+ | suites summary | +-------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +-------------+--------+--------+---------+-------+-------+--------+ | Verify | 31 | 0 | 0 | 0 | 31 | ✅ | | Plan | 4 | 0 | 0 | 0 | 4 | ✅ | | Create | 8 | 0 | 3 | 0 | 11 | ✅ | | Govern | 3 | 0 | 0 | 0 | 3 | ✅ | | Data Stores | 2 | 0 | 0 | 0 | 2 | ✅ | | Monitor | 4 | 0 | 0 | 0 | 4 | ✅ | | Package | 0 | 0 | 1 | 0 | 1 | ➖ | +-------------+--------+--------+---------+-------+-------+--------+ | Total | 52 | 0 | 4 | 0 | 56 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+
e2e-package-and-test:
test report for 21ae2540expand test summary
+------------------------------------------------------------------+ | suites summary | +-------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +-------------+--------+--------+---------+-------+-------+--------+ | Verify | 150 | 0 | 27 | 6 | 177 | ✅ | | Create | 148 | 0 | 24 | 4 | 172 | ✅ | | Package | 0 | 0 | 2 | 0 | 2 | ➖ | | Govern | 6 | 0 | 0 | 0 | 6 | ✅ | | Monitor | 8 | 0 | 0 | 0 | 8 | ✅ | | Plan | 8 | 0 | 0 | 0 | 8 | ✅ | | Data Stores | 4 | 0 | 0 | 0 | 4 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+ | Total | 324 | 0 | 53 | 10 | 377 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+
Edited by Ghost User