abra recipe new expects a repo to exist when it should be operating locally #220

Closed
opened 2021-10-28 18:43:22 +00:00 by cas · 1 comment
Member

Describe the current behavior

The abra recipe new command appears to expect an existing repository.

t:~/Documents/autonomic$ abra -d recipe new outline                                                                                        
DEBU[0000] '/home/trav/.abra' already created, moving on...  caller="/drone/src/cli/cli.go:99 newAbraApp.func1"
DEBU[0000] '/home/trav/.abra/servers' already created, moving on...  caller="/drone/src/cli/cli.go:99 newAbraApp.func1"
DEBU[0000] '/home/trav/.abra/apps' already created, moving on...  caller="/drone/src/cli/cli.go:99 newAbraApp.func1"
DEBU[0000] '/home/trav/.abra/vendor' already created, moving on...  caller="/drone/src/cli/cli.go:99 newAbraApp.func1"
DEBU[0000] abra version '0.2.2-alpha', commit '8b15f2de5b24cb2e7abdad357231500210987be1'  caller="/drone/src/cli/cli.go:105 newAbraApp.func1"
DEBU[0000] '/home/trav/.abra/apps/outline' does not exist, attempting to git clone from 'https://git.coopcloud.tech/coop-cloud/outline.git'  caller="/drone/src/pkg/git/clone
.go:17 Clone"
DEBU[0000] cloning 'https://git.coopcloud.tech/coop-cloud/outline.git' default branch failed, attempting from main branch  caller="/drone/src/pkg/git/clone.go:20 Clone"
FATA[0000] authentication required                       caller="/drone/src/cli/internal/validate.go:23 ValidateRecipe" stack="/drone/src/cli/internal/validate.go:23        
             ValidateRecipe\n/drone/src/cli/recipe/new.go:22                            glob..func4\n/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/command.go:163 (*Command).Ru
n\n/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/app.go:434     (*App).RunAsSubcommand\n/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/command.go:278 (*Command).startApp\n/go/pkg
/mod/github.com/urfave/cli/v2@v2.3.0/command.go:94  (*Command).Run\n/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/app.go:313     (*App).RunContext\n/go/pkg/mod/github.com/urfa
ve/cli/v2@v2.3.0/app.go:224     RunApp\n/drone/src/cli/cli.go:116                                  RunApp\n/drone/src/cmd/abra/main.go:23                             main\n/
usr/local/go/src/runtime/proc.go:255                      main\n/usr/local/go/src/runtime/asm_amd64.s:1581                 goexit"
t:~/Documents/autonomic$ abra -d recipe new --help
DEBU[0000] '/home/trav/.abra' already created, moving on...  caller="/drone/src/cli/cli.go:99 newAbraApp.func1"
DEBU[0000] '/home/trav/.abra/servers' already created, moving on...  caller="/drone/src/cli/cli.go:99 newAbraApp.func1"
DEBU[0000] '/home/trav/.abra/apps' already created, moving on...  caller="/drone/src/cli/cli.go:99 newAbraApp.func1"
DEBU[0000] '/home/trav/.abra/vendor' already created, moving on...  caller="/drone/src/cli/cli.go:99 newAbraApp.func1"
DEBU[0000] abra version '0.2.2-alpha', commit '8b15f2de5b24cb2e7abdad357231500210987be1'  caller="/drone/src/cli/cli.go:105 newAbraApp.func1"
NAME:
   abra recipe new - Create a new recipe

USAGE:
   abra recipe new [command options] <recipe>

OPTIONS:
   --help, -h  show help (default: false)

After creating the repo from the the coop cloud example repository, it still fails, this happens:

t:~/Documents/autonomic$ abra -d recipe new outline
DEBU[0000] '/home/trav/.abra' already created, moving on...  caller="/drone/src/cli/cli.go:99 newAbraApp.func1"
DEBU[0000] '/home/trav/.abra/servers' already created, moving on...  caller="/drone/src/cli/cli.go:99 newAbraApp.func1"
DEBU[0000] '/home/trav/.abra/apps' already created, moving on...  caller="/drone/src/cli/cli.go:99 newAbraApp.func1"
DEBU[0000] '/home/trav/.abra/vendor' already created, moving on...  caller="/drone/src/cli/cli.go:99 newAbraApp.func1"
DEBU[0000] abra version '0.2.2-alpha', commit '8b15f2de5b24cb2e7abdad357231500210987be1'  caller="/drone/src/cli/cli.go:105 newAbraApp.func1"
DEBU[0000] '/home/trav/.abra/apps/outline' does not exist, attempting to git clone from 'https://git.coopcloud.tech/coop-cloud/outline.git'  caller="/drone/src/pkg/git/clone.go:17 Clone"
DEBU[0000] '/home/trav/.abra/apps/outline' has been git cloned successfully  caller="/drone/src/pkg/git/clone.go:30 Clone"
FATA[0000] unexpected character "." in variable name near ".Name }}\n\nDOMAIN={{ .Name }}.example.com\n\n## Domain aliases\n#EXTRA_DOMAINS=', `www.{{ .Name }}.example.com`'\nLETS_ENCRYPT_ENV=production\n"  caller="/drone/src/pkg/recipe/recipe.go:86 Get" stack="/drone/src/pkg/recipe/recipe.go:86                         Get\n/drone/src/cli/internal/validate.go:21                     ValidateRecipe\n/drone/src/cli/recipe/new.go:22                            glob..func4\n/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/command.go:163 (*Command).Run\n/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/app.go:434     (*App).RunAsSubcommand\n/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/command.go:278 (*Command).startApp\n/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/command.go:94  (*Command).Run\n/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/app.go:313     (*App).RunContext\n/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/app.go:224     RunApp\n/drone/src/cli/cli.go:116                                  RunApp\n/drone/src/cmd/abra/main.go:23                             main\n/usr/local/go/src/runtime/proc.go:255                      main\n/usr/local/go/src/runtime/asm_amd64.s:1581                 goexit"

Steps to reproduce

abra recipe new something where something does not exist locally.

Describe the expected behavior

A new local recipe is created without failing.

Any idea how this might be fixed?

Additional information

abra version 0.2.2-alpha-8b15f2d

## Describe the current behavior The `abra recipe new` command appears to expect an existing repository. ``` t:~/Documents/autonomic$ abra -d recipe new outline DEBU[0000] '/home/trav/.abra' already created, moving on... caller="/drone/src/cli/cli.go:99 newAbraApp.func1" DEBU[0000] '/home/trav/.abra/servers' already created, moving on... caller="/drone/src/cli/cli.go:99 newAbraApp.func1" DEBU[0000] '/home/trav/.abra/apps' already created, moving on... caller="/drone/src/cli/cli.go:99 newAbraApp.func1" DEBU[0000] '/home/trav/.abra/vendor' already created, moving on... caller="/drone/src/cli/cli.go:99 newAbraApp.func1" DEBU[0000] abra version '0.2.2-alpha', commit '8b15f2de5b24cb2e7abdad357231500210987be1' caller="/drone/src/cli/cli.go:105 newAbraApp.func1" DEBU[0000] '/home/trav/.abra/apps/outline' does not exist, attempting to git clone from 'https://git.coopcloud.tech/coop-cloud/outline.git' caller="/drone/src/pkg/git/clone .go:17 Clone" DEBU[0000] cloning 'https://git.coopcloud.tech/coop-cloud/outline.git' default branch failed, attempting from main branch caller="/drone/src/pkg/git/clone.go:20 Clone" FATA[0000] authentication required caller="/drone/src/cli/internal/validate.go:23 ValidateRecipe" stack="/drone/src/cli/internal/validate.go:23 ValidateRecipe\n/drone/src/cli/recipe/new.go:22 glob..func4\n/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/command.go:163 (*Command).Ru n\n/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/app.go:434 (*App).RunAsSubcommand\n/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/command.go:278 (*Command).startApp\n/go/pkg /mod/github.com/urfave/cli/v2@v2.3.0/command.go:94 (*Command).Run\n/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/app.go:313 (*App).RunContext\n/go/pkg/mod/github.com/urfa ve/cli/v2@v2.3.0/app.go:224 RunApp\n/drone/src/cli/cli.go:116 RunApp\n/drone/src/cmd/abra/main.go:23 main\n/ usr/local/go/src/runtime/proc.go:255 main\n/usr/local/go/src/runtime/asm_amd64.s:1581 goexit" t:~/Documents/autonomic$ abra -d recipe new --help DEBU[0000] '/home/trav/.abra' already created, moving on... caller="/drone/src/cli/cli.go:99 newAbraApp.func1" DEBU[0000] '/home/trav/.abra/servers' already created, moving on... caller="/drone/src/cli/cli.go:99 newAbraApp.func1" DEBU[0000] '/home/trav/.abra/apps' already created, moving on... caller="/drone/src/cli/cli.go:99 newAbraApp.func1" DEBU[0000] '/home/trav/.abra/vendor' already created, moving on... caller="/drone/src/cli/cli.go:99 newAbraApp.func1" DEBU[0000] abra version '0.2.2-alpha', commit '8b15f2de5b24cb2e7abdad357231500210987be1' caller="/drone/src/cli/cli.go:105 newAbraApp.func1" NAME: abra recipe new - Create a new recipe USAGE: abra recipe new [command options] <recipe> OPTIONS: --help, -h show help (default: false) ``` After creating the repo from the the coop cloud example repository, it still fails, this happens: ``` t:~/Documents/autonomic$ abra -d recipe new outline DEBU[0000] '/home/trav/.abra' already created, moving on... caller="/drone/src/cli/cli.go:99 newAbraApp.func1" DEBU[0000] '/home/trav/.abra/servers' already created, moving on... caller="/drone/src/cli/cli.go:99 newAbraApp.func1" DEBU[0000] '/home/trav/.abra/apps' already created, moving on... caller="/drone/src/cli/cli.go:99 newAbraApp.func1" DEBU[0000] '/home/trav/.abra/vendor' already created, moving on... caller="/drone/src/cli/cli.go:99 newAbraApp.func1" DEBU[0000] abra version '0.2.2-alpha', commit '8b15f2de5b24cb2e7abdad357231500210987be1' caller="/drone/src/cli/cli.go:105 newAbraApp.func1" DEBU[0000] '/home/trav/.abra/apps/outline' does not exist, attempting to git clone from 'https://git.coopcloud.tech/coop-cloud/outline.git' caller="/drone/src/pkg/git/clone.go:17 Clone" DEBU[0000] '/home/trav/.abra/apps/outline' has been git cloned successfully caller="/drone/src/pkg/git/clone.go:30 Clone" FATA[0000] unexpected character "." in variable name near ".Name }}\n\nDOMAIN={{ .Name }}.example.com\n\n## Domain aliases\n#EXTRA_DOMAINS=', `www.{{ .Name }}.example.com`'\nLETS_ENCRYPT_ENV=production\n" caller="/drone/src/pkg/recipe/recipe.go:86 Get" stack="/drone/src/pkg/recipe/recipe.go:86 Get\n/drone/src/cli/internal/validate.go:21 ValidateRecipe\n/drone/src/cli/recipe/new.go:22 glob..func4\n/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/command.go:163 (*Command).Run\n/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/app.go:434 (*App).RunAsSubcommand\n/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/command.go:278 (*Command).startApp\n/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/command.go:94 (*Command).Run\n/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/app.go:313 (*App).RunContext\n/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/app.go:224 RunApp\n/drone/src/cli/cli.go:116 RunApp\n/drone/src/cmd/abra/main.go:23 main\n/usr/local/go/src/runtime/proc.go:255 main\n/usr/local/go/src/runtime/asm_amd64.s:1581 goexit" ``` ## Steps to reproduce `abra recipe new something` where something does not exist locally. ## Describe the expected behavior A new local recipe is created without failing. ## Any idea how this might be fixed? ## Additional information <!-- run "abra -v" on the command-line --> abra version 0.2.2-alpha-8b15f2d
cas added the
bug
abra
labels 2021-10-28 18:43:22 +00:00
Owner

Heya, I've attempted to better document this command in 7022f42711 and hopefully it is clear that abra recipe new goes to download the example repository from this gitea instance before it does things locally.

The main error message here is badly hidden in FATA[0000] authentication required which I've tried to rework in 3b77607f36.

Gonna close off, feel free to re-open if I missed something!

Heya, I've attempted to better document this command in https://git.coopcloud.tech/coop-cloud/abra/commit/7022f42711f1d2c443e8e247286ac99091124118 and hopefully it is clear that `abra recipe new` goes to download the `example` repository from this gitea instance before it does things locally. The main error message here is badly hidden in `FATA[0000] authentication required` which I've tried to rework in https://git.coopcloud.tech/coop-cloud/abra/commit/3b77607f369db376586a256f662be469c2fbee46. Gonna close off, feel free to re-open if I missed something!
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: toolshed/organising#220
No description provided.