abra app deploy <foobar> doesn't work until a repo is created on gitea #247

Closed
opened 2021-11-14 19:00:24 +00:00 by 3wordchant · 4 comments
Owner

Steps to reproduce

abra recipe new foobar
abra app new foobar
abra app deploy foobar_domain_tld

Describe the expected behavior

Deploys a new instance foobar using the local recipe.

Describe the current behavior

FATA[0004] repository does not exist

Any idea how this might be fixed?

Skipping the check for a remote repo if a local folder already exists. Optionally putting this behaviour behind the exquisite --chaos flag.

Additional information

abra version 0.3.0-alpha-de7054f

(really 85ff042, my local-rebase-to-fix-go.sum is confusing things)

## Steps to reproduce ``` abra recipe new foobar abra app new foobar abra app deploy foobar_domain_tld ``` ## Describe the expected behavior Deploys a new instance `foobar` using the local recipe. ## Describe the current behavior `FATA[0004] repository does not exist` ## Any idea how this might be fixed? Skipping the check for a remote repo if a local folder already exists. Optionally putting this behaviour behind the exquisite `--chaos` flag. ## Additional information <!-- run "abra -v" on the command-line --> `abra version 0.3.0-alpha-de7054f` (really `85ff042`, my local-rebase-to-fix-`go.sum` is confusing things)
3wordchant added the
bug
abra
labels 2021-11-14 19:00:25 +00:00
3wordchant changed title from abra app new <foobar> doesn't work until a git repo is created on gitea to abra app deploy <foobar> doesn't work until a git repo is created on gitea 2021-11-14 19:03:20 +00:00
3wordchant changed title from abra app deploy <foobar> doesn't work until a git repo is created on gitea to abra app deploy <foobar> doesn't work until a repo is created on gitea 2021-11-14 19:03:26 +00:00
Owner

Hmmm, I think 486a1717e7 might solve that by simply just checking if the local repo is already there? Didn't test it 🙈

Hmmm, I think https://git.coopcloud.tech/coop-cloud/abra/commit/486a1717e77ac8a7676c74a18b97ad8e90a218a4 might solve that by simply just checking if the local repo is already there? Didn't test it 🙈
decentral1se added the
awaiting-feedback
label 2021-11-14 21:56:42 +00:00
Author
Owner

Still happening but not sure why.

Wondering if it's that deploy calls EnsureLatest instead of EnsureExists, which then tries to do a git checkout.

➜ ./abra -d app deploy --force lab_demo_coopcloud_tech
DEBU[0000] '/home/f/.abra' already created, moving on...  caller="/home/f/Projects/Autonomic/CoopCloud/abra/cli/cli.go:102 newAbraApp.func1"
DEBU[0000] '/home/f/.abra/servers' already created, moving on...  caller="/home/f/Projects/Autonomic/CoopCloud/abra/cli/cli.go:102 newAbraApp.func1"
DEBU[0000] '/home/f/.abra/apps' already created, moving on...  caller="/home/f/Projects/Autonomic/CoopCloud/abra/cli/cli.go:102 newAbraApp.func1"
DEBU[0000] '/home/f/.abra/vendor' already created, moving on...  caller="/home/f/Projects/Autonomic/CoopCloud/abra/cli/cli.go:102 newAbraApp.func1"
DEBU[0000] abra version 'dev', commit 'e9c4434bd39db3c4f3ac9dbabcd5fc4b0c78229a'  caller="/home/f/Projects/Autonomic/CoopCloud/abra/cli/cli.go:108 newAbraApp.func1"
DEBU[0000] collecting metadata from '17' servers: 'b0x.f0x.link, centreforthestudyof.net, demo.coopcloud.tech, dondolo.supervacuo.com, jones.iww.org.uk, lumbung.space, mellor.coopcloud.tech, monitor.autonomic.zone, mutualnudes.net, noborders.doesthisthing.work, org.wiki.cafe, swarm-demo.autonomic.zone, swarm-test.autonomic.zone, swarm.autonomic.zone, swarm.neuronicgames.com, thirdsector.autonomic.zone, utaw.autonomic.zone'  caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/config/app.go:146 LoadAppFiles"
DEBU[0000] read 'map[DOMAIN:lab.demo.coopcloud.tech LETS_ENCRYPT_ENV:production TYPE:jupyter-lab]' from '/home/f/.abra/servers/demo.coopcloud.tech/lab_demo_coopcloud_tech.env'  caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/config/env.go:46 ReadEnv"
DEBU[0000] read env 'map[DOMAIN:lab.demo.coopcloud.tech LETS_ENCRYPT_ENV:production TYPE:jupyter-lab]' from '/home/f/.abra/servers/demo.coopcloud.tech/lab_demo_coopcloud_tech.env'  caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/config/app.go:103 readAppEnvFile"
DEBU[0000] retrieved '{lab_demo_coopcloud_tech jupyter-lab lab.demo.coopcloud.tech map[DOMAIN:lab.demo.coopcloud.tech LETS_ENCRYPT_ENV:production TYPE:jupyter-lab] demo.coopcloud.tech /home/f/.abra/servers/demo.coopcloud.tech/lab_demo_coopcloud_tech.env}' for 'lab_demo_coopcloud_tech'  caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/app/app.go:26 Get"
DEBU[0000] found context connection details &{username demo.coopcloud.tech 222} for demo.coopcloud.tech  caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/ssh/ssh.go:493 GetContextConnDetails"
DEBU[0000] server SSH host key present in ~/.ssh/known_hosts for demo.coopcloud.tech  caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/ssh/ssh.go:279 GetHostKey"
DEBU[0000] validated 'lab_demo_coopcloud_tech' as app argument  caller="/home/f/Projects/Autonomic/CoopCloud/abra/cli/internal/validate.go:106 ValidateApp"
DEBU[0000] found context connection details &{username demo.coopcloud.tech 222} for demo.coopcloud.tech  caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/ssh/ssh.go:493 GetContextConnDetails"
DEBU[0000] server SSH host key present in ~/.ssh/known_hosts for demo.coopcloud.tech  caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/ssh/ssh.go:279 GetHostKey"
DEBU[0000] created client for 'demo.coopcloud.tech'      caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/client/client.go:58 New"
DEBU[0000] checking whether 'lab_demo_coopcloud_tech' is already deployed  caller="/home/f/Projects/Autonomic/CoopCloud/abra/cli/internal/deploy.go:29 DeployAction"
DEBU[0000] commandconn: starting ssh with [-o ConnectTimeout=5 -l username -p 222 -- demo.coopcloud.tech docker system dial-stdio]  caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/upstream/commandconn/commandconn.go:49 New"
DEBU[0004] 'lab_demo_coopcloud_tech' has been detected as deployed with version ''  caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/upstream/stack/stack.go:135 IsDeployed"
WARN[0004] 'lab_demo_coopcloud_tech' already deployed but continuing (--force)  caller="/home/f/Projects/Autonomic/CoopCloud/abra/cli/internal/deploy.go:38 DeployAction"
DEBU[0006] file system cached recipe catalogue is up-to-date  caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/catalogue/catalogue.go:154 recipeCatalogueFSIsLatest"
DEBU[0006] reading recipe catalogue from file system cache to get latest  caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/catalogue/catalogue.go:486 GetRecipeCatalogueVersions"
DEBU[0006] read recipe catalogue from file system cache in '/home/f/.abra/apps.json'  caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/catalogue/catalogue.go:195 readRecipeCatalogueFS"
WARN[0006] no versions detected, using latest commit     caller="/home/f/Projects/Autonomic/CoopCloud/abra/cli/internal/deploy.go:60 DeployAction"
FATA[0006] repository does not exist                     caller="/home/f/Projects/Autonomic/CoopCloud/abra/cli/internal/deploy.go:62 DeployAction" stack="/home/f/Projects/Autonomic/CoopCloud/abra/cli/internal/deploy.go:62 DeployAction\n/home/f/.go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/command.go:163  (*Command).Run\n/home/f/.go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/app.go:434      (*App).RunAsSubcommand\n/home/f/.go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/command.go:278  (*Command).startApp\n/home/f/.go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/command.go:94   (*Command).Run\n/home/f/.go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/app.go:313      (*App).RunContext\n/home/f/.go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/app.go:224      RunApp\n/home/f/Projects/Autonomic/CoopCloud/abra/cli/cli.go:119            RunApp\n/home/f/Projects/Autonomic/CoopCloud/abra/cmd/abra/main.go:23       main\n/usr/lib/golang/src/runtime/proc.go:225                             main\n/usr/lib/golang/src/runtime/asm_amd64.s:1371                        goexit"
Still happening but not sure why. Wondering if it's that deploy calls `EnsureLatest` instead of `EnsureExists`, which then tries to do a `git checkout`. ``` ➜ ./abra -d app deploy --force lab_demo_coopcloud_tech DEBU[0000] '/home/f/.abra' already created, moving on... caller="/home/f/Projects/Autonomic/CoopCloud/abra/cli/cli.go:102 newAbraApp.func1" DEBU[0000] '/home/f/.abra/servers' already created, moving on... caller="/home/f/Projects/Autonomic/CoopCloud/abra/cli/cli.go:102 newAbraApp.func1" DEBU[0000] '/home/f/.abra/apps' already created, moving on... caller="/home/f/Projects/Autonomic/CoopCloud/abra/cli/cli.go:102 newAbraApp.func1" DEBU[0000] '/home/f/.abra/vendor' already created, moving on... caller="/home/f/Projects/Autonomic/CoopCloud/abra/cli/cli.go:102 newAbraApp.func1" DEBU[0000] abra version 'dev', commit 'e9c4434bd39db3c4f3ac9dbabcd5fc4b0c78229a' caller="/home/f/Projects/Autonomic/CoopCloud/abra/cli/cli.go:108 newAbraApp.func1" DEBU[0000] collecting metadata from '17' servers: 'b0x.f0x.link, centreforthestudyof.net, demo.coopcloud.tech, dondolo.supervacuo.com, jones.iww.org.uk, lumbung.space, mellor.coopcloud.tech, monitor.autonomic.zone, mutualnudes.net, noborders.doesthisthing.work, org.wiki.cafe, swarm-demo.autonomic.zone, swarm-test.autonomic.zone, swarm.autonomic.zone, swarm.neuronicgames.com, thirdsector.autonomic.zone, utaw.autonomic.zone' caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/config/app.go:146 LoadAppFiles" DEBU[0000] read 'map[DOMAIN:lab.demo.coopcloud.tech LETS_ENCRYPT_ENV:production TYPE:jupyter-lab]' from '/home/f/.abra/servers/demo.coopcloud.tech/lab_demo_coopcloud_tech.env' caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/config/env.go:46 ReadEnv" DEBU[0000] read env 'map[DOMAIN:lab.demo.coopcloud.tech LETS_ENCRYPT_ENV:production TYPE:jupyter-lab]' from '/home/f/.abra/servers/demo.coopcloud.tech/lab_demo_coopcloud_tech.env' caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/config/app.go:103 readAppEnvFile" DEBU[0000] retrieved '{lab_demo_coopcloud_tech jupyter-lab lab.demo.coopcloud.tech map[DOMAIN:lab.demo.coopcloud.tech LETS_ENCRYPT_ENV:production TYPE:jupyter-lab] demo.coopcloud.tech /home/f/.abra/servers/demo.coopcloud.tech/lab_demo_coopcloud_tech.env}' for 'lab_demo_coopcloud_tech' caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/app/app.go:26 Get" DEBU[0000] found context connection details &{username demo.coopcloud.tech 222} for demo.coopcloud.tech caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/ssh/ssh.go:493 GetContextConnDetails" DEBU[0000] server SSH host key present in ~/.ssh/known_hosts for demo.coopcloud.tech caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/ssh/ssh.go:279 GetHostKey" DEBU[0000] validated 'lab_demo_coopcloud_tech' as app argument caller="/home/f/Projects/Autonomic/CoopCloud/abra/cli/internal/validate.go:106 ValidateApp" DEBU[0000] found context connection details &{username demo.coopcloud.tech 222} for demo.coopcloud.tech caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/ssh/ssh.go:493 GetContextConnDetails" DEBU[0000] server SSH host key present in ~/.ssh/known_hosts for demo.coopcloud.tech caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/ssh/ssh.go:279 GetHostKey" DEBU[0000] created client for 'demo.coopcloud.tech' caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/client/client.go:58 New" DEBU[0000] checking whether 'lab_demo_coopcloud_tech' is already deployed caller="/home/f/Projects/Autonomic/CoopCloud/abra/cli/internal/deploy.go:29 DeployAction" DEBU[0000] commandconn: starting ssh with [-o ConnectTimeout=5 -l username -p 222 -- demo.coopcloud.tech docker system dial-stdio] caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/upstream/commandconn/commandconn.go:49 New" DEBU[0004] 'lab_demo_coopcloud_tech' has been detected as deployed with version '' caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/upstream/stack/stack.go:135 IsDeployed" WARN[0004] 'lab_demo_coopcloud_tech' already deployed but continuing (--force) caller="/home/f/Projects/Autonomic/CoopCloud/abra/cli/internal/deploy.go:38 DeployAction" DEBU[0006] file system cached recipe catalogue is up-to-date caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/catalogue/catalogue.go:154 recipeCatalogueFSIsLatest" DEBU[0006] reading recipe catalogue from file system cache to get latest caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/catalogue/catalogue.go:486 GetRecipeCatalogueVersions" DEBU[0006] read recipe catalogue from file system cache in '/home/f/.abra/apps.json' caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/catalogue/catalogue.go:195 readRecipeCatalogueFS" WARN[0006] no versions detected, using latest commit caller="/home/f/Projects/Autonomic/CoopCloud/abra/cli/internal/deploy.go:60 DeployAction" FATA[0006] repository does not exist caller="/home/f/Projects/Autonomic/CoopCloud/abra/cli/internal/deploy.go:62 DeployAction" stack="/home/f/Projects/Autonomic/CoopCloud/abra/cli/internal/deploy.go:62 DeployAction\n/home/f/.go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/command.go:163 (*Command).Run\n/home/f/.go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/app.go:434 (*App).RunAsSubcommand\n/home/f/.go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/command.go:278 (*Command).startApp\n/home/f/.go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/command.go:94 (*Command).Run\n/home/f/.go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/app.go:313 (*App).RunContext\n/home/f/.go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/app.go:224 RunApp\n/home/f/Projects/Autonomic/CoopCloud/abra/cli/cli.go:119 RunApp\n/home/f/Projects/Autonomic/CoopCloud/abra/cmd/abra/main.go:23 main\n/usr/lib/golang/src/runtime/proc.go:225 main\n/usr/lib/golang/src/runtime/asm_amd64.s:1371 goexit" ```
Owner

Pushed 4a245c3e02 and 1f6e4fa4a3 as part of smoking out issues here. Might be fixed then!

Pushed https://git.coopcloud.tech/coop-cloud/abra/commit/4a245c3e026e65047c31880082b3b5d5d5f7c3e4 and https://git.coopcloud.tech/coop-cloud/abra/commit/1f6e4fa4a3efab5f2ad5aa751055c06e76df1292 as part of smoking out issues here. Might be fixed then!
Owner

Lemme know if this is still happening, closing for now 🌇

Lemme know if this is still happening, closing for now 🌇
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coop-cloud/organising#247
No description provided.