Resolve "Fix missing path for avatars of bots"
What does this MR do?
For #231251 (closed), which is a regression caused by the introduction of !36269 (merged)
More details are available in the thread: #231251 (comment 384151812)
Details:
- The images currently reside in
app/assets
folder which is precompiled. - After pre-compilation, which puts all assets in the
public/
folder, we remove the entireapp/assets
folder 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/images
since 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/assets
is 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.
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
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
Security
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 @gitlab-com/gl-security/appsec
-
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
Edited by Manoj M J