summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-11-04 06:09:57 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-11-04 06:09:57 +0000
commit5bfd7a344b73d6a9482b420fa7646f7d1760a566 (patch)
tree41f036cb640d0771d5943424f36009d334b3c3ef /app
parent96e9edba8a8898045daca33ae7dc3f03aa5b0677 (diff)
downloadgitlab-ce-5bfd7a344b73d6a9482b420fa7646f7d1760a566.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/finders/environments/environments_by_deployments_finder.rb16
-rw-r--r--app/serializers/merge_request_widget_entity.rb2
-rw-r--r--app/services/ci/retry_build_service.rb9
-rw-r--r--app/services/error_tracking/collect_error_service.rb2
4 files changed, 15 insertions, 14 deletions
diff --git a/app/finders/environments/environments_by_deployments_finder.rb b/app/finders/environments/environments_by_deployments_finder.rb
index e0ecc98b1c0..a41cfcb37e4 100644
--- a/app/finders/environments/environments_by_deployments_finder.rb
+++ b/app/finders/environments/environments_by_deployments_finder.rb
@@ -23,12 +23,18 @@ module Environments
deployments.none
end
- environment_ids = deployments
- .group(:environment_id)
- .select(:environment_id)
+ environments =
+ if Feature.enabled?(:environments_by_deployments_finder_exists_optimization, default_enabled: :yaml)
+ project.environments.available
+ .where('EXISTS (?)', deployments.where('environment_id = environments.id'))
+ else
+ environment_ids = deployments
+ .group(:environment_id)
+ .select(:environment_id)
- environments = project.environments.available
- .where(id: environment_ids)
+ project.environments.available
+ .where(id: environment_ids)
+ end
if params[:find_latest]
find_one(environments.order_by_last_deployed_at_desc)
diff --git a/app/serializers/merge_request_widget_entity.rb b/app/serializers/merge_request_widget_entity.rb
index 1e4289ce774..a633cefc73d 100644
--- a/app/serializers/merge_request_widget_entity.rb
+++ b/app/serializers/merge_request_widget_entity.rb
@@ -48,7 +48,7 @@ class MergeRequestWidgetEntity < Grape::Entity
end
expose :conflicts_docs_path do |merge_request|
- help_page_path('user/project/merge_requests/resolve_conflicts.md')
+ help_page_path('user/project/merge_requests/conflicts.md')
end
expose :reviewing_and_managing_merge_requests_docs_path do |merge_request|
diff --git a/app/services/ci/retry_build_service.rb b/app/services/ci/retry_build_service.rb
index b142dde21b0..ebb07de9d29 100644
--- a/app/services/ci/retry_build_service.rb
+++ b/app/services/ci/retry_build_service.rb
@@ -77,13 +77,8 @@ module Ci
end
def deployment_attributes_for(new_build, old_build)
- if Feature.enabled?(:sticky_environments_in_job_retry, project, default_enabled: :yaml)
- ::Gitlab::Ci::Pipeline::Seed::Build
- .deployment_attributes_for(new_build, old_build.persisted_environment)
- else
- ::Gitlab::Ci::Pipeline::Seed::Build
- .deployment_attributes_for(new_build)
- end
+ ::Gitlab::Ci::Pipeline::Seed::Build
+ .deployment_attributes_for(new_build, old_build.persisted_environment)
end
end
end
diff --git a/app/services/error_tracking/collect_error_service.rb b/app/services/error_tracking/collect_error_service.rb
index 477453a693e..fc2bdb84939 100644
--- a/app/services/error_tracking/collect_error_service.rb
+++ b/app/services/error_tracking/collect_error_service.rb
@@ -15,7 +15,7 @@ module ErrorTracking
)
# The payload field contains all the data on error including stacktrace in jsonb.
- # Together with occured_at these are 2 main attributes that we need to save here.
+ # Together with occurred_at these are 2 main attributes that we need to save here.
error.events.create!(
environment: event['environment'],
description: exception['value'],