Run ES backfill for risk score before finalization on self-managed
We want to ensure self-managed ES backfill for risk score runs as soon as the BBM is completed in %18.7 instead of waiting for finalisation in %18.9.
The ES backfill for Dedicated is being addressed in %18.7 (aimed at the earlier days of %18.7) with !211551 (diffs).
Once the self-managed ES vulnerablities support is closer (at the later days of %18.7), we can modify the same ES backfill migration that we created for dedicated (!211551) and modify it to run on all installations.
The change required on the already merged MR would be like below:
diff --git a/ee/elastic/migrate/20251105111253_backfill_risk_score_in_vulnerabilities_dedicated.rb b/ee/elastic/migrate/20251105111253_backfill_risk_score_in_vulnerabilities_dedicated.rb
index 854a5923cc7b..8e7e71fcd4a6 100644
--- a/ee/elastic/migrate/20251105111253_backfill_risk_score_in_vulnerabilities_dedicated.rb
+++ b/ee/elastic/migrate/20251105111253_backfill_risk_score_in_vulnerabilities_dedicated.rb
@@ -3,7 +3,7 @@
class BackfillRiskScoreInVulnerabilitiesDedicated < Elastic::Migration
include ::Search::Elastic::MigrationDatabaseBackfillHelper
- skip_if -> { !dedicated_with_es? || !backfill_vulnerability_finding_risk_scores_completed? }
+ skip_if -> { !backfill_vulnerability_finding_risk_scores_completed? }
batch_size 30_000
batched!
@@ -25,7 +25,7 @@ def self.backfill_vulnerability_finding_risk_scores_completed?
)
end
- migration&.finalized?
+ migration&.finished? || migration&.finalized?
end
# We do not honour this setting for Dedicated.
Edited by 🤖 GitLab Bot 🤖