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
260793db
Commit
260793db
authored
Sep 10, 2020
by
Alan (Maciej) Paruszewski
Committed by
Toon Claes
Sep 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix error in migration to populate historical vulnerability statistics
parent
60a89b28
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
2 deletions
+24
-2
ee/changelogs/unreleased/238456-fix-broken-populate-vulnerability-statistics-migrations.yml
...x-broken-populate-vulnerability-statistics-migrations.yml
+5
-0
ee/lib/ee/gitlab/background_migration/populate_vulnerability_historical_statistics.rb
...migration/populate_vulnerability_historical_statistics.rb
+4
-1
ee/spec/lib/ee/gitlab/background_migration/populate_vulnerability_historical_statistics_spec.rb
...tion/populate_vulnerability_historical_statistics_spec.rb
+1
-1
lib/gitlab/background_migration/populate_vulnerability_historical_statistics.rb
...migration/populate_vulnerability_historical_statistics.rb
+14
-0
No files found.
ee/changelogs/unreleased/238456-fix-broken-populate-vulnerability-statistics-migrations.yml
0 → 100644
View file @
260793db
---
title
:
Fix error in migration to populate historical vulnerability statistics
merge_request
:
40835
author
:
type
:
fixed
ee/lib/ee/gitlab/background_migration/populate_vulnerability_historical_statistics.rb
View file @
260793db
...
...
@@ -5,7 +5,10 @@ module EE
module
BackgroundMigration
# This class creates/updates those project historical vulnerability statistics
# that haven't been created nor initialized.
class
PopulateVulnerabilityHistoricalStatistics
module
PopulateVulnerabilityHistoricalStatistics
extend
::
Gitlab
::
Utils
::
Override
override
:perform
def
perform
(
project_ids
)
project_ids
.
each
do
|
project_id
|
upsert_vulnerability_historical_statistics
(
project_id
)
...
...
ee/spec/lib/ee/gitlab/background_migration/populate_vulnerability_historical_statistics_spec.rb
View file @
260793db
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
EE
::
Gitlab
::
BackgroundMigration
::
PopulateVulnerabilityHistoricalStatistics
,
schema:
2020_08_21_224343
do
RSpec
.
describe
Gitlab
::
BackgroundMigration
::
PopulateVulnerabilityHistoricalStatistics
,
schema:
2020_08_21_224343
do
let
(
:users
)
{
table
(
:users
)
}
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:vulnerabilities
)
{
table
(
:vulnerabilities
)
}
...
...
lib/gitlab/background_migration/populate_vulnerability_historical_statistics.rb
0 → 100644
View file @
260793db
# frozen_string_literal: true
module
Gitlab
module
BackgroundMigration
# This class creates/updates those project historical vulnerability statistics
# that haven't been created nor initialized. It should only be executed in EE.
class
PopulateVulnerabilityHistoricalStatistics
def
perform
(
project_ids
)
end
end
end
end
Gitlab
::
BackgroundMigration
::
PopulateVulnerabilityHistoricalStatistics
.
prepend_if_ee
(
'EE::Gitlab::BackgroundMigration::PopulateVulnerabilityHistoricalStatistics'
)
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