You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: improve transaction safety in CompleteJob function
This commit refactors the CompleteJob function in provisionerdserver.go to
use database transactions more consistently for better atomicity guarantees.
The large function was broken down into three specialized handlers:
- completeTemplateImportJob
- completeWorkspaceBuildJob
- completeTemplateDryRunJob
Each handler now uses the Database.InTx wrapper to ensure all database
operations for a job completion are performed within a single transaction,
preventing partial updates in case of failures.
Added comprehensive tests for transaction behavior for each job type.
Fixes#17694
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments