Resolve "Avatar URLs are wrong when using a CDN path and Object Storage"
What does this MR do?
Resolve a problem where if an avatar would be on remote storage and a CDN was configured, it would return an invalid URL.
Are there points in the code the reviewer needs to double check?
When everything will be migrated to object storage, I think we will be able to deprecate the CDN-specific code.
Why was this MR needed?
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Review
-
Has been reviewed by UX -
Has been reviewed by Frontend -
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
Internationalization required/considered -
End-to-end tests pass ( package-and-qa
manual pipeline job)
What are the relevant issue numbers?
Closes #44775 (closed)
Merge request reports
Activity
@smcgivern please review.
assigned to @smcgivern
marked the checklist item Changelog entry added, if necessary as completed
- Resolved by John Northrup
assigned to @mbergeron
added 1 commit
- 31c4dc92 - always return a gitlab-local url for the avatars
@smcgivern please review.
assigned to @smcgivern
Here is a test I did on staging, basically the current approach is to always return a gitlab-local URL for avatars, so that it may be forwarded to the CDN.
On staging, my avatar is currently on OS. All these URLs works and show the correct avatar.
- https://staging.gitlab.com/mbergeron
- https://staging.gitlab.com/uploads/-/system/user/avatar/1491026/avatar.png
- https://gl-staging.global.ssl.fastly.net/uploads/-/system/user/avatar/1491026/avatar.png
We can see the problem in action currently at https://staging.gitlab.com/gitlab-org/gitlab-ce/issues/38925#note_42948485 because the link is broken. With the new fix, the link at 3) will be used.
@smcgivern WDYT?
@smcgivern are we merging this in 10.7?
assigned to @northrup
mentioned in commit cc0b4e3c
mentioned in commit 2d4a5879
Picked into https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18647, will merge into
10-7-stable
ready for10.7.3