......@@ -92,6 +92,14 @@ setup-test-env:
- .use-pg10
- .only-master
rspec migration pg9:
extends: .rspec-base-pg9
parallel: 4
rspec migration pg9-foss:
extends: .rspec-base-pg9-foss
parallel: 4
rspec unit pg9:
extends: .rspec-base-pg9
parallel: 20
......@@ -140,9 +148,13 @@ rspec system pg10:
- .only-ee
- .use-pg10-ee
rspec-ee migration pg9:
extends: .rspec-ee-base-pg9
parallel: 2
rspec-ee unit pg9:
extends: .rspec-ee-base-pg9
parallel: 7
parallel: 5
rspec-ee integration pg9:
extends: .rspec-ee-base-pg9
......@@ -152,11 +164,17 @@ rspec-ee system pg9:
extends: .rspec-ee-base-pg9
parallel: 5
rspec-ee migration pg10:
extends:
- .rspec-ee-base-pg10
- .only-master
parallel: 2
rspec-ee unit pg10:
extends:
- .rspec-ee-base-pg10
- .only-master
parallel: 7
parallel: 5
rspec-ee integration pg10:
extends:
......
......
......@@ -170,7 +170,7 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
),
),
{
gitlabIntegrationLink: `<a href="https://docs.gitlab.com/ce/user/project/integrations/crossplane.html"
gitlabIntegrationLink: `<a href="https://docs.gitlab.com/ee/user/clusters/applications.html#crossplane"
target="_blank" rel="noopener noreferrer">
${_.escape(s__('ClusterIntegration|Gitlab Integration'))}</a>`,
kubectl: `<code>kubectl</code>`,
......
......
......@@ -9,7 +9,12 @@ export default {
LogLine,
},
computed: {
...mapState(['traceEndpoint', 'trace', 'isTraceComplete']),
...mapState([
'traceEndpoint',
'trace',
'isTraceComplete',
'isScrolledToBottomBeforeReceivingTrace',
]),
},
updated() {
this.$nextTick(() => {
......
......
......@@ -274,12 +274,6 @@
height: 24px;
}
.git-clone-holder {
.btn {
height: auto;
}
}
.dropdown-toggle,
.clone-dropdown-btn {
.fa {
......
......
......@@ -2,6 +2,7 @@
class Projects::ErrorTrackingController < Projects::ApplicationController
before_action :authorize_read_sentry_issue!
before_action :set_issue_id, only: [:details, :stack_trace]
POLLING_INTERVAL = 10_000
......@@ -113,6 +114,10 @@ class Projects::ErrorTrackingController < Projects::ApplicationController
params.permit(:issue_id)
end
def set_issue_id
@issue_id = issue_details_params[:issue_id]
end
def set_polling_interval
Gitlab::PollingInterval.set_header(response, interval: POLLING_INTERVAL)
end
......
......
......@@ -14,12 +14,12 @@ module Projects::ErrorTrackingHelper
}
end
def error_details_data(project, issue)
opts = [project, issue, { format: :json }]
def error_details_data(project, issue_id)
opts = [project, issue_id, { format: :json }]
{
'issue-details-path' => details_namespace_project_error_tracking_index_path(*opts),
'issue-stack-trace-path' => stack_trace_namespace_project_error_tracking_index_path(*opts)
'issue-details-path' => details_project_error_tracking_index_path(*opts),
'issue-stack-trace-path' => stack_trace_project_error_tracking_index_path(*opts)
}
end
end
......@@ -4,14 +4,14 @@ module MergeRequests
class PushOptionsHandlerService
LIMIT = 10
attr_reader :branches, :changes_by_branch, :current_user, :errors,
attr_reader :current_user, :errors, :changes,
:project, :push_options, :target_project
def initialize(project, current_user, changes, push_options)
@project = project
@target_project = @project.default_merge_request_target
@current_user = current_user
@branches = get_branches(changes)
@changes = Gitlab::ChangesList.new(changes)
@push_options = push_options
@errors = []
end
......@@ -34,8 +34,12 @@ module MergeRequests
private
def get_branches(raw_changes)
Gitlab::ChangesList.new(raw_changes).map do |changes|
def branches
changes_by_branch.keys
end
def changes_by_branch
@changes_by_branch ||= changes.each_with_object({}) do |changes, result|
next unless Gitlab::Git.branch_ref?(changes[:ref])
# Deleted branch
......@@ -45,8 +49,8 @@ module MergeRequests
branch_name = Gitlab::Git.branch_name(changes[:ref])
next if branch_name == target_project.default_branch
branch_name
end.compact.uniq
result[branch_name] = changes
end
end
def validate_service
......@@ -112,7 +116,7 @@ module MergeRequests
merge_request = ::MergeRequests::UpdateService.new(
target_project,
current_user,
update_params
update_params(merge_request)
).execute(merge_request)
collect_errors_from_merge_request(merge_request) unless merge_request.valid?
......@@ -130,19 +134,22 @@ module MergeRequests
params.compact!
if push_options.key?(:merge_when_pipeline_succeeds)
params.merge!(
merge_when_pipeline_succeeds: push_options[:merge_when_pipeline_succeeds],
merge_user: current_user
)
end
params[:add_labels] = params.delete(:label).keys if params.has_key?(:label)
params[:remove_labels] = params.delete(:unlabel).keys if params.has_key?(:unlabel)
params
end
def merge_params(branch)
return {} unless push_options.key?(:merge_when_pipeline_succeeds)
{
merge_when_pipeline_succeeds: push_options[:merge_when_pipeline_succeeds],
merge_user: current_user,
sha: changes_by_branch.dig(branch, :newrev)
}
end
def create_params(branch)
params = base_params
......@@ -153,13 +160,15 @@ module MergeRequests
target_project: target_project
)
params.merge!(merge_params(branch))
params[:target_branch] ||= target_project.default_branch
params
end
def update_params
base_params
def update_params(merge_request)
base_params.merge(merge_params(merge_request.source_branch))
end
def collect_errors_from_merge_request(merge_request)
......
......
- if !Gitlab::CurrentSettings.eks_integration_enabled?
- documentation_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path("integration/amazon") }
- documentation_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/clusters/add_remove_clusters.md',
anchor: 'additional-requirements-for-self-managed-instances') }
= s_('Amazon authentication is not %{link_start}correctly configured%{link_end}. Ask your GitLab administrator if you want to use this service.').html_safe % { link_start: documentation_link_start, link_end: '<a/>'.html_safe }
- else
.js-create-eks-cluster-form-container{ data: { 'gitlab-managed-cluster-help-path' => help_page_path('user/project/clusters/index.md', anchor: 'gitlab-managed-clusters'),
......@@ -16,5 +17,7 @@
'account-id' => Gitlab::CurrentSettings.eks_account_id,
'external-id' => @aws_role.role_external_id,
'kubernetes-integration-help-path' => help_page_path('user/project/clusters/index'),
'account-and-external-ids-help-path' => help_page_path('user/project/clusters/add_remove_clusters.md', anchor: 'eks-cluster'),
'create-role-arn-help-path' => help_page_path('user/project/clusters/add_remove_clusters.md', anchor: 'eks-cluster'),
'external-link-icon' => icon('external-link'),
'has-credentials' => @aws_role.role_arn.present?.to_s } }
- page_title _('Error Details')
- add_to_breadcrumbs 'Errors', project_error_tracking_index_path(@project)
#js-error_details{ data: error_details_data(@current_user, @project) }
#js-error_details{ data: error_details_data(@project, @issue_id) }
---
title: Fix Crossplane help link in cluster applications page
merge_request: 20668
author:
type: fixed
---
title: Fixes job log not scrolling to the bottom
merge_request:
author:
type: fixed
---
title: Fix merging merge requests from push options
merge_request: 20639
author:
type: fixed
---
title: Fix project creation with templates using /projects/user/:id API
merge_request: 20590
author:
type: fixed
---
title: Flatten exception details in API and controller logs
merge_request: 20434
author:
type: changed
......@@ -44,16 +44,7 @@ unless Sidekiq.server?
# https://github.com/roidrage/lograge#logging-errors--exceptions
exception = event.payload[:exception_object]
if exception
payload[:exception] = {
class: exception.class.name,
message: exception.message
}
if exception.backtrace
payload[:exception][:backtrace] = Gitlab::Profiler.clean_backtrace(exception.backtrace)
end
end
::Gitlab::ExceptionLogFormatter.format!(exception, payload)
payload
end
......
......
......@@ -8,10 +8,13 @@ class RemoveIndexOnSnippetsProjectId < ActiveRecord::Migration[5.2]
disable_ddl_transaction!
def up
remove_concurrent_index :snippets, [:project_id]
remove_concurrent_index_by_name :snippets, 'index_snippets_on_project_id'
# This is an extra index that is not present in db/schema.rb but known to exist on some installs
remove_concurrent_index_by_name :snippets, :snippets_project_id_idx if index_exists_by_name? :snippets, :snippets_project_id_idx
end
def down
add_concurrent_index :snippets, [:project_id]
add_concurrent_index :snippets, [:project_id], name: 'index_snippets_on_project_id'
end
end
......@@ -266,7 +266,7 @@ these epics/issues:
| All database content | **Yes** | **Yes** | |
| Project repository | **Yes** | **Yes** | |
| Project wiki repository | **Yes** | **Yes** | |
| Project designs repository | [No][design-replication] | [No][design-verification] | |
| Project designs repository | **Yes** | [No][design-verification] | Behind feature flag (2) |
| Uploads | **Yes** | [No][upload-verification] | Verified only on transfer, or manually (1) |
| LFS Objects | **Yes** | [No][lfs-verification] | Verified only on transfer, or manually (1) |
| CI job artifacts (other than traces) | **Yes** | [No][artifact-verification] | Verified only manually (1) |
......@@ -307,6 +307,12 @@ these epics/issues:
1. The integrity can be verified manually using
[Integrity Check Rake Task](../../raketasks/check.md)
on both nodes and comparing the output between them.
1. Enable the `enable_geo_design_sync` feature flag by running the
following in a Rails console:
```ruby
Feature.disable(:enable_geo_design_sync)
```
DANGER: **DANGER**
Features not on this list, or with **No** in the **Replicated** column,
......
......
......@@ -67,10 +67,9 @@ NOTE: **Note:** Starting with GitLab 12.5, if an error occurs, an
"queue_duration": 274.35,
"correlation_id": "KjDVUhNvvV3",
"cpu_s": 2.837645135999999,
"exception": {
"class": "NameError",
"message": "undefined local variable or method `adsf' for #<Admin::DashboardController:0x00007ff3c9648588>",
"backtrace": [
"exception.class": "NameError",
"exception.message": "undefined local variable or method `adsf' for #<Admin::DashboardController:0x00007ff3c9648588>",
"exception.backtrace": [
"app/controllers/admin/dashboard_controller.rb:11:in `index'",
"ee/app/controllers/ee/admin/dashboard_controller.rb:14:in `index'",
"ee/lib/gitlab/ip_address_state.rb:10:in `with'",
......@@ -81,7 +80,6 @@ NOTE: **Note:** Starting with GitLab 12.5, if an error occurs, an
"ee/lib/gitlab/jira/middleware.rb:19:in `call'"
]
}
}
```
## `production.log`
......
......
......@@ -738,6 +738,11 @@ NOTE: **Note:**
The most _specific_ spec takes precedence over the other wildcard matching.
In this case, `review/feature-1` spec takes precedence over `review/*` and `*` specs.
### Environments Dashboard **(PREMIUM)**
See [Environments Dashboard](environments/environments_dashboard.md) for a summary of each
environment's operational health.
## Limitations
In the `environment: name`, you are limited to only the [predefined environment variables](variables/predefined_variables.md).
......
......
---
type: reference
---
# Environments Dashboard **(PREMIUM)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/3713) in [GitLab Premium](https://about.gitlab.com/pricing/) 12.5.
The Environments Dashboard provides a cross-project
environment-based view that lets you see the big picture
of what is going on in each environment. From a single
location, you can track the progress as changes flow
from development to staging, and then to production (or
through any series of custom environment flows you can set up).
With an at-a-glance view of multiple projects, you can instantly
see which pipelines are green and which are red allowing you to
diagnose if there is a block at a particular point, or if there’s
a more systemic problem you need to investigate.
You can access the dashboard from the top bar by clicking
**More > Environments**.
![Environments Dashboard with projects](img/environments_dashboard_v12_5.png)
The Environments Dashboard displays a maximum of 7 projects
and 3 environments per project.
The listed environments for each project are unique, such as
"production", "staging", etc. Review apps and other grouped
environments are not displayed.
## Adding a project to the dashboard
To add a project to the dashboard:
1. Click the **Add projects** button in the homescreen of the dashboard.
1. Search and add one or more projects using the **Search your projects** field.
1. Click the **Add projects** button.
Once added, you can see a summary of each project's environment operational
health, including the latest commit, pipeline status, and deployment time.
The Environments and [Operations](../../user/operations_dashboard/index.md)
dashboards share the same list of projects. When you add or remove a
project from one, GitLab adds or removes the project from the other.
## Environment dashboards on GitLab.com
GitLab.com users can add public projects to the Environments
Dashboard for free. If your project is private, the group it belongs
to must have a [GitLab Silver](https://about.gitlab.com/pricing/) plan.