Skip to content
Snippets Groups Projects

Redirect Geo git push operations to primary external URL

Merged Catalin Irimie requested to merge cat-always-redirect-geo-primary-external-url into master
All threads resolved!

What does this MR do and why?

Instead of redirecting to the primary Geo internal URL in a git push operation, this now always redirects to the external URL.

This didn't work previously with internal URLs that were not public, or inaccessible to the regular users who may be pushing through a Geo secondary site.

Screenshots or screen recordings

╰─>$ git push -u origin
Username for 'http://p.geo-3k.cat': root
Password for 'http://root@p.geo-3k.cat':
warning: redirecting to http://p.geo-3k.cat/-/push_from_secondary/2/root/proj1.git/
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Writing objects: 100% (3/3), 252 bytes | 252.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
remote:
remote: This request to a Geo secondary node will be forwarded to the
remote: Geo primary node:
remote:
remote:   http://p.geo-3k.cat/root/proj1.git
remote:
remote:
To http://p.geo-3k.cat/root/proj1.git
   e2c4a90..103fac2  main -> main
Branch 'main' set up to track remote branch 'main' from 'origin'.

(before, the redirect was to http://35.*.*.*/.. (primary internal URL set)

How to set up and validate locally

  1. Have a local GDK with Geo set up
  2. On the primary, set a different internal URL (for example, if you use gdk.test with a dummy interface as in the GDK docs, use http://172.16.123.1 or the IP you've used for the dummy interface)
  3. Clone and push to a repo on the secondary GDK, notice the redirect to the internal IP
  4. Checkout this branch, observe that cloning and pushing redirect to the external URL as expected

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

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
  • A deleted user added backend label

    added backend label

  • Reviewer roulette

    Changes that require review have been detected!

    Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:

    Category Reviewer Maintainer
    backend Pavel Shutsin (@pshutsin) (UTC+2) Kerri Miller (@kerrizor) (UTC-7)

    To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.

    To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.

    Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.

    If needed, you can retry the danger-review job that generated this comment.

    Generated by :no_entry_sign: Danger

  • Catalin Irimie requested review from @vsizov

    requested review from @vsizov

  • Valery Sizov approved this merge request

    approved this merge request

  • :wave: @vsizov, thanks for approving this merge request.

    This is the first time the merge request is approved. To ensure full test coverage, a new pipeline has been started.

    For more info, please refer to the following links:

  • Catalin Irimie requested review from @mkozono

    requested review from @mkozono

  • Catalin Irimie mentioned in merge request !71732 (merged)

    mentioned in merge request !71732 (merged)

  • mentioned in issue #341767 (closed)

  • Michael Kozono approved this merge request

    approved this merge request

  • Michael Kozono resolved all threads

    resolved all threads

  • Michael Kozono enabled an automatic merge when the pipeline for 9734d3b8 succeeds

    enabled an automatic merge when the pipeline for 9734d3b8 succeeds

  • Michael Kozono mentioned in commit 17310da1

    mentioned in commit 17310da1

  • added workflowcanary label and removed workflowstaging label

  • added workflowproduction label and removed workflowcanary label

  • Please register or sign in to reply
    Loading