basecamp / kamal

Deploy web apps anywhere.
https://kamal-deploy.org
MIT License
9.39k stars 359 forks source link

Getting error when using app logs follow #792

Closed kennedywee closed 2 months ago

kennedywee commented 2 months ago

My setup has two destinations (production and staging), and the 'follow' option for logs doesn't work on either destination.

When running command kamal app logs -r job -d staging --follow

This is the output:

INFO Following logs on <ip_address>...
INFO ssh -t <user>@<ip_address> -p 22 'sh -c 'docker ps --latest --quiet --filter label=service=<service_name> --filter label=destination=staging --filter label=role=job --filter status=running --filter status=restarting --filter ancestor=$(docker image ls --filter reference=<repo>/<image_name>:latest-staging --format '\''{{.ID}}'\'') ; docker ps --latest --quiet --filter label=service=<service_name> --filter label=destination=staging --filter label=role=job --filter status=running --filter status=restarting' | head -1 | xargs docker logs --timestamps --tail 10 --follow 2>&1'
sh: -c: line 0: unexpected EOF while looking for matching `''
sh: -c: line 1: syntax error: unexpected end of file
morgoth commented 2 months ago

@kennedywee Which version of kamal are you using? There was a regression in 1.5.0 which was fixed in 1.5.1. Vide https://github.com/basecamp/kamal/issues/777

kennedywee commented 2 months ago

@morgoth

Oh, I had checked for issue #777 before and I thought I had already upgraded to version 1.5.1...

Silly me, it turns out I'm still using Kamal 1.5.0! Hahaha.

Thank you! I will close this issue.