abra catalogue generate gets stuck if any tagged version has an invalid compose file #260

Closed
opened 2021-11-23 21:44:02 +00:00 by 3wordchant · 1 comment
Owner

"What if #256, but compose.yml?" 🤔

Steps to reproduce

abra -d catalogue generate foodsoft

(where foodsoft's version 4.7.1 has an invalid compose.yml)

Describe the expected behavior

Version 4.7.1 is either a) not included in the versions list or b) included with no metadata.

Describe the current behavior

DEBU[0013] read 'map[DOMAIN:order.example.org EMAIL_ERROR:systems@example.org EMAIL_REPLY_DOMAIN:example.org EMAIL_SENDER:noreply@example.org FOODCOOP_CITY:XXX FOODCOOP_COUNTRY:XXX FOODCOOP_EMAIL:info@example.org FOODCOOP_FOOTER:<a href="https://example.org/">example</a> hosted by <a href="https://yourhoster.org">Your Tech Co-op</a>. FOODCOOP_HELP_URL:https://order.example.org FOODCOOP_HOMEPAGE:https://order.example.org FOODCOOP_MULTI_INSTALL:true FOODCOOP_NAME:example FOODCOOP_PHONE:XXX FOODCOOP_STREET:XXX FOODCOOP_TIME_ZONE:Amsterdam FOODCOOP_ZIP_CODE:XXX LETS_ENCRYPT_ENV:production LOG_LEVEL::info MYSQL_DB:foodsoft MYSQL_HOST:db MYSQL_PORT:3306 MYSQL_USER:foodsoft SECRET_DB_PASSWORD_VERSION:v1 SECRET_DB_ROOT_PASSWORD_VERSION:v1 SECRET_SECRET_KEY_BASE_VERSION:v1 SECRET_SHARED_LISTS_DB_PASSWORD_VERSION:v1 SECRET_SMTP_PASSWORD_VERSION:v1 SMTP_ADDRESS:mail.example.com SMTP_AUTHENTICATION:plain SMTP_DOMAIN:mail.example.com SMTP_ENABLE_STARTTLS_AUTO:true SMTP_PORT:587 SMTP_SERVER_HOST:0.0.0.0 SMTP_SERVER_PORT:2525 SMTP_USER_NAME:foodsoft TYPE:foodsoft]' from '/home/f/.abra/apps/foodsoft/.env.sample'  caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/config/env.go:46 ReadEnv"
FATA[0013] services.worker.environment.<< must be a string, number or null  caller="/home/f/Projects/Autonomic/CoopCloud/abra/cli/catalogue/generate.go:176 glob..func1" stack="/home/f/Projects/Autonomic/CoopCloud/abra/cli/catalogue/generate.go:176 glob..func1\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:107                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 

Any idea how this might be fixed?

Similar to #256

Additional information

dd0f328

_"What if #256, but `compose.yml`?" 🤔_ ## Steps to reproduce `abra -d catalogue generate foodsoft` (where `foodsoft`'s version `4.7.1` has an invalid `compose.yml`) ## Describe the expected behavior Version 4.7.1 is either a) not included in the versions list or b) included with no metadata. ## Describe the current behavior ``` DEBU[0013] read 'map[DOMAIN:order.example.org EMAIL_ERROR:systems@example.org EMAIL_REPLY_DOMAIN:example.org EMAIL_SENDER:noreply@example.org FOODCOOP_CITY:XXX FOODCOOP_COUNTRY:XXX FOODCOOP_EMAIL:info@example.org FOODCOOP_FOOTER:<a href="https://example.org/">example</a> hosted by <a href="https://yourhoster.org">Your Tech Co-op</a>. FOODCOOP_HELP_URL:https://order.example.org FOODCOOP_HOMEPAGE:https://order.example.org FOODCOOP_MULTI_INSTALL:true FOODCOOP_NAME:example FOODCOOP_PHONE:XXX FOODCOOP_STREET:XXX FOODCOOP_TIME_ZONE:Amsterdam FOODCOOP_ZIP_CODE:XXX LETS_ENCRYPT_ENV:production LOG_LEVEL::info MYSQL_DB:foodsoft MYSQL_HOST:db MYSQL_PORT:3306 MYSQL_USER:foodsoft SECRET_DB_PASSWORD_VERSION:v1 SECRET_DB_ROOT_PASSWORD_VERSION:v1 SECRET_SECRET_KEY_BASE_VERSION:v1 SECRET_SHARED_LISTS_DB_PASSWORD_VERSION:v1 SECRET_SMTP_PASSWORD_VERSION:v1 SMTP_ADDRESS:mail.example.com SMTP_AUTHENTICATION:plain SMTP_DOMAIN:mail.example.com SMTP_ENABLE_STARTTLS_AUTO:true SMTP_PORT:587 SMTP_SERVER_HOST:0.0.0.0 SMTP_SERVER_PORT:2525 SMTP_USER_NAME:foodsoft TYPE:foodsoft]' from '/home/f/.abra/apps/foodsoft/.env.sample' caller="/home/f/Projects/Autonomic/CoopCloud/abra/pkg/config/env.go:46 ReadEnv" FATA[0013] services.worker.environment.<< must be a string, number or null caller="/home/f/Projects/Autonomic/CoopCloud/abra/cli/catalogue/generate.go:176 glob..func1" stack="/home/f/Projects/Autonomic/CoopCloud/abra/cli/catalogue/generate.go:176 glob..func1\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:107 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 ``` ## Any idea how this might be fixed? Similar to #256 ## Additional information <!-- run "abra -v" on the command-line --> dd0f328
3wordchant added the
bug
abra
labels 2021-11-23 21:44:03 +00:00
decentral1se added this to the Command-line tool sustainability milestone 2021-11-24 11:20:43 +00:00
decentral1se added this to the Beta release (software) project 2021-11-24 11:20:47 +00:00
Owner
➜  abra (main) ✔ ./abra catalogue generate foodsoft 
WARN[0000] unexpected character "<" in variable name near "hosted by <a href=\"https://yourhoster.org\">Your Tech Co-op</a>.\"\n\n# database settings\nMYSQL_DB=foodsoft\nMYSQL_HOST=db\nMYSQL_PORT=3306\nMYSQL_USER=foodsoft\n\n# shared supplier list settings\n# COMPOSE_FILE=\"compose.yml:compose.sharedlists.yml\"\n# ENABLE_SHARED_LISTS=0\n# SHARED_LISTS_DB_TYPE=mysql2\n# SHARED_LISTS_HOST=order.otherfoodcoop.org\n# SHARED_LISTS_DB_NAME=sharedlists\n# SHARED_LISTS_USER=example\n\n# outgoing mail settings\nEMAIL_SENDER=noreply@example.org\nEMAIL_ERROR=systems@example.org\nSMTP_ADDRESS=mail.example.com\nSMTP_AUTHENTICATION=plain\nSMTP_DOMAIN=mail.example.com\nSMTP_ENABLE_STARTTLS_AUTO=true\nSMTP_PORT=587\nSMTP_USER_NAME=foodsoft\n\n# incoming mail settings\nEMAIL_REPLY_DOMAIN=example.org\nSMTP_SERVER_HOST=0.0.0.0\nSMTP_SERVER_PORT=2525\n\n# secret versions\nSECRET_DB_PASSWORD_VERSION=v1\nSECRET_DB_ROOT_PASSWORD_VERSION=v1\nSECRET_SHARED_LISTS_DB_PASSWORD_VERSION=v1\nSECRET_SMTP_PASSWORD_VERSION=v1\nSECRET_SECRET_KEY_BASE_VERSION=v1 # length=30\n" 
\ retrieving recipe repos list from git.coopcloud.tech... (6/-) 
WARN[0001] ensuring 1 recipe is cloned & up-to-date     
INFO[0004] generated new recipe catalogue in /home/foo/.abra/catalogue/recipes.json 
``` ➜ abra (main) ✔ ./abra catalogue generate foodsoft WARN[0000] unexpected character "<" in variable name near "hosted by <a href=\"https://yourhoster.org\">Your Tech Co-op</a>.\"\n\n# database settings\nMYSQL_DB=foodsoft\nMYSQL_HOST=db\nMYSQL_PORT=3306\nMYSQL_USER=foodsoft\n\n# shared supplier list settings\n# COMPOSE_FILE=\"compose.yml:compose.sharedlists.yml\"\n# ENABLE_SHARED_LISTS=0\n# SHARED_LISTS_DB_TYPE=mysql2\n# SHARED_LISTS_HOST=order.otherfoodcoop.org\n# SHARED_LISTS_DB_NAME=sharedlists\n# SHARED_LISTS_USER=example\n\n# outgoing mail settings\nEMAIL_SENDER=noreply@example.org\nEMAIL_ERROR=systems@example.org\nSMTP_ADDRESS=mail.example.com\nSMTP_AUTHENTICATION=plain\nSMTP_DOMAIN=mail.example.com\nSMTP_ENABLE_STARTTLS_AUTO=true\nSMTP_PORT=587\nSMTP_USER_NAME=foodsoft\n\n# incoming mail settings\nEMAIL_REPLY_DOMAIN=example.org\nSMTP_SERVER_HOST=0.0.0.0\nSMTP_SERVER_PORT=2525\n\n# secret versions\nSECRET_DB_PASSWORD_VERSION=v1\nSECRET_DB_ROOT_PASSWORD_VERSION=v1\nSECRET_SHARED_LISTS_DB_PASSWORD_VERSION=v1\nSECRET_SMTP_PASSWORD_VERSION=v1\nSECRET_SECRET_KEY_BASE_VERSION=v1 # length=30\n" \ retrieving recipe repos list from git.coopcloud.tech... (6/-) WARN[0001] ensuring 1 recipe is cloned & up-to-date INFO[0004] generated new recipe catalogue in /home/foo/.abra/catalogue/recipes.json
Sign in to join this conversation.
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#260
No description provided.