abra app deploy throws R011 when removing a service #562

Closed
opened 2025-05-25 18:02:32 +00:00 by mac-chaffee · 2 comments

Hello, I'm working on the matrix-synapse recipe where I'm trying to remove our dependency on nginx: coop-cloud/matrix-synapse#47

When I try to remove the nginx service from compose.yml and then run abra app deploy, I get: lint error in matrix-synapse configs: "all services have images" failed lint checks (R011).

Steps to reproduce:

  1. Follow the steps here to deploy matrix-synapse: https://recipes.coopcloud.tech/matrix-synapse
  2. Edit ~/.abra/recipes/matrix-synapse/compose.yml to match mine here: https://git.coopcloud.tech/coop-cloud/matrix-synapse/pulls/48/files#diff-31039bcded788fa49a167378a8b1ee509c366f91
  3. Run abra app deploy <domain> -C -d
DEBU <cli/run.go:65> abra version 0.10.1-beta, commit 2fbef41a3a000b78b8c3a68d1aa0604f50bad715
DEBU <app/app.go:293> collecting metadata from 1 servers: default
DEBU <git/read.go:88> no /root/.gitconfig exists, not reading any global gitignore config
DEBU <git/read.go:130> no /root/.gitignore exists, skipping reading gitignore paths
DEBU <git/read.go:50> git status: /root/.abra/recipes/matrix-synapse:  M .env.sample
 M compose.yml
DEBU <app/app.go:39> loaded app REDACTED: {name: REDACTED, recipe: {name: matrix-synapse, version : 6.6.1+v1.124.0, dirty: true, dir: /root/.abra/recipes/matrix-synapse, git url: https://git.coopcloud.tech/coop-cloud/matrix-synapse.git, ssh url: ssh://git@git.coopcloud.tech:2222/coop-cloud/matrix-synapse.git, compose: /root/.abra/recipes/matrix-synapse/compose.yml, readme: /root/.abra/recipes/matrix-synapse/README.md, sample env: /root/.abra/recipes/matrix-synapse/.env.sample, abra.sh: /root/.abra/recipes/matrix-synapse/abra.sh}, domain: REDACTED, env map[ADMIN_EMAIL:REDACTED ADMIN_INTERFACE_ENABLED:1 ALLOWED_LIFETIME_MAX:4w ALLOW_PUBLIC_ROOMS_FEDERATION:false COMPOSE_FILE:compose.yml:compose.admin.yml DOMAIN:REDACTED ENABLE_3PID_LOOKUP:true ENABLE_AUTO_UPDATE:true ENABLE_BACKUPS:true ENABLE_REGISTRATION:false ENCRYPTED_BY_DEFAULT:all LETS_ENCRYPT_ENV:production LOGIN_LIMIT_ACCOUNT_BURST:10 LOGIN_LIMIT_ACCOUNT_PER_SECOND:1 LOGIN_LIMIT_IP_BURST:15 LOGIN_LIMIT_IP_PER_SECOND:5 NGINX_ACCESS_LOG_LOCATION:/dev/null NGINX_ERROR_LOG_LOCATION:/dev/null PASSWORD_LOGIN_ENABLED:true REDACTION_RETENTION_PERIOD:7d RETENTION_MAX_LIFETIME:4w ROOT_LOG_LEVEL:WARN SECRET_DB_PASSWORD_VERSION:v1 SECRET_FORM_SECRET_VERSION:v1 SECRET_MACAROON_VERSION:v1 SECRET_REGISTRATION_VERSION:v1 SERVE_SERVER_WELLKNOWN:true SQL_LOG_LEVEL:WARN TIMEOUT:300 TYPE:matrix-synapse:6.6.1+v1.124.0 USER_IPS_MAX_AGE:1d], server default, path /root/.abra/servers/default/REDACTED.env}
DEBU <internal/validate.go:99> validated REDACTED as app argument
DEBU <client/client.go:88> created client for default
DEBU <app/deploy.go:87> checking whether REDACTED is already deployed
DEBU <stack/stack.go:171> REDACTED has been detected as not deployed
DEBU <git/read.go:88> no /root/.gitconfig exists, not reading any global gitignore config
DEBU <git/read.go:130> no /root/.gitignore exists, skipping reading gitignore paths
DEBU <git/read.go:50> git status: /root/.abra/recipes/matrix-synapse:  M .env.sample
 M compose.yml
DEBU <app/deploy.go:285> version: taking chaos version: 61222baa+U
DEBU <lint/recipe.go:185> linting for critical errors in matrix-synapse configs
FATA <app/deploy.go:111> lint error in matrix-synapse configs: "all services have images" failed lint checks (R011)

I checked the code briefly but couldn't understand how this would happen, unless abra is pulling the list of services from somewhere other than my edited version of compose.yml.

Hello, I'm working on the `matrix-synapse` recipe where I'm trying to remove our dependency on nginx: https://git.coopcloud.tech/coop-cloud/matrix-synapse/issues/47 When I try to remove the nginx service from `compose.yml` and then run `abra app deploy`, I get: `lint error in matrix-synapse configs: "all services have images" failed lint checks (R011)`. Steps to reproduce: 1. Follow the steps here to deploy matrix-synapse: https://recipes.coopcloud.tech/matrix-synapse 2. Edit `~/.abra/recipes/matrix-synapse/compose.yml` to match mine here: https://git.coopcloud.tech/coop-cloud/matrix-synapse/pulls/48/files#diff-31039bcded788fa49a167378a8b1ee509c366f91 3. Run `abra app deploy <domain> -C -d` ``` DEBU <cli/run.go:65> abra version 0.10.1-beta, commit 2fbef41a3a000b78b8c3a68d1aa0604f50bad715 DEBU <app/app.go:293> collecting metadata from 1 servers: default DEBU <git/read.go:88> no /root/.gitconfig exists, not reading any global gitignore config DEBU <git/read.go:130> no /root/.gitignore exists, skipping reading gitignore paths DEBU <git/read.go:50> git status: /root/.abra/recipes/matrix-synapse: M .env.sample M compose.yml DEBU <app/app.go:39> loaded app REDACTED: {name: REDACTED, recipe: {name: matrix-synapse, version : 6.6.1+v1.124.0, dirty: true, dir: /root/.abra/recipes/matrix-synapse, git url: https://git.coopcloud.tech/coop-cloud/matrix-synapse.git, ssh url: ssh://git@git.coopcloud.tech:2222/coop-cloud/matrix-synapse.git, compose: /root/.abra/recipes/matrix-synapse/compose.yml, readme: /root/.abra/recipes/matrix-synapse/README.md, sample env: /root/.abra/recipes/matrix-synapse/.env.sample, abra.sh: /root/.abra/recipes/matrix-synapse/abra.sh}, domain: REDACTED, env map[ADMIN_EMAIL:REDACTED ADMIN_INTERFACE_ENABLED:1 ALLOWED_LIFETIME_MAX:4w ALLOW_PUBLIC_ROOMS_FEDERATION:false COMPOSE_FILE:compose.yml:compose.admin.yml DOMAIN:REDACTED ENABLE_3PID_LOOKUP:true ENABLE_AUTO_UPDATE:true ENABLE_BACKUPS:true ENABLE_REGISTRATION:false ENCRYPTED_BY_DEFAULT:all LETS_ENCRYPT_ENV:production LOGIN_LIMIT_ACCOUNT_BURST:10 LOGIN_LIMIT_ACCOUNT_PER_SECOND:1 LOGIN_LIMIT_IP_BURST:15 LOGIN_LIMIT_IP_PER_SECOND:5 NGINX_ACCESS_LOG_LOCATION:/dev/null NGINX_ERROR_LOG_LOCATION:/dev/null PASSWORD_LOGIN_ENABLED:true REDACTION_RETENTION_PERIOD:7d RETENTION_MAX_LIFETIME:4w ROOT_LOG_LEVEL:WARN SECRET_DB_PASSWORD_VERSION:v1 SECRET_FORM_SECRET_VERSION:v1 SECRET_MACAROON_VERSION:v1 SECRET_REGISTRATION_VERSION:v1 SERVE_SERVER_WELLKNOWN:true SQL_LOG_LEVEL:WARN TIMEOUT:300 TYPE:matrix-synapse:6.6.1+v1.124.0 USER_IPS_MAX_AGE:1d], server default, path /root/.abra/servers/default/REDACTED.env} DEBU <internal/validate.go:99> validated REDACTED as app argument DEBU <client/client.go:88> created client for default DEBU <app/deploy.go:87> checking whether REDACTED is already deployed DEBU <stack/stack.go:171> REDACTED has been detected as not deployed DEBU <git/read.go:88> no /root/.gitconfig exists, not reading any global gitignore config DEBU <git/read.go:130> no /root/.gitignore exists, skipping reading gitignore paths DEBU <git/read.go:50> git status: /root/.abra/recipes/matrix-synapse: M .env.sample M compose.yml DEBU <app/deploy.go:285> version: taking chaos version: 61222baa+U DEBU <lint/recipe.go:185> linting for critical errors in matrix-synapse configs FATA <app/deploy.go:111> lint error in matrix-synapse configs: "all services have images" failed lint checks (R011) ``` I checked the code briefly but couldn't understand how this would happen, unless abra is pulling the list of services from somewhere other than my edited version of `compose.yml`.
Owner

@mac-chaffee I believe this is happening because in the other *.compose.yml you still have the web service but in your changes to the main compose.yml, you've removed the web service. However, the internal do a config merge and then it has no image? For example:

compose.admin.yml Lines 32 to 34 in bf4de0df97
web:
environment:
- ADMIN_INTERFACE_ENABLED

In this case, it would seem that the lint logic is linting all *.compose.yml files which seems wrong? It should probably respect the COMPOSE_YML=... of the app env vars in the .env file. However, in this case, it probably is helping catch a "recipe wide" issue. I'm not sure.

Thanks for the report.

@mac-chaffee I believe this is happening because in the other `*.compose.yml` you still have the `web` service but in your changes to the main `compose.yml`, you've removed the `web` service. However, the internal do a config merge and then it has no image? For example: https://git.coopcloud.tech/coop-cloud/matrix-synapse/src/commit/bf4de0df97ac6d5419d18b265b56d7d14d7e8110/compose.admin.yml#L32-L34 In this case, it would seem that the lint logic is linting all `*.compose.yml` files which seems wrong? It should probably respect the `COMPOSE_YML=...` of the app env vars in the `.env` file. However, in this case, it probably is helping catch a "recipe wide" issue. I'm not sure. Thanks for the report.
Author

Ah that was it, thanks!

Yeah seems like the question "should we lint all compose files" could go either way. I'm kinda surprised that combining all of the compose files didn't cause a parsing error. Surely one day a recipe will have conflicting compose files.

If anyone finds this thread in the future, you can view the combined compose file with:

printf -- '-f%s\n' compose**yml | xargs -I'{}' docker-compose {} config 2>/dev/null

It does print an invalid compose file with duplicate keys.

Ah that was it, thanks! Yeah seems like the question "should we lint all compose files" could go either way. I'm kinda surprised that combining all of the compose files didn't cause a parsing error. Surely one day a recipe will have conflicting compose files. If anyone finds this thread in the future, you can view the combined compose file with: ``` printf -- '-f%s\n' compose**yml | xargs -I'{}' docker-compose {} config 2>/dev/null ``` It does print an invalid compose file with duplicate keys.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: toolshed/abra#562
No description provided.