Wrap service calls in upload_nuget_package_file method in DB transaction

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

In #upload_nuget_package_file, we have two services that are called independently: Packages::CreateTemporaryPackageService & Packages::CreatePackageFileService. Those services create new package and package file records in the database. However, They are not wrapped in a transaction. We don't want one service call to be successful while the other could fail. Both should be successful or failed.

Solution

Wrap the calls to the services in a database transaction.

Edited by 🤖 GitLab Bot 🤖