feat: revert all changes during failed release process #791
Reference in New Issue
Block a user
No description provided.
Delete Branch "iexos/abra:push-opmswyqxplqx"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
closes #683
Looking good, tysm @iexos! A few minor comments below.
@ -317,2 +302,2 @@if cleanErr := cleanCommit(recipe, preCommitHead); cleanErr != nil {log.Fatal(cleanErr)if resetErr := resetCommit(recipe, preCommitHead); resetErr != nil {log.Fatal(resetErr)In the case of either
cleanTagorresetCommitfailing while trying to clean up, we'll see a cryptic error without context. Should we adjust thelog.Fatal(cleanErr)/log.Fatal(resetErr)to also include something likeunable to clean up after failed release attempt: %s@ -393,2 +364,2 @@if tagString == "" {tagString = fmt.Sprintf("%s+%s", tag.String(), mainAppVersion)mainService := "app"label := i18n.G("coop-cloud.${STACK_NAME}.version=%s", tagString)We can remove the
i18n.G(...)wrapper since this string doesn't need to be translated.That was a previous mistake, I think. You can use a standard
fmt.Sprintfinstead.@ -601,3 +579,3 @@}opts := &git.ResetOptions{Commit: head.Hash(), Mode: git.MixedReset}opts := &git.ResetOptions{Commit: head.Hash(), Mode: git.HardReset}Does this still guarantee that we still won't lose "non release related changes"? Can this be covered with a separate integration test as well? I'd rather we are safe than sorry in the case of potential data loss issues.
abrahas a bit of a bad reptuation in this regard 🙃There are already tests covering staged or unstaged changes in which case
releasewill bail out. Is that what you mean or is there something else you want to test?84a8fa2254to039a29f27c👏