Manage scheduled scan execution pipeline concurrency
### Release notes
To optimize scan execution for scheduled pipelines, we have introduced time window distribution capabilities for scheduled scan execution policies. Users can now configure a `time_window` in their scan execution policies to distribute pipeline execution over a specified time period, preventing resource overload from simultaneous executions.
We also warn users when creating scan execution policies with scheduled pipelines to consider the scale and impact of enforcing scheduled pipelines across multiple projects.
These optimizations ensure improved performance and handling of pipelines triggered across an instance by providing users with fine-grained control over execution timing.
### Problem to solve
When triggering scheduled pipeline execution across an organization, having scheduled pipelines configured on group-level for large groups can quickly exhaust resources and slow down development, as all scans are executed simultaneously. This Epic addressed the need for user-level timing controls to distribute executions evenly across runners.
### Solution Delivered
#### 1. Time Window Configuration in Policies
Users can now specify a `time_window` in their scan execution policy YAML with:
- **value**: Duration in seconds for the time window
- **distribution**: Currently supports "random" distribution within the window
Example YAML:
```yaml
rules:
- type: schedule
cadence: "0 2 * * *"
time_window:
value: 3600
distribution: random
timezone: Etc/UTC
branch_type: all
```
#### 2. User Experience Improvements
- Warning messages for users creating scheduled policies on large groups (>1000 projects)
- Clear documentation on time window configuration
- Performance metrics and monitoring capabilities
### Key Benefits
- **Resource Protection**: Prevents overwhelming runners with simultaneous scan executions
- **Flexible Timing**: Users control when their scans execute within defined windows
- **User Awareness**: Clear warnings about potential performance impacts
- **Improved Performance**: Better distribution of workload across available resources
This solution provides users with direct control over when their scheduled scans execute, addressing the core performance concerns while maintaining usability through configurable time windows.
### Interested customers
* [https://gitlab.my.salesforce.com/0016100000sPty5](https://gitlab.my.salesforce.com/0016100000sPty5?srPos=0&srKp=001)
* https://gitlab.my.salesforce.com/0014M00001lcU8n
### Links / references
_This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc._
<!--triage-serverless v3 PLEASE DO NOT REMOVE THIS SECTION-->
epic