diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-08 00:09:59 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-08 00:09:59 +0300 |
commit | 364e69bafd235e5689fba44bb5eef37305cb6c6d (patch) | |
tree | 563bb6addd54e5ba4c93eaf1dee54eaab60f7a68 /app | |
parent | 59f37a99433dbdc3093e06f0f57beff171bae5d4 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
5 files changed, 18 insertions, 55 deletions
diff --git a/app/controllers/explore/groups_controller.rb b/app/controllers/explore/groups_controller.rb index 97791b43d41..ac355b861b3 100644 --- a/app/controllers/explore/groups_controller.rb +++ b/app/controllers/explore/groups_controller.rb @@ -7,6 +7,8 @@ class Explore::GroupsController < Explore::ApplicationController urgency :low def index - render_group_tree GroupsFinder.new(current_user).execute + user = Feature.enabled?(:generic_explore_groups, current_user, type: :experiment) ? nil : current_user + + render_group_tree GroupsFinder.new(user).execute end end diff --git a/app/services/clusters/applications/check_ingress_ip_address_service.rb b/app/services/clusters/applications/check_ingress_ip_address_service.rb deleted file mode 100644 index e254a0358a0..00000000000 --- a/app/services/clusters/applications/check_ingress_ip_address_service.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -module Clusters - module Applications - class CheckIngressIpAddressService < BaseHelmService - include Gitlab::Utils::StrongMemoize - - Error = Class.new(StandardError) - - LEASE_TIMEOUT = 15.seconds.to_i - - def execute - return if app.external_ip - return if app.external_hostname - return unless try_obtain_lease - - app.external_ip = ingress_ip if ingress_ip - app.external_hostname = ingress_hostname if ingress_hostname - - app.save! if app.changed? - end - - private - - def try_obtain_lease - Gitlab::ExclusiveLease - .new("check_ingress_ip_address_service:#{app.id}", timeout: LEASE_TIMEOUT) - .try_obtain - end - - def ingress_ip - ingress_service&.ip - end - - def ingress_hostname - ingress_service&.hostname - end - - def ingress_service - strong_memoize(:ingress_service) do - app.ingress_service.status.loadBalancer.ingress&.first - end - end - end - end -end diff --git a/app/services/event_create_service.rb b/app/services/event_create_service.rb index 019246dfc9f..193b1b6f150 100644 --- a/app/services/event_create_service.rb +++ b/app/services/event_create_service.rb @@ -213,7 +213,15 @@ class EventCreateService namespace = project.namespace if Feature.enabled?(:route_hll_to_snowplow, namespace) - Gitlab::Tracking.event(self.class.to_s, 'action_active_users_project_repo', namespace: namespace, user: current_user, project: project) + Gitlab::Tracking.event( + self.class.to_s, + :push, + label: 'usage_activity_by_stage_monthly.create.action_monthly_active_users_project_repo', + namespace: namespace, + user: current_user, + project: project, + context: [Gitlab::Tracking::ServicePingContext.new(data_source: :redis_hll, event: 'action_active_users_project_repo').to_context] + ) end Users::LastPushEventService.new(current_user) diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml index bf6b628dd36..b5481f19352 100644 --- a/app/views/projects/commits/_commit.html.haml +++ b/app/views/projects/commits/_commit.html.haml @@ -34,8 +34,8 @@ · = commit.short_id - if commit.description? && collapsible - %button.gl-button.btn.btn-default.button-ellipsis-horizontal.btn-sm.gl-ml-2.text-expander.js-toggle-button{ data: { toggle: 'tooltip', container: 'body' }, :title => _("Toggle commit description"), aria: { label: _("Toggle commit description") } } - = sprite_icon('ellipsis_h', size: 12) + = render Pajamas::ButtonComponent.new(icon: 'ellipsis_h', + button_options: { class: 'button-ellipsis-horizontal text-expander js-toggle-button', data: { toggle: 'tooltip', container: 'body' }, :title => _("Toggle commit description"), aria: { label: _("Toggle commit description") }}) .committer - commit_author_link = commit_author_link(commit, avatar: false, size: 24) diff --git a/app/workers/cluster_wait_for_ingress_ip_address_worker.rb b/app/workers/cluster_wait_for_ingress_ip_address_worker.rb index 561e72562e9..8983942c0fb 100644 --- a/app/workers/cluster_wait_for_ingress_ip_address_worker.rb +++ b/app/workers/cluster_wait_for_ingress_ip_address_worker.rb @@ -1,5 +1,8 @@ # frozen_string_literal: true +# DEPRECATED +# +# To be removed by https://gitlab.com/gitlab-org/gitlab/-/issues/366573 class ClusterWaitForIngressIpAddressWorker # rubocop:disable Scalability/IdempotentWorker include ApplicationWorker @@ -12,9 +15,5 @@ class ClusterWaitForIngressIpAddressWorker # rubocop:disable Scalability/Idempot worker_has_external_dependencies! loggable_arguments 0 - def perform(app_name, app_id) - find_application(app_name, app_id) do |app| - Clusters::Applications::CheckIngressIpAddressService.new(app).execute - end - end + def perform(app_name, app_id); end end |