Users reported an error when rebuilding Discourse on version 2.3.8 using revision: stable, due to a missing discourse-internet-explorer plugin directory referenced in a chown command. The issue arose because the plugin was introduced in v2.4.0 beta and not present in 2.3.8, but the build process still expected it. schneidmaster noted the problem was resolved by switching to revision: tests-passed. Dev_Work confirmed the fix after updating. codinghorror flagged the issue for resolution. eviltrout initially suspected the base image, prompting Falco to suggest the issue might stem from building images with tests-passed and then reverting to stable, leaving broken symlinks or ignored files. eviltrout later identified the root cause: .gitignore excluded the plugin directory, so checking out stable over tests-passed left the system in an inconsistent state. He resolved it by updating the code to handle this case and also fixed a secondary issue where the Bundler version in Gemfile.lock was outdated for stable. Fixes were committed in 6e88dde and a6701d8.
I have revision: stable in my containers/app.yml which currently resolves to v2.3.8. I am getting an error when trying to rebuild the container:
I, [2019-12-24T17:46:51.163113 #1] INFO -- : > cd /var/www/discourse && find /var/www/discourse ! -user discourse -exec chown discourse {} \+
chown: cannot dereference '/var/www/discourse/public/plugins/discourse-internet-explorer': No such file or directory
It looks like the discourse-internet-explorer plugin was introduced in the v2.4.0 beta release, so it makes sense why it’s missing in 2.3.8, but it’s not clear to me why the chown is expecting it to be there. I was able to resolve by changing to revision: tests-passed but figured I would raise the issue as it was pretty serious blocker for me trying to upgrade to the latest stable version.
Now that you mention it may be related. Images are always built using tests-passed. So I think the command to revert back to an old git commit is making chown confused / leaving a broken symlink ?
It looks like the error is because that file is normally ignored due to .gitignore which meant if you checked out stable on top of tests-passed it would not work. I fixed that.
Another wild error appeared! We update bundler and the version in our stable Gemfile.lock was too old. I updated that too.