Failed to upgrade due to DISCOURSE_CDN_URL

I was just updating our Discourse instance on Docker and it failed. The instance was last updated ~2 weeks ago. Any ideas?

28:M 16 May 2019 21:53:59.479 * DB saved on disk
28:M 16 May 2019 21:53:59.479 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: /usr/local/bin/ruby -e 'if (ENV["DISCOURSE_CDN_URL"] || "")[0..1] == "//"; puts "Aborting! CDN must have a protocol specified. Once fixed you should rebake your posts now to correct all posts."; exit 1; end' failed with return #<Process::Status: pid 40 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params "/usr/local/bin/ruby -e 'if (ENV[\"DISCOURSE_CDN_URL\"] || \"\")[0..1] == \"//\"; puts \"Aborting! CDN must have a protocol specified. Once fixed you should rebake your posts now to correct all posts.\"; exit 1; end'"
676f0fb8a6cd5d7c2315e3cc0b02321b48a7919deebfd4e9728554c640aef62d
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

After digging around, I discovered that I always had the DISCOURSE_CDN_URL variable defined without a protocol, but there was a bug in Discourse Docker which ignored it (FIX: Correctly match when protocol-less CDN is used · discourse/discourse_docker@4a3ebfa · GitHub).

4 Likes