CG can want to cancel its reservation before it gets garbage-collected (e.g. when failing build). There are two options:
failBuild(release_reservation=True)
CGReleaseReservation
Another option is to implement both of these (internally sharing same code).
The only failBuild is host.failBuild, so I think there has to be a new call.
host.failBuild
Also, I can see giving the CG the option of marking it canceled too.
Metadata Update from @mikem: - Custom field Size adjusted to None
If we have CGInitBuild, maybe CGUnitBuild(state=koji.CANCELED) with possible other option value koji.FAILED would be ok. Or better idea for naming? I don't think, that such call should be used anywhere outside of CG API, so I would leave it in "CG" namespace.
CGInitBuild
CGUnitBuild(state=koji.CANCELED)
koji.FAILED
PR #1662
Metadata Update from @jcupova: - Issue tagged with: testing-done
Commit 87685df5 fixes this issue
Commit 79a7da7c fixes this issue
Final name of API call is CGRefundBuild
CGRefundBuild
Metadata Update from @dgregor: - Issue assigned to tkopecek
This issue has been migrated to Fedora Forge: https://forge.fedoraproject.org/koji/koji/issues/1610
Please continue any further discussion there.