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
Right now if processing an API call in the apiserver fails somewhere in the middle, then the modifications done before the failure are not rolled back.
During PackageRevision creation, if creating the internal PackageRev object fails, the whole operation returns with an error (as it should), but the creation of a new branch already happened in the git repo and it is not rolled back. That will prevent retrying the creation of the PackageRevision, because it will detect a conflict in the workspace name, because of git's state, even though there is no other PackageRevision object exists with a conflicting workspace name.
The example is about the "Create Package Revision" call, but the same is true for other API calls as well.
Proposal: make sure that on error all previous changes are reverted before returning with the error, for all API calls in the porch apiserver.
The text was updated successfully, but these errors were encountered:
Right now if processing an API call in the apiserver fails somewhere in the middle, then the modifications done before the failure are not rolled back.
For example here: https://github.com/nephio-project/porch/blob/cb1b392069de7711bb29c3524d6fc464e991f82a/pkg/engine/engine.go#L131 :
During PackageRevision creation, if creating the internal PackageRev object fails, the whole operation returns with an error (as it should), but the creation of a new branch already happened in the git repo and it is not rolled back. That will prevent retrying the creation of the PackageRevision, because it will detect a conflict in the workspace name, because of git's state, even though there is no other PackageRevision object exists with a conflicting workspace name.
The example is about the "Create Package Revision" call, but the same is true for other API calls as well.
Proposal: make sure that on error all previous changes are reverted before returning with the error, for all API calls in the porch apiserver.
The text was updated successfully, but these errors were encountered: