abra recipe sync asplode #779

Open
opened 2026-02-17 18:36:23 +00:00 by cas · 2 comments
Member

Weird issue trying to upgrade a recipe, at the abra recipe sync step, I get:

$ abra recipe sync glitch-soc --debug 
DEBU <cli/run.go:137> abra version: 0.12.0-beta, commit: db7c4042, lang: en
DEBU <git/branch.go:99> successfully checked out refs/heads/main in /home/cas/.abra/catalogue
DEBU <catalogue/catalogue.go:84> fetched latest git changes for /home/cas/.abra/catalogue
DEBU <recipe/recipe.go:406> read recipe catalogue from file system cache in /home/cas/.abra/catalogue/recipes.json
DEBU <git/read.go:130> no /home/cas/.gitignore exists, skipping reading gitignore paths
DEBU <git/read.go:50> git status: /home/cas/.abra/recipes/glitch-soc:  M compose.yml
DEBU <internal/validate.go:88> validated glitch-soc as recipe argument
DEBU <formatter/formatter.go:238> stripped library/postgres to postgres for parsing
DEBU <formatter/formatter.go:238> stripped library/redis to redis for parsing
DEBU <recipe/git.go:367> detected 0.1.0+20250614_14, 1.0.0+v4.4.1 as tags for recipe glitch-soc
DEBU <git/branch.go:99> successfully checked out refs/heads/main in /home/cas/.abra/catalogue
DEBU <catalogue/catalogue.go:84> fetched latest git changes for /home/cas/.abra/catalogue
DEBU <recipe/recipe.go:406> read recipe catalogue from file system cache in /home/cas/.abra/catalogue/recipes.json
panic: runtime error: index out of range [-1]

goroutine 1 [running]:
coopcloud.tech/abra/cli/recipe.init.func15(0xc0005bc300?, {0xc000447920, 0x1, 0x2})
	/home/d1/hack/abra/cli/recipe/sync.go:137 +0x1685
github.com/spf13/cobra.(*Command).execute(0x1dbf3e0, {0xc000447900, 0x2, 0x2})
	/home/d1/hack/abra/vendor/github.com/spf13/cobra/command.go:1019 +0xae7
github.com/spf13/cobra.(*Command).ExecuteC(0xc0005aa608)
	/home/d1/hack/abra/vendor/github.com/spf13/cobra/command.go:1148 +0x465
github.com/spf13/cobra.(*Command).Execute(...)
	/home/d1/hack/abra/vendor/github.com/spf13/cobra/command.go:1071
coopcloud.tech/abra/cli.Run({0x14bc528, 0xb}, {0x14cd800, 0x28})
	/home/d1/hack/abra/cli/run.go:317 +0x1195
main.main()
	/home/d1/hack/abra/cmd/abra/main.go:22 +0xa9

The contents of my recipes.json (the last debug output, not 100% that's where it crashed) are standard (I deleted the file to force it to reget and it still happens.

Nothing particularly weird about the recipe - I did a recipe upgrade on it and now this.

I tried to update abra (abra upgrade -r) and experience the same behavior.

Weird issue trying to upgrade a recipe, at the `abra recipe sync` step, I get: ``` $ abra recipe sync glitch-soc --debug DEBU <cli/run.go:137> abra version: 0.12.0-beta, commit: db7c4042, lang: en DEBU <git/branch.go:99> successfully checked out refs/heads/main in /home/cas/.abra/catalogue DEBU <catalogue/catalogue.go:84> fetched latest git changes for /home/cas/.abra/catalogue DEBU <recipe/recipe.go:406> read recipe catalogue from file system cache in /home/cas/.abra/catalogue/recipes.json DEBU <git/read.go:130> no /home/cas/.gitignore exists, skipping reading gitignore paths DEBU <git/read.go:50> git status: /home/cas/.abra/recipes/glitch-soc: M compose.yml DEBU <internal/validate.go:88> validated glitch-soc as recipe argument DEBU <formatter/formatter.go:238> stripped library/postgres to postgres for parsing DEBU <formatter/formatter.go:238> stripped library/redis to redis for parsing DEBU <recipe/git.go:367> detected 0.1.0+20250614_14, 1.0.0+v4.4.1 as tags for recipe glitch-soc DEBU <git/branch.go:99> successfully checked out refs/heads/main in /home/cas/.abra/catalogue DEBU <catalogue/catalogue.go:84> fetched latest git changes for /home/cas/.abra/catalogue DEBU <recipe/recipe.go:406> read recipe catalogue from file system cache in /home/cas/.abra/catalogue/recipes.json panic: runtime error: index out of range [-1] goroutine 1 [running]: coopcloud.tech/abra/cli/recipe.init.func15(0xc0005bc300?, {0xc000447920, 0x1, 0x2}) /home/d1/hack/abra/cli/recipe/sync.go:137 +0x1685 github.com/spf13/cobra.(*Command).execute(0x1dbf3e0, {0xc000447900, 0x2, 0x2}) /home/d1/hack/abra/vendor/github.com/spf13/cobra/command.go:1019 +0xae7 github.com/spf13/cobra.(*Command).ExecuteC(0xc0005aa608) /home/d1/hack/abra/vendor/github.com/spf13/cobra/command.go:1148 +0x465 github.com/spf13/cobra.(*Command).Execute(...) /home/d1/hack/abra/vendor/github.com/spf13/cobra/command.go:1071 coopcloud.tech/abra/cli.Run({0x14bc528, 0xb}, {0x14cd800, 0x28}) /home/d1/hack/abra/cli/run.go:317 +0x1195 main.main() /home/d1/hack/abra/cmd/abra/main.go:22 +0xa9 ``` The contents of my `recipes.json` (the last debug output, not 100% that's where it crashed) are standard (I deleted the file to force it to reget and it still happens. Nothing particularly weird about the recipe - I did a `recipe upgrade` on it and now this. I tried to update `abra` (`abra upgrade -r`) and experience the same behavior.
decentral1se added the
bug
label 2026-02-18 07:46:25 +00:00
Owner

@cas

I can't see any glith-soc entry in https://git.coopcloud.tech/toolshed/recipes-catalogue-json/src/branch/main/recipes.json - do you have any releases in the catalogue that you know about?

This code seems to be better guarded since the refactor of #764 following #682.

latestRecipeVersion, err := getLatestVersion(recipe, catl)

Idk if you wanna try out latest HEAD or just wait for the RC which should be coming today/tomorrow and report back what happens? I imagine it might still explode and we need to decide some way to gracefully bail out if there are no versions? And especially test behaviour with other commands, e.g. abra recipe upgrade

@cas I can't see any `glith-soc` entry in https://git.coopcloud.tech/toolshed/recipes-catalogue-json/src/branch/main/recipes.json - do you have any releases in the catalogue that you know about? This code seems to be better guarded since the refactor of https://git.coopcloud.tech/toolshed/abra/pulls/764 following https://git.coopcloud.tech/toolshed/abra/issues/682. https://git.coopcloud.tech/toolshed/abra/src/commit/ea48917e6cdb009298c82578bc634b0cb194cb5b/cli/recipe/release.go#L172 Idk if you wanna try out latest `HEAD` or just wait for the RC which should be coming today/tomorrow and report back what happens? I imagine it might still explode and we need to decide some way to gracefully bail out if there are no versions? And especially test behaviour with other commands, e.g. `abra recipe upgrade`
decentral1se added this to the Abra "next" project 2026-02-18 07:59:31 +00:00
Author
Member

Ah fudge. I was under the impression that the two releases in the repository where in the catalog, but this must be something related to how when I made the recipe like what 2 years ago things worked slightly differently.

Ah fudge. I was under the impression that the two releases in the repository where in the catalog, but this must be something related to how when I made the recipe like what 2 years ago things worked slightly differently.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: toolshed/abra#779
No description provided.