Bojan Marjanovic (c6cb1d80) at 17 Mar 15:55
Bojan Marjanovic (526f1262) at 17 Mar 15:54
Merge branch 'mg/cells-claims-backfill' into 'master'
... and 1 more commit
Implements the Cells::Claims::VerificationService to backfill Cells claims between Rails database and the Topology Service. The verification service iterates over all records for a given model in batches, compares them against what the Topology Service has, and commits the diff (creates for records missing in TS, destroys for orphaned TS records). This ensures claims remain in sync even when prior writes were missed.
This MR specifically implements the backfill portion as part of the whole Verification Loop.
Cells::Claims::VerificationService.new(User).execute
claims table in gdk psql -d topology_service
2 * number of users record in Rails (because User has 2 claimable attributes, thus 2x the amount in TS)Evaluate this MR against the MR acceptance checklist (https://docs.gitlab.com/ee/development/code_review.html#acceptance-checklist)
Persist per-project schedules for scan execution policies
Add the security_scan_execution_project_schedules table and ScanExecutionProjectSchedule model to persist per-project random offsets for scheduled scan execution policies.
The RuleScheduleService now creates a project schedule row on every execution (behind the scan_execution_policy_project_schedule_creation feature flag).
.for_rule_schedule
SELECT "security_policies".* FROM "security_policies" WHERE "security_policies"."type" = 1 AND "security_policies"."security_orchestration_policy_configuration_id" = 309 AND "security_policies"."policy_index" = 0
Plan: https://console.postgres.ai/gitlab/gitlab-production-main/sessions/49791/commands/148219
Feature.enable(:scan_execution_policy_project_schedule_creation)
scan_execution_policy:
- name: Secrets on schedule
description: ''
enabled: true
actions:
- scan: secret_detection
template: latest
variables:
SECURE_ENABLE_LOCAL_CONFIGURATION: 'false'
rules:
- type: schedule
cadence: 0 0 1 * *
branch_type: default
timezone: Europe/Zurich
skip_ci:
allowed: true
schedule = Security::OrchestrationPolicyRuleSchedule.last
schedule.update_columns(next_run_at: 1.day.ago) && Security::OrchestrationPolicyRuleScheduleWorker.new.perform
schedule.project_schedules
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #592731
Implements the Cells::Claims::VerificationService to backfill Cells claims between Rails database and the Topology Service. The verification service iterates over all records for a given model in batches, compares them against what the Topology Service has, and commits the diff (creates for records missing in TS, destroys for orphaned TS records). This ensures claims remain in sync even when prior writes were missed.
This MR specifically implements the backfill portion as part of the whole Verification Loop.
Cells::Claims::VerificationService.new(User).execute
claims table in gdk psql -d topology_service
2 * number of users record in Rails (because User has 2 claimable attributes, thus 2x the amount in TS)Evaluate this MR against the MR acceptance checklist (https://docs.gitlab.com/ee/development/code_review.html#acceptance-checklist)
Thanks @bdenkovych
The MR was already in great shape, the ordering column is something you can pick-up quickly.
Thanks @mdangelo6
The database side LGTM!
description_versions table, setting issue_id to the value of the corresponding epic's issue_id, and setting epic_id to null.Not provided
https://console.postgres.ai/gitlab/gitlab-production-main/sessions/49881/commands/148334
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #454439
Bojan Marjanovic (3848a081) at 17 Mar 12:24
Edit README.md
Hey @ajaythomasinc
could you please review this tiny change?
As per https://gitlab.com/gitlab-com/team-member-epics/employment/-/work_items/9015, I'm updating my team's page and team's tag.
π‘ Provide a detailed answer to the question on why this change is being proposed, in accordance with our value of Transparency.Please add the details saying why, not just what in this section. Example:
We have discussed the topic in Slack - (copy of Slack conversation). The current process is not efficient, this MR makes the description of X more clear, and helps move Y forward.
CHANGEME
Please verify the check list and ensure to tick them off before the MR is merged.
Maintained by section on the page being editedBojan Marjanovic (768a1190) at 17 Mar 12:20
Update bmarjanovic team tag
Implements the Cells::Claims::VerificationService to backfill Cells claims between Rails database and the Topology Service. The verification service iterates over all records for a given model in batches, compares them against what the Topology Service has, and commits the diff (creates for records missing in TS, destroys for orphaned TS records). This ensures claims remain in sync even when prior writes were missed.
This MR specifically implements the backfill portion as part of the whole Verification Loop.
Cells::Claims::VerificationService.new(User).execute
claims table in gdk psql -d topology_service
2 * number of users record in Rails (because User has 2 claimable attributes, thus 2x the amount in TS)Evaluate this MR against the MR acceptance checklist (https://docs.gitlab.com/ee/development/code_review.html#acceptance-checklist)