As we reevaluate how to best support and maintain Staging Ref in the future, we encourage development teams using this environment to highlight their use cases in the following issue: https://gitlab.com/gitlab-com/gl-infra/software-delivery/framework/software-delivery-framework-issue-tracker/-/issues/36.

Skip to content
Snippets Groups Projects
Commit ce01ba5c authored by Igor Drozdov's avatar Igor Drozdov
Browse files

Merge branch '656-implement-proxy-fetch-direct-primary-ff' into 'main'

Implement geo_proxy_direct_to_primary feature flag

See merge request https://gitlab.com/gitlab-org/gitlab-shell/-/merge_requests/834



Merged-by: default avatarIgor Drozdov <idrozdov@gitlab.com>
Approved-by: default avatarIgor Drozdov <idrozdov@gitlab.com>
Co-authored-by: default avatarPatrick Cyiza <jpcyiza@gitlab.com>
parents 2115f792 8e44c7f4
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -40,12 +40,13 @@ type Gitaly struct {
}
type CustomPayloadData struct {
ApiEndpoints []string `json:"api_endpoints"`
Username string `json:"gl_username"`
PrimaryRepo string `json:"primary_repo"`
UserId string `json:"gl_id,omitempty"`
RequestHeaders map[string]string `json:"request_headers"`
GeoProxyDirectToPrimary bool `json:"geo_proxy_direct_to_primary"`
ApiEndpoints []string `json:"api_endpoints"`
Username string `json:"gl_username"`
PrimaryRepo string `json:"primary_repo"`
UserId string `json:"gl_id,omitempty"`
RequestHeaders map[string]string `json:"request_headers"`
GeoProxyDirectToPrimary bool `json:"geo_proxy_direct_to_primary"`
GeoProxyFetchDirectToPrimary bool `json:"geo_proxy_fetch_direct_to_primary"`
}
type CustomPayload struct {
Loading
Loading
Loading
Loading
@@ -136,9 +136,11 @@ func TestGeoPullGetCustomAction(t *testing.T) {
response.Payload = CustomPayload{
Action: "geo_proxy_to_primary",
Data: CustomPayloadData{
ApiEndpoints: []string{"geo/proxy_git_ssh/info_refs_upload_pack", "geo/proxy_git_ssh/upload_pack"},
Username: "custom",
PrimaryRepo: "https://repo/path",
ApiEndpoints: []string{"geo/proxy_git_ssh/info_refs_upload_pack", "geo/proxy_git_ssh/upload_pack"},
Username: "custom",
GeoProxyFetchDirectToPrimary: true,
PrimaryRepo: "https://repo/path",
RequestHeaders: map[string]string{"Authorization": "Bearer token"},
},
}
response.StatusCode = 300
Loading
Loading
Loading
Loading
@@ -29,7 +29,9 @@
"geo/proxy_git_ssh/upload_pack"
],
"gl_username": "custom",
"primary_repo": "https://repo/path"
"primary_repo": "https://repo/path",
"geo_proxy_fetch_direct_to_primary": true,
"request_headers": { "Authorization": "Bearer token" }
}
},
"git_protocol": "protocol",
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment