[DATASEC-416] Unschedule no longer existing RCs #58037
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 242 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.329
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #58037"
general
weight: 0.35
vinckama
<!--Please give us some feedback on your experience writing this PR ! https://app.datadoghq.com/forms/43db4c02-6837-400c-8083-692e141b1b88 !-->
What does this PR do?
Unschedules
datasecuritychecks when their Data Security scan task is deleted from Remote Config.RC delivers the full set of active tasks for the product, so any RC path we scheduled but no longer receive is unscheduled.
update()also no longer returns early when there is only something to unschedule.Motivation
Deleted scan tasks stayed scheduled, since the provider only ever scheduled configs.
Describe how you validated your changes
Validated on a running agent using the image built by this PR's pipeline:
registry.ddbuild.io/ci/datadog-agent/agent:v144220347-303f7520-7-amd64.We now unschedule scan tasks that are no longer active once they are deleted from RC. After scanning was disabled upstream, the next planning cycle deleted the scan task from RC, which made the agent unschedule the check (last line, with no new check scheduled):
Additional Notes
A task re-delivered at the same RC path is always unscheduled then scheduled again, even if unchanged, so the check reruns. All tasks use the same
datasecurityconfig name.