Resolve "Fix missing path for avatars of bots"
What does this MR do?
More details are available in the thread: #231251 (comment 384151812)
- The images currently reside in
app/assetsfolder which is precompiled.
- After pre-compilation, which puts all assets in the
public/folder, we remove the entire
app/assetsfolder from disk (discussion on backend channel - internal only): This behaviour is now documented in !37695 (merged)
- Because of this, our current code is unable to find the original files that resides inside
app/assets, as this directory does not exist anymore.
- But it is not necessary to put these images under
app/assets/imagessince we do not need to precompile these avatar images at all - we never serve these images directly to users. We just need the contents of these images to tell Carrierwave to use these as source images for the User avatar.
- Because of this, it is fine to move these images to a folder that is not pre-compiled.
lib/assetsis an already existing folder in our repo, and this felt like the ideal candidate to move these images to, which is the crux of this MR. This folder is not considered for pre-compilation, so the source remains on disk.
Does this MR meet the acceptance criteria?
- Changelog entry
- Documentation (if required)
- Code review guidelines
- Merge request performance guidelines
- Style guides
- Database guides
- Separation of EE specific content
Availability and Testing
- Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
- Tested in all supported browsers
- Informed Infrastructure department of a default or new setting change, if applicable per definition of done
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
Label as security and @ mention
- The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
- Security reports checked/validated by a reviewer from the AppSec team