fix: Throws an error when trying to deploy unstaged changes version #458

Closed
p4u1 wants to merge 1 commits from p4u1/abra:deploy-unstaged into main
Member
My take on https://git.coopcloud.tech/toolshed/organising/issues/651
p4u1 added 1 commit 2024-12-30 14:49:36 +00:00
fix: Throws an error when trying to deploy unstaged changes version
All checks were successful
continuous-integration/drone/pr Build is passing
124a91c67f
p4u1 changed title from deploy-unstaged to fix: Throws an error when trying to deploy unstaged changes version 2024-12-30 15:41:28 +00:00
decentral1se reviewed 2024-12-31 07:24:27 +00:00
decentral1se left a comment
Owner

I'm not sure about this.

Similar to coop-cloud/abra#459, I don't think we should try to catch every specific situation with an error because we don't know what people are actually doing in all cases. E.g. in this message you assume "coworker" because you manually deal with a $ABRA_DIR/.git but for those that don't, this message could be confusing af?

I'm starting to think we should added a field to recipe.Recipe which signals the unstaged changes instead of putting it in the actual hash string. Then we can continue just showing it on the deploy overview without blowing up the Git logic. I might try to add some additional visual triggers also. I'll try get a patch out for this.

update: coop-cloud/abra#460

I'm not sure about this. Similar to https://git.coopcloud.tech/coop-cloud/abra/pulls/459, I don't think we should try to catch every specific situation with an error because we don't know what people are actually doing in all cases. E.g. in this message you assume "coworker" because you manually deal with a `$ABRA_DIR/.git` but for those that don't, this message could be confusing af? I'm starting to think we should added a field to `recipe.Recipe` which signals the unstaged changes instead of putting it in the actual hash string. Then we can continue just showing it on the deploy overview without blowing up the Git logic. I might try to add some additional visual triggers also. I'll try get a patch out for this. **update**: https://git.coopcloud.tech/coop-cloud/abra/pulls/460
@ -67,6 +68,9 @@ func (r Recipe) EnsureExists() error {
// EnsureVersion checks whether a specific version exists for a recipe.
func (r Recipe) EnsureVersion(version string) (bool, error) {
if strings.Contains(version, "+ unstaged changes") {
Owner

%s/+ unstaged changes/+U/

ef95bce1e4/pkg/recipe/git.go (L250)

`%s/+ unstaged changes/+U/` https://git.coopcloud.tech/coop-cloud/abra/src/commit/ef95bce1e45870421125f2cd0274e36130083366/pkg/recipe/git.go#L250
Owner
https://git.coopcloud.tech/coop-cloud/abra/pulls/460
decentral1se closed this pull request 2024-12-31 15:37:54 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing

Pull request closed

Sign in to join this conversation.
No description provided.