Rake error during update (not fatal)

AI-generated summary

A non-fatal Rake error occurred during an update, with a message saying “Don’t know how to build task ‘assets:flush_sw’” Ed_S. This error is due to a temporary and now reverted task that existed on master for less than 3 hours. According to Falco and featheredtoast, the issue is harmless and updating will not be affected. To resolve, Falco suggests running ./launcher rebuild app in the /var/discourse directory.

I saw this go by in the logs, but the upgrade continued with apparent success:

Waiting for Unicorn to reload...........................................................
$ bundle exec rake assets:flush_sw
rake aborted!
Don't know how to build task 'assets:flush_sw' (See the list of available tasks with `rake --tasks`)
Did you mean?  assets:clean
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
(See full trace by running task with --trace)
WARNING: Unable to flush service worker file
Running post deploy migrations

Is this important? Interesting?

Not sure, @eviltrout did the rake task name change?

Is this service worker related @featheredtoast? I can’t find flush_sw in our codebase right now.

That is a task that was live on master for less than 3h and was reverted afterwards.

Please use a rebuild @Ed_S.

cd /var/discourse
./launcher rebuild app

This won’t cause any issues updating, just noise in the logs which you can ignore for now - flush_sw is a new rake task that will exist once we re-add it. I’ve been working out some issues with the rake task in a draft PR, but for now those errors in the logs are harmless.