Issue Promotion Failing Due to Timeout on System Notes
Problem
Issue promotion (both via UI Change Type option and /promote quick action) is failing with timeout errors when attempting to promote issues that have a large number of system notes. The promotion process times out during the notes copying operation within the 60-second request limit.
/promote command returns errors: "Unexpected token '<', "<!DOCTYPE "... is not valid JSON" followed by various timeout messages
Root Cause
The current promotion process uses IssuePromoteService with legacy Issuable::Clone::BaseService, which copies system notes one at a time within a single transaction. For issues with many system notes, this operation exceeds the request timeout (60s) and causes the promotion to fail.
Proposed Solution:
Migrate issue promotion to use DataSync services, which:
- Perform bulk operations instead of individual note copying
- Are more optimized for large data transfers
- Should reduce the likelihood of timeouts
Optimally, we should move these operations in background jobs. However, to not re-invent the wheel, I'd rather wait for &16152 (closed) to be completed.
Additional Considerations:
Potential concurrency issues when multiple users promote the same issue simultaneously. We need to handle cross-project/group cloning restrictions for Epic promotion.