Add ability to allow list group namespaces to bypass ECA
- Add ability to allow list group namespaces to bypass ECA
This bypass is needed for migrating large existing Git repositories, as the ECA will time out on massive requests.
Merge request reports
Activity
requested review from @cguindon, @malowe, and @zacharysabourin
Tested using https://www.onlinegdb.com/online_ruby_compiler with the following code snippet:
ALLOW_LIST_GROUPS = ['eclipsefdn/it/webdev/eclipse.org-php-archives/'] project_json_data = { "path_with_namespace" => 'eclipse/chess/chess/sample-repo' } puts "Test: #{project_json_data['path_with_namespace']}" if (ALLOW_LIST_GROUPS.any? {|group_namespace| project_json_data['path_with_namespace'].start_with?(group_namespace)}) then puts "Found allow listed group, skipping validation" else puts "nope" end
22 22 '/eclipse/oniro-core/meta-seco-intel', 23 23 '/eclipse/oniro-core/meta-zephyr' 24 24 ] 25 ALLOW_LIST_GROUPS = ['eclipsefdn/it/webdev/eclipse.org-php-archives/'] mentioned in commit aec721c2
@mward in the future, if you're migrating large projects with long histories over, updating the
ALLOW_LIST_GROUPS
added here should make your job far easier. All you have to do is add the path leading to the group you are migrating, and everything under it should have the ECA check skipped.
@droy sorry for the short turnaround, but there is an ECA script update. This adds the ability to bypass ECA for Gitlab groups designated in this file, with currently our new PHP site archive being the only set group. It should make a couple of our migration activities easier for larger projects as well.
@malowe can you remind me of the URI to download the latest ECA please?
The main branch raw file is here: https://gitlab.eclipse.org/eclipsefdn/it/api/git-eca-rest-api/-/raw/main/src/main/rb/eca.rb?ref_type=heads