Commit b2d6ae0f authored by Kerri Miller's avatar Kerri Miller

Merge branch '205578-refactor-pkg-event-generation' into 'master'

Refactor package event list generation

See merge request gitlab-org/gitlab!48305
parents 8f51e3cc cfc4e738
---
- name: i_package_maven_user_push
category: maven_packages
- name: i_package_composer_deploy_token_delete
category: composer_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_maven_deploy_token_push
category: maven_packages
- name: i_package_composer_deploy_token_pull
category: composer_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_maven_user_delete
category: maven_packages
- name: i_package_composer_deploy_token_push
category: composer_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_maven_deploy_token_delete
category: maven_packages
- name: i_package_composer_user_delete
category: composer_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_maven_user_pull
category: maven_packages
- name: i_package_composer_user_pull
category: composer_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_maven_deploy_token_pull
category: maven_packages
- name: i_package_composer_user_push
category: composer_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_npm_user_push
category: npm_packages
- name: i_package_conan_deploy_token_delete
category: conan_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_npm_deploy_token_push
category: npm_packages
- name: i_package_conan_deploy_token_pull
category: conan_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_npm_user_delete
category: npm_packages
- name: i_package_conan_deploy_token_push
category: conan_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_npm_deploy_token_delete
category: npm_packages
- name: i_package_conan_user_delete
category: conan_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_npm_user_pull
category: npm_packages
- name: i_package_conan_user_pull
category: conan_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_npm_deploy_token_pull
category: npm_packages
- name: i_package_conan_user_push
category: conan_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_conan_user_push
category: conan_packages
- name: i_package_container_deploy_token_delete
category: container_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_conan_deploy_token_push
category: conan_packages
- name: i_package_container_deploy_token_pull
category: container_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_conan_user_delete
category: conan_packages
- name: i_package_container_deploy_token_push
category: container_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_conan_deploy_token_delete
category: conan_packages
- name: i_package_container_user_delete
category: container_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_conan_user_pull
category: conan_packages
- name: i_package_container_user_pull
category: container_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_conan_deploy_token_pull
category: conan_packages
- name: i_package_container_user_push
category: container_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_nuget_user_push
category: nuget_packages
- name: i_package_debian_deploy_token_delete
category: debian_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_nuget_deploy_token_push
category: nuget_packages
- name: i_package_debian_deploy_token_pull
category: debian_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_nuget_user_delete
category: nuget_packages
- name: i_package_debian_deploy_token_push
category: debian_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_nuget_deploy_token_delete
category: nuget_packages
- name: i_package_debian_user_delete
category: debian_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_nuget_user_pull
category: nuget_packages
- name: i_package_debian_user_pull
category: debian_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_nuget_deploy_token_pull
category: nuget_packages
- name: i_package_debian_user_push
category: debian_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_pypi_user_push
category: pypi_packages
- name: i_package_generic_deploy_token_delete
category: generic_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_pypi_deploy_token_push
category: pypi_packages
- name: i_package_generic_deploy_token_pull
category: generic_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_pypi_user_delete
category: pypi_packages
- name: i_package_generic_deploy_token_push
category: generic_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_pypi_deploy_token_delete
category: pypi_packages
- name: i_package_generic_user_delete
category: generic_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_pypi_user_pull
category: pypi_packages
- name: i_package_generic_user_pull
category: generic_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_pypi_deploy_token_pull
category: pypi_packages
- name: i_package_generic_user_push
category: generic_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_composer_user_push
category: composer_packages
- name: i_package_golang_deploy_token_delete
category: golang_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_composer_deploy_token_push
category: composer_packages
- name: i_package_golang_deploy_token_pull
category: golang_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_composer_user_delete
category: composer_packages
- name: i_package_golang_deploy_token_push
category: golang_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_composer_deploy_token_delete
category: composer_packages
- name: i_package_golang_user_delete
category: golang_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_composer_user_pull
category: composer_packages
- name: i_package_golang_user_pull
category: golang_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_composer_deploy_token_pull
category: composer_packages
- name: i_package_golang_user_push
category: golang_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_generic_user_push
category: generic_packages
- name: i_package_maven_deploy_token_delete
category: maven_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_generic_deploy_token_push
category: generic_packages
- name: i_package_maven_deploy_token_pull
category: maven_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_generic_user_delete
category: generic_packages
- name: i_package_maven_deploy_token_push
category: maven_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_generic_deploy_token_delete
category: generic_packages
- name: i_package_maven_user_delete
category: maven_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_generic_user_pull
category: generic_packages
- name: i_package_maven_user_pull
category: maven_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_generic_deploy_token_pull
category: generic_packages
- name: i_package_maven_user_push
category: maven_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_golang_user_push
category: golang_packages
- name: i_package_npm_deploy_token_delete
category: npm_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_golang_deploy_token_push
category: golang_packages
- name: i_package_npm_deploy_token_pull
category: npm_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_golang_user_delete
category: golang_packages
- name: i_package_npm_deploy_token_push
category: npm_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_golang_deploy_token_delete
category: golang_packages
- name: i_package_npm_user_delete
category: npm_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_golang_user_pull
category: golang_packages
- name: i_package_npm_user_pull
category: npm_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_golang_deploy_token_pull
category: golang_packages
- name: i_package_npm_user_push
category: npm_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_debian_user_push
category: debian_packages
- name: i_package_nuget_deploy_token_delete
category: nuget_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_debian_deploy_token_push
category: debian_packages
- name: i_package_nuget_deploy_token_pull
category: nuget_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_debian_user_delete
category: debian_packages
- name: i_package_nuget_deploy_token_push
category: nuget_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_debian_deploy_token_delete
category: debian_packages
- name: i_package_nuget_user_delete
category: nuget_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_debian_user_pull
category: debian_packages
- name: i_package_nuget_user_pull
category: nuget_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_debian_deploy_token_pull
category: debian_packages
- name: i_package_nuget_user_push
category: nuget_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_container_user_push
category: container_packages
- name: i_package_pypi_deploy_token_delete
category: pypi_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_container_deploy_token_push
category: container_packages
- name: i_package_pypi_deploy_token_pull
category: pypi_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_container_user_delete
category: container_packages
- name: i_package_pypi_deploy_token_push
category: pypi_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_container_deploy_token_delete
category: container_packages
- name: i_package_pypi_user_delete
category: pypi_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_container_user_pull
category: container_packages
- name: i_package_pypi_user_pull
category: pypi_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_container_deploy_token_pull
category: container_packages
- name: i_package_pypi_user_push
category: pypi_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_tag_user_push
- name: i_package_tag_deploy_token_delete
category: tag_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_tag_deploy_token_push
- name: i_package_tag_deploy_token_pull
category: tag_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_tag_user_delete
- name: i_package_tag_deploy_token_push
category: tag_packages
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_tag_deploy_token_delete
- name: i_package_tag_user_delete
category: tag_packages
aggregation: weekly
redis_slot: package
......@@ -324,7 +324,7 @@
aggregation: weekly
redis_slot: package
feature_flag: collect_package_events_redis
- name: i_package_tag_deploy_token_pull
- name: i_package_tag_user_push
category: tag_packages
aggregation: weekly
redis_slot: package
......
......@@ -18,12 +18,12 @@ namespace :gitlab do
end
def event_pairs
::Packages::Event.event_types.keys.product(::Packages::Event.originator_types.keys)
::Packages::Event.event_types.keys.product(::Packages::Event::EVENT_SCOPES.keys)
end
def generate_unique_events_list
::Packages::Event::EVENT_SCOPES.keys.each_with_object([]) do |event_scope, events|
event_pairs.each do |event_type, originator|
events = event_pairs.each_with_object([]) do |(event_type, event_scope), events|
::Packages::Event.originator_types.keys.excluding('guest').each do |originator|
if name = ::Packages::Event.allowed_event_name(event_scope, event_type, originator)
events << {
"name" => name,
......@@ -35,6 +35,8 @@ namespace :gitlab do
end
end
end
events.sort_by { |event| event["name"] }
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment