We need to populate the used_vcpus field for github_installations after we begin incrementing/decrementing it in the application logic. While we could run this query during the initial migration, it may become out of sync again before the corresponding code changes are deployed. Therefore, it’s safer to run this after deploying the updated code. Additionally, constraints are added after populating the values. If added beforehand, they could block runner destruction operations as runners may attempt to decrement used_vcpus for VMs that haven’t yet been counted.
1.9 KiB
1.9 KiB