Skip to content
Snippets Groups Projects

Resolve "Avatar URLs are wrong when using a CDN path and Object Storage"

Merged Micaël Bergeron requested to merge 44775-avatar-on-os-fails-with-cdn into master

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?

What are the relevant issue numbers?

Closes #44775 (closed)

Edited by Micaël Bergeron

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Sean McGivern approved this merge request

    approved this merge request

  • added 1 commit

    • 31c4dc92 - always return a gitlab-local url for the avatars

    Compare with previous version

  • @smcgivern please review.

  • 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.

    1. https://staging.gitlab.com/mbergeron
    2. https://staging.gitlab.com/uploads/-/system/user/avatar/1491026/avatar.png
    3. 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

  • John Northrup resolved all discussions

    resolved all discussions

  • John Northrup approved this merge request

    approved this merge request

  • John Northrup mentioned in commit cc0b4e3c

    mentioned in commit cc0b4e3c

  • merged

  • John Northrup mentioned in commit 2d4a5879

    mentioned in commit 2d4a5879

  • Picked into https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18647, will merge into 10-7-stable ready for 10.7.3

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading