summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-27 18:09:04 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-27 18:09:04 +0000
commit390582e118752426acf5cb25ec99103d312d891c (patch)
treebb0b1a6a46632024ffc3ba1983e4ebcb0fab4428
parent1ea1db491c8bc90789acda45c9002aaa5c4dc498 (diff)
downloadgitlab-ce-390582e118752426acf5cb25ec99103d312d891c.tar.gz
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--app/assets/javascripts/error_tracking/components/constants.js15
-rw-r--r--app/assets/javascripts/error_tracking/components/error_details.vue14
-rw-r--r--app/assets/javascripts/registry/settings/components/settings_form.vue4
-rw-r--r--app/models/clusters/applications/ingress.rb2
-rw-r--r--app/models/project_services/jira_service.rb20
-rw-r--r--changelogs/unreleased/196765-bump-ingress-to-1-29.yml5
-rw-r--r--changelogs/unreleased/198411-more-verbose-jira-error-logs.yml5
-rw-r--r--changelogs/unreleased/39075-error-level-color.yml5
-rw-r--r--changelogs/unreleased/refactoring-entities-file-4.yml5
-rw-r--r--config/initializers/console_message.rb6
-rw-r--r--doc/integration/elasticsearch.md9
-rw-r--r--doc/user/application_security/license_compliance/index.md5
-rw-r--r--doc/user/packages/container_registry/img/expiration-policy-app.pngbin90268 -> 93286 bytes
-rw-r--r--doc/user/packages/container_registry/index.md2
-rw-r--r--lib/api/entities.rb46
-rw-r--r--lib/api/entities/hook.rb10
-rw-r--r--lib/api/entities/project_export_status.rb20
-rw-r--r--lib/api/entities/project_hook.rb12
-rw-r--r--lib/api/entities/project_identity.rb12
-rw-r--r--lib/api/entities/shared_group.rb17
-rw-r--r--lib/gitlab/git/rugged_impl/use_rugged.rb4
-rw-r--r--locale/gitlab.pot6
-rw-r--r--qa/qa/resource/user.rb13
-rw-r--r--qa/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb3
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb3
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_http_spec.rb3
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb3
-rw-r--r--spec/frontend/error_tracking/components/error_details_spec.js24
-rw-r--r--spec/frontend/registry/settings/components/__snapshots__/settings_form_spec.js.snap2
-rw-r--r--spec/lib/gitlab/git/rugged_impl/use_rugged_spec.rb6
-rw-r--r--spec/models/clusters/applications/ingress_spec.rb4
-rw-r--r--spec/models/project_services/jira_service_spec.rb47
32 files changed, 233 insertions, 99 deletions
diff --git a/app/assets/javascripts/error_tracking/components/constants.js b/app/assets/javascripts/error_tracking/components/constants.js
new file mode 100644
index 00000000000..7e3321c91bc
--- /dev/null
+++ b/app/assets/javascripts/error_tracking/components/constants.js
@@ -0,0 +1,15 @@
+export const severityLevel = {
+ FATAL: 'fatal',
+ ERROR: 'error',
+ WARNING: 'warning',
+ INFO: 'info',
+ DEBUG: 'debug',
+};
+
+export const severityLevelVariant = {
+ [severityLevel.FATAL]: 'danger',
+ [severityLevel.ERROR]: 'dark',
+ [severityLevel.WARNING]: 'warning',
+ [severityLevel.INFO]: 'info',
+ [severityLevel.DEBUG]: 'light',
+};
diff --git a/app/assets/javascripts/error_tracking/components/error_details.vue b/app/assets/javascripts/error_tracking/components/error_details.vue
index 819d501cba6..efc7e3c0809 100644
--- a/app/assets/javascripts/error_tracking/components/error_details.vue
+++ b/app/assets/javascripts/error_tracking/components/error_details.vue
@@ -11,6 +11,7 @@ import Stacktrace from './stacktrace.vue';
import TrackEventDirective from '~/vue_shared/directives/track_event';
import timeagoMixin from '~/vue_shared/mixins/timeago';
import { trackClickErrorLinkToSentryOptions } from '../utils';
+import { severityLevel, severityLevelVariant } from './constants';
import query from '../queries/details.query.graphql';
@@ -147,6 +148,11 @@ export default {
errorLevel() {
return sprintf(__('level: %{level}'), { level: this.error.tags.level });
},
+ errorSeverityVariant() {
+ return (
+ severityLevelVariant[this.error.tags.level] || severityLevelVariant[severityLevel.ERROR]
+ );
+ },
},
mounted() {
this.startPollingDetails(this.issueDetailsPath);
@@ -228,8 +234,12 @@ export default {
<h2 class="text-truncate">{{ GQLerror.title }}</h2>
</tooltip-on-truncate>
<template v-if="error.tags">
- <gl-badge v-if="error.tags.level" variant="danger" class="rounded-pill mr-2"
- >{{ errorLevel }}
+ <gl-badge
+ v-if="error.tags.level"
+ :variant="errorSeverityVariant"
+ class="rounded-pill mr-2"
+ >
+ {{ errorLevel }}
</gl-badge>
<gl-badge v-if="error.tags.logger" variant="light" class="rounded-pill"
>{{ error.tags.logger }}
diff --git a/app/assets/javascripts/registry/settings/components/settings_form.vue b/app/assets/javascripts/registry/settings/components/settings_form.vue
index b713cfe2e34..334fde23b74 100644
--- a/app/assets/javascripts/registry/settings/components/settings_form.vue
+++ b/app/assets/javascripts/registry/settings/components/settings_form.vue
@@ -174,7 +174,9 @@ export default {
:label-cols="$options.labelsConfig.cols"
:label-align="$options.labelsConfig.align"
label-for="expiration-policy-name-matching"
- :label="s__('ContainerRegistry|Expire Docker tags that match this regex:')"
+ :label="
+ s__('ContainerRegistry|Docker tags with names matching this regex pattern will expire:')
+ "
:state="nameRegexState"
:invalid-feedback="
s__('ContainerRegistry|The value of this input should be less than 255 characters')
diff --git a/app/models/clusters/applications/ingress.rb b/app/models/clusters/applications/ingress.rb
index bf189d0f517..bdd7ad90fba 100644
--- a/app/models/clusters/applications/ingress.rb
+++ b/app/models/clusters/applications/ingress.rb
@@ -3,7 +3,7 @@
module Clusters
module Applications
class Ingress < ApplicationRecord
- VERSION = '1.22.1'
+ VERSION = '1.29.3'
MODSECURITY_LOG_CONTAINER_NAME = 'modsecurity-log'
self.table_name = 'clusters_applications_ingress'
diff --git a/app/models/project_services/jira_service.rb b/app/models/project_services/jira_service.rb
index 128cbc6fa82..9875e0b9b88 100644
--- a/app/models/project_services/jira_service.rb
+++ b/app/models/project_services/jira_service.rb
@@ -194,7 +194,7 @@ class JiraService < IssueTrackerService
def test(_)
result = test_settings
success = result.present?
- result = @error if @error && !success
+ result = @error&.message unless success
{ success: success, result: result }
end
@@ -205,6 +205,8 @@ class JiraService < IssueTrackerService
nil
end
+ private
+
def test_settings
return unless client_url.present?
@@ -212,8 +214,6 @@ class JiraService < IssueTrackerService
jira_request { client.ServerInfo.all.attrs }
end
- private
-
def can_cross_reference?(noteable)
case noteable
when Commit then commit_events
@@ -346,9 +346,17 @@ class JiraService < IssueTrackerService
# Handle errors when doing Jira API calls
def jira_request
yield
- rescue Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, Errno::ECONNREFUSED, URI::InvalidURIError, JIRA::HTTPError, OpenSSL::SSL::SSLError => e
- @error = e.message
- log_error("Error sending message", client_url: client_url, error: @error)
+ rescue Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, Errno::ECONNREFUSED, URI::InvalidURIError, JIRA::HTTPError, OpenSSL::SSL::SSLError => error
+ @error = error
+ log_error(
+ "Error sending message",
+ client_url: client_url,
+ error: {
+ exception_class: error.class.name,
+ exception_message: error.message,
+ exception_backtrace: error.backtrace.join("\n")
+ }
+ )
nil
end
diff --git a/changelogs/unreleased/196765-bump-ingress-to-1-29.yml b/changelogs/unreleased/196765-bump-ingress-to-1-29.yml
new file mode 100644
index 00000000000..66bc8475bab
--- /dev/null
+++ b/changelogs/unreleased/196765-bump-ingress-to-1-29.yml
@@ -0,0 +1,5 @@
+---
+title: Bump ingress managed app chart to 1.29.3
+merge_request: 23461
+author:
+type: changed
diff --git a/changelogs/unreleased/198411-more-verbose-jira-error-logs.yml b/changelogs/unreleased/198411-more-verbose-jira-error-logs.yml
new file mode 100644
index 00000000000..42d6918f572
--- /dev/null
+++ b/changelogs/unreleased/198411-more-verbose-jira-error-logs.yml
@@ -0,0 +1,5 @@
+---
+title: More verbose JiraService error logs
+merge_request: 23688
+author:
+type: other
diff --git a/changelogs/unreleased/39075-error-level-color.yml b/changelogs/unreleased/39075-error-level-color.yml
new file mode 100644
index 00000000000..8cce55c1a43
--- /dev/null
+++ b/changelogs/unreleased/39075-error-level-color.yml
@@ -0,0 +1,5 @@
+---
+title: Indicate Sentry error severity in GitLab
+merge_request: 23346
+author:
+type: added
diff --git a/changelogs/unreleased/refactoring-entities-file-4.yml b/changelogs/unreleased/refactoring-entities-file-4.yml
new file mode 100644
index 00000000000..cdf2667593d
--- /dev/null
+++ b/changelogs/unreleased/refactoring-entities-file-4.yml
@@ -0,0 +1,5 @@
+---
+title: Add separate classes for project hook, identity, export status
+merge_request: 23789
+author: Rajendra Kadam
+type: added
diff --git a/config/initializers/console_message.rb b/config/initializers/console_message.rb
index 04c109aa844..490a2a48a9a 100644
--- a/config/initializers/console_message.rb
+++ b/config/initializers/console_message.rb
@@ -1,10 +1,10 @@
# rubocop:disable Rails/Output
-if defined?(Rails::Console)
- # note that this will not print out when using `spring`
+if defined?(Rails::Console) || Rails.env.development?
+ # when using `spring` this will only print out the first time
justify = 15
puts '-' * 80
- puts " GitLab:".ljust(justify) + "#{Gitlab::VERSION} (#{Gitlab.revision})"
+ puts " GitLab:".ljust(justify) + "#{Gitlab::VERSION} (#{Gitlab.revision}) #{Gitlab.ee? ? 'EE' : 'FOSS'}"
puts " GitLab Shell:".ljust(justify) + "#{Gitlab::VersionInfo.parse(Gitlab::Shell.new.version)}"
puts " #{Gitlab::Database.human_adapter_name}:".ljust(justify) + Gitlab::Database.version
diff --git a/doc/integration/elasticsearch.md b/doc/integration/elasticsearch.md
index 25dfc970869..9cba1465fa1 100644
--- a/doc/integration/elasticsearch.md
+++ b/doc/integration/elasticsearch.md
@@ -611,6 +611,15 @@ Here are some common pitfalls and how to overcome them:
}
}'
```
+
+- **I'm getting a `health check timeout: no Elasticsearch node available` error in Sidekiq during the indexing process**
+
+ ```
+ Gitlab::Elastic::Indexer::Error: time="2020-01-23T09:13:00Z" level=fatal msg="health check timeout: no Elasticsearch node available"
+ ```
+
+ You probably have not used either `http://` or `https://` as part of your value in the **"URL"** field of the Elasticseach Integration Menu. Please make sure you are using either `http://` or `https://` in this field as the [Elasticsearch client for Go](https://github.com/olivere/elastic) that we are using [needs the prefix for the URL to be acceped as valid](https://github.com/olivere/elastic/commit/a80af35aa41856dc2c986204e2b64eab81ccac3a).
+ Once you have corrected the formatting of the URL please delete the index (via the [dedicated rake task](#gitlab-elasticsearch-rake-tasks)) and [index the content of your intance](#adding-gitlabs-data-to-the-elasticsearch-index) once more.
### Reverting to basic search
diff --git a/doc/user/application_security/license_compliance/index.md b/doc/user/application_security/license_compliance/index.md
index fb6fa0632f6..ee8c4b8774c 100644
--- a/doc/user/application_security/license_compliance/index.md
+++ b/doc/user/application_security/license_compliance/index.md
@@ -179,9 +179,10 @@ If you still need to run tests during `mvn install`, add `-DskipTests=false` to
### Selecting the version of Python
> - [Introduced](https://gitlab.com/gitlab-org/security-products/license-management/merge_requests/36) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 12.0.
-> - In GitLab 12.2, Python 3.5 became the default.
+> - In [GitLab 12.2](https://gitlab.com/gitlab-org/gitlab/issues/12032), Python 3.5 became the default.
+> - In [GitLab 12.7](https://gitlab.com/gitlab-org/security-products/license-management/merge_requests/101), Python 3.8 became the default.
-License Compliance uses Python 3.5 and pip 19.1 by default.
+License Compliance uses Python 3.8 and pip 19.1 by default.
If your project requires Python 2, you can switch to Python 2.7 and pip 10.0
by setting the `LM_PYTHON_VERSION` environment variable to `2`.
diff --git a/doc/user/packages/container_registry/img/expiration-policy-app.png b/doc/user/packages/container_registry/img/expiration-policy-app.png
index 38de4d85ae5..e353fe27b2a 100644
--- a/doc/user/packages/container_registry/img/expiration-policy-app.png
+++ b/doc/user/packages/container_registry/img/expiration-policy-app.png
Binary files differ
diff --git a/doc/user/packages/container_registry/index.md b/doc/user/packages/container_registry/index.md
index 97831d65759..b10430633ff 100644
--- a/doc/user/packages/container_registry/index.md
+++ b/doc/user/packages/container_registry/index.md
@@ -177,7 +177,7 @@ The UI allows you to configure the following:
- **Expiration interval:** how long tags are exempt from being deleted.
- **Expiration schedule:** how often the cron job checking the tags should run.
- **Expiration latest:** how many tags to _always_ keep for each image.
-- **Expire Docker tags with regex matching:** the regex used to determine what tags should be expired. To qualify all tags for expiration, use the default value of `.*`.
+- **Docker tags with names matching this regex pattern will expire:** the regex used to determine what tags should be expired. To qualify all tags for expiration, use the default value of `.*`.
## Troubleshooting the GitLab Container Registry
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index f68365e6325..ae23d3c9347 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -2,52 +2,6 @@
module API
module Entities
- class Hook < Grape::Entity
- expose :id, :url, :created_at, :push_events, :tag_push_events, :merge_requests_events, :repository_update_events
- expose :enable_ssl_verification
- end
-
- class ProjectHook < Hook
- expose :project_id, :issues_events, :confidential_issues_events
- expose :note_events, :confidential_note_events, :pipeline_events, :wiki_page_events
- expose :job_events
- expose :push_events_branch_filter
- end
-
- class SharedGroup < Grape::Entity
- expose :group_id
- expose :group_name do |group_link, options|
- group_link.group.name
- end
- expose :group_full_path do |group_link, options|
- group_link.group.full_path
- end
- expose :group_access, as: :group_access_level
- expose :expires_at
- end
-
- class ProjectIdentity < Grape::Entity
- expose :id, :description
- expose :name, :name_with_namespace
- expose :path, :path_with_namespace
- expose :created_at
- end
-
- class ProjectExportStatus < ProjectIdentity
- include ::API::Helpers::RelatedResourcesHelpers
-
- expose :export_status
- expose :_links, if: lambda { |project, _options| project.export_status == :finished } do
- expose :api_url do |project|
- expose_url(api_v4_projects_export_download_path(id: project.id))
- end
-
- expose :web_url do |project|
- Gitlab::Routing.url_helpers.download_export_project_url(project)
- end
- end
- end
-
class RemoteMirror < Grape::Entity
expose :id
expose :enabled
diff --git a/lib/api/entities/hook.rb b/lib/api/entities/hook.rb
new file mode 100644
index 00000000000..ac813bcac3f
--- /dev/null
+++ b/lib/api/entities/hook.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+module API
+ module Entities
+ class Hook < Grape::Entity
+ expose :id, :url, :created_at, :push_events, :tag_push_events, :merge_requests_events, :repository_update_events
+ expose :enable_ssl_verification
+ end
+ end
+end
diff --git a/lib/api/entities/project_export_status.rb b/lib/api/entities/project_export_status.rb
new file mode 100644
index 00000000000..ad84a45996a
--- /dev/null
+++ b/lib/api/entities/project_export_status.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+module API
+ module Entities
+ class ProjectExportStatus < ProjectIdentity
+ include ::API::Helpers::RelatedResourcesHelpers
+
+ expose :export_status
+ expose :_links, if: lambda { |project, _options| project.export_status == :finished } do
+ expose :api_url do |project|
+ expose_url(api_v4_projects_export_download_path(id: project.id))
+ end
+
+ expose :web_url do |project|
+ Gitlab::Routing.url_helpers.download_export_project_url(project)
+ end
+ end
+ end
+ end
+end
diff --git a/lib/api/entities/project_hook.rb b/lib/api/entities/project_hook.rb
new file mode 100644
index 00000000000..cdd3714ed64
--- /dev/null
+++ b/lib/api/entities/project_hook.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+module API
+ module Entities
+ class ProjectHook < Hook
+ expose :project_id, :issues_events, :confidential_issues_events
+ expose :note_events, :confidential_note_events, :pipeline_events, :wiki_page_events
+ expose :job_events
+ expose :push_events_branch_filter
+ end
+ end
+end
diff --git a/lib/api/entities/project_identity.rb b/lib/api/entities/project_identity.rb
new file mode 100644
index 00000000000..2055195eea0
--- /dev/null
+++ b/lib/api/entities/project_identity.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+module API
+ module Entities
+ class ProjectIdentity < Grape::Entity
+ expose :id, :description
+ expose :name, :name_with_namespace
+ expose :path, :path_with_namespace
+ expose :created_at
+ end
+ end
+end
diff --git a/lib/api/entities/shared_group.rb b/lib/api/entities/shared_group.rb
new file mode 100644
index 00000000000..862e73e07f0
--- /dev/null
+++ b/lib/api/entities/shared_group.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+module API
+ module Entities
+ class SharedGroup < Grape::Entity
+ expose :group_id
+ expose :group_name do |group_link, options|
+ group_link.group.name
+ end
+ expose :group_full_path do |group_link, options|
+ group_link.group.full_path
+ end
+ expose :group_access, as: :group_access_level
+ expose :expires_at
+ end
+ end
+end
diff --git a/lib/gitlab/git/rugged_impl/use_rugged.rb b/lib/gitlab/git/rugged_impl/use_rugged.rb
index 068aaf03c51..f63e35030c1 100644
--- a/lib/gitlab/git/rugged_impl/use_rugged.rb
+++ b/lib/gitlab/git/rugged_impl/use_rugged.rb
@@ -16,7 +16,9 @@ module Gitlab
end
def running_puma_with_multiple_threads?
- Gitlab::Runtime.puma? && ::Puma.cli_config.options[:max_threads] > 1
+ return false unless Gitlab::Runtime.puma?
+
+ ::Puma.respond_to?(:cli_config) && ::Puma.cli_config.options[:max_threads] > 1
end
def execute_rugged_call(method_name, *args)
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index f44fd8b4cd2..dd18b627625 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -5065,6 +5065,9 @@ msgstr ""
msgid "ContainerRegistry|Docker tag expiration policy is %{toggleStatus}"
msgstr ""
+msgid "ContainerRegistry|Docker tags with names matching this regex pattern will expire:"
+msgstr ""
+
msgid "ContainerRegistry|Expiration interval:"
msgstr ""
@@ -5077,9 +5080,6 @@ msgstr ""
msgid "ContainerRegistry|Expiration schedule:"
msgstr ""
-msgid "ContainerRegistry|Expire Docker tags that match this regex:"
-msgstr ""
-
msgid "ContainerRegistry|If you are not already logged in, you need to authenticate to the Container Registry by using your GitLab username and password. If you have %{twofaDocLinkStart}Two-Factor Authentication%{twofaDocLinkEnd} enabled, use a %{personalAccessTokensDocLinkStart}Personal Access Token%{personalAccessTokensDocLinkEnd} instead of a password."
msgstr ""
diff --git a/qa/qa/resource/user.rb b/qa/qa/resource/user.rb
index 9544a3e80b3..e6dbe3faa61 100644
--- a/qa/qa/resource/user.rb
+++ b/qa/qa/resource/user.rb
@@ -35,14 +35,17 @@ module QA
end
def email
- @email ||= "#{username}@example.com"
+ @email ||= begin
+ api_email = api_resource&.dig(:email)
+ api_email && !api_email.empty? ? api_email : "#{username}@example.com"
+ end
end
def public_email
@public_email ||= begin
api_public_email = api_resource&.dig(:public_email)
- api_public_email && api_public_email != '' ? api_public_email : Runtime::User.default_email
+ api_public_email && !api_public_email.empty? ? api_public_email : Runtime::User.default_email
end
end
@@ -87,6 +90,8 @@ module QA
end
def api_get_path
+ return "/user" if fetching_own_data?
+
"/users/#{fetch_id(username)}"
end
@@ -136,6 +141,10 @@ module QA
users.first[:id]
end
+
+ def fetching_own_data?
+ user&.username == username || Runtime::User.username == username
+ end
end
end
end
diff --git a/qa/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb
index d85929ebbca..409d67d51b1 100644
--- a/qa/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb
+++ b/qa/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb
@@ -1,8 +1,7 @@
# frozen_string_literal: true
module QA
- # BUG_IN_CODE
- context 'Manage', :github, quarantine: 'https://gitlab.com/gitlab-org/gitlab/issues/26952' do
+ context 'Manage', :github, quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/issues/26952', type: :bug } do
describe 'Project import from GitHub' do
let(:imported_project) do
Resource::ProjectImportedFromGithub.fabricate! do |project|
diff --git a/qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb b/qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb
index ff995fc1e0c..6ebe3e0b620 100644
--- a/qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb
@@ -1,8 +1,7 @@
# frozen_string_literal: true
module QA
- # BUG_IN_CODE
- context 'Create', quarantine: 'https://gitlab.com/gitlab-org/gitlab/issues/36817' do
+ context 'Create', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/issues/36817', type: :bug } do
describe 'Merge request rebasing' do
it 'user rebases source branch of merge request' do
Flow::Login.sign_in
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_http_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_http_spec.rb
index f3edd822ef7..ff0f212c289 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_http_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_http_spec.rb
@@ -2,8 +2,7 @@
module QA
# Git protocol v2 is temporarily disabled
- # BUG_IN_CODE
- context 'Create', quarantine: 'https://gitlab.com/gitlab-org/gitlab/issues/27828' do
+ context 'Create', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/issues/27828', type: :bug } do
describe 'Push over HTTP using Git protocol version 2', :requires_git_protocol_v2 do
it 'user pushes to the repository' do
Flow::Login.sign_in
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb
index 3362404e11b..0e8b8203c34 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb
@@ -2,8 +2,7 @@
module QA
# Git protocol v2 is temporarily disabled
- # BUG_IN_CODE
- context 'Create', quarantine: 'https://gitlab.com/gitlab-org/gitlab/issues/27828' do
+ context 'Create', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/issues/27828', type: :bug } do
describe 'Push over SSH using Git protocol version 2', :requires_git_protocol_v2 do
# Note: If you run this test against GDK make sure you've enabled sshd and
# enabled setting the Git protocol by adding `AcceptEnv GIT_PROTOCOL` to
diff --git a/spec/frontend/error_tracking/components/error_details_spec.js b/spec/frontend/error_tracking/components/error_details_spec.js
index 35014b00dd8..f0578b52922 100644
--- a/spec/frontend/error_tracking/components/error_details_spec.js
+++ b/spec/frontend/error_tracking/components/error_details_spec.js
@@ -4,6 +4,7 @@ import { GlLoadingIcon, GlLink, GlBadge, GlFormInput } from '@gitlab/ui';
import LoadingButton from '~/vue_shared/components/loading_button.vue';
import Stacktrace from '~/error_tracking/components/stacktrace.vue';
import ErrorDetails from '~/error_tracking/components/error_details.vue';
+import { severityLevel, severityLevelVariant } from '~/error_tracking/components/constants';
const localVue = createLocalVue();
localVue.use(Vuex);
@@ -144,6 +145,29 @@ describe('ErrorDetails', () => {
expect(wrapper.findAll(GlBadge).length).toBe(1);
});
});
+
+ it.each(Object.keys(severityLevel))(
+ 'should set correct severity level variant for %s badge',
+ level => {
+ store.state.details.error.tags = { level: severityLevel[level] };
+ mountComponent();
+ return wrapper.vm.$nextTick().then(() => {
+ expect(wrapper.find(GlBadge).attributes('variant')).toEqual(
+ severityLevelVariant[severityLevel[level]],
+ );
+ });
+ },
+ );
+
+ it('should fallback for ERROR severityLevelVariant when severityLevel is unknown', () => {
+ store.state.details.error.tags = { level: 'someNewErrorLevel' };
+ mountComponent();
+ return wrapper.vm.$nextTick().then(() => {
+ expect(wrapper.find(GlBadge).attributes('variant')).toEqual(
+ severityLevelVariant[severityLevel.ERROR],
+ );
+ });
+ });
});
describe('Stacktrace', () => {
diff --git a/spec/frontend/registry/settings/components/__snapshots__/settings_form_spec.js.snap b/spec/frontend/registry/settings/components/__snapshots__/settings_form_spec.js.snap
index eccfbaa62da..8d4e1243418 100644
--- a/spec/frontend/registry/settings/components/__snapshots__/settings_form_spec.js.snap
+++ b/spec/frontend/registry/settings/components/__snapshots__/settings_form_spec.js.snap
@@ -136,7 +136,7 @@ exports[`Settings Form renders 1`] = `
<glformgroup-stub
id="expiration-policy-name-matching-group"
invalid-feedback="The value of this input should be less than 255 characters"
- label="Expire Docker tags that match this regex:"
+ label="Docker tags with names matching this regex pattern will expire:"
label-align="right"
label-cols="3"
label-for="expiration-policy-name-matching"
diff --git a/spec/lib/gitlab/git/rugged_impl/use_rugged_spec.rb b/spec/lib/gitlab/git/rugged_impl/use_rugged_spec.rb
index 9b29046fce9..1e9083950d0 100644
--- a/spec/lib/gitlab/git/rugged_impl/use_rugged_spec.rb
+++ b/spec/lib/gitlab/git/rugged_impl/use_rugged_spec.rb
@@ -122,6 +122,12 @@ describe Gitlab::Git::RuggedImpl::UseRugged, :seed_helper do
allow(Gitlab::Runtime).to receive(:puma?).and_return(true)
end
+ it "returns false when Puma doesn't support the cli_config method" do
+ allow(::Puma).to receive(:respond_to?).with(:cli_config).and_return(false)
+
+ expect(subject.running_puma_with_multiple_threads?).to be_falsey
+ end
+
it 'returns false for single thread Puma' do
allow(::Puma).to receive_message_chain(:cli_config, :options).and_return(max_threads: 1)
diff --git a/spec/models/clusters/applications/ingress_spec.rb b/spec/models/clusters/applications/ingress_spec.rb
index c1158698601..c086ab23058 100644
--- a/spec/models/clusters/applications/ingress_spec.rb
+++ b/spec/models/clusters/applications/ingress_spec.rb
@@ -102,7 +102,7 @@ describe Clusters::Applications::Ingress do
it 'is initialized with ingress arguments' do
expect(subject.name).to eq('ingress')
expect(subject.chart).to eq('stable/nginx-ingress')
- expect(subject.version).to eq('1.22.1')
+ expect(subject.version).to eq('1.29.3')
expect(subject).to be_rbac
expect(subject.files).to eq(ingress.files)
end
@@ -119,7 +119,7 @@ describe Clusters::Applications::Ingress do
let(:ingress) { create(:clusters_applications_ingress, :errored, version: 'nginx') }
it 'is initialized with the locked version' do
- expect(subject.version).to eq('1.22.1')
+ expect(subject.version).to eq('1.29.3')
end
end
end
diff --git a/spec/models/project_services/jira_service_spec.rb b/spec/models/project_services/jira_service_spec.rb
index 8c14089fff2..6c3da490b08 100644
--- a/spec/models/project_services/jira_service_spec.rb
+++ b/spec/models/project_services/jira_service_spec.rb
@@ -3,7 +3,6 @@
require 'spec_helper'
describe JiraService do
- include Gitlab::Routing
include AssetsHelpers
let(:title) { 'custom title' }
@@ -543,47 +542,55 @@ describe JiraService do
end
end
- describe '#test_settings' do
+ describe '#test' do
let(:jira_service) do
described_class.new(
- project: create(:project),
- url: 'http://jira.example.com',
- username: 'jira_username',
- password: 'jira_password'
+ url: url,
+ username: username,
+ password: password
)
end
- def test_settings(api_url = nil)
- api_url ||= 'jira.example.com'
- test_url = "http://#{api_url}/rest/api/2/serverInfo"
+ def test_settings(url = 'jira.example.com')
+ test_url = "http://#{url}/rest/api/2/serverInfo"
- WebMock.stub_request(:get, test_url).with(basic_auth: %w(jira_username jira_password)).to_return(body: { url: 'http://url' }.to_json )
+ WebMock.stub_request(:get, test_url).with(basic_auth: [username, password])
+ .to_return(body: { url: 'http://url' }.to_json )
jira_service.test(nil)
end
context 'when the test succeeds' do
- it 'tries to get Jira project with URL when API URL not set' do
- test_settings('jira.example.com')
- end
-
- it 'returns correct result' do
- expect(test_settings).to eq( { success: true, result: { 'url' => 'http://url' } })
+ it 'gets Jira project with URL when API URL not set' do
+ expect(test_settings).to eq(success: true, result: { 'url' => 'http://url' })
end
- it 'tries to get Jira project with API URL if set' do
+ it 'gets Jira project with API URL if set' do
jira_service.update(api_url: 'http://jira.api.com')
- test_settings('jira.api.com')
+
+ expect(test_settings('jira.api.com')).to eq(success: true, result: { 'url' => 'http://url' })
end
end
context 'when the test fails' do
it 'returns result with the error' do
test_url = 'http://jira.example.com/rest/api/2/serverInfo'
- WebMock.stub_request(:get, test_url).with(basic_auth: %w(jira_username jira_password))
+
+ WebMock.stub_request(:get, test_url).with(basic_auth: [username, password])
.to_raise(JIRA::HTTPError.new(double(message: 'Some specific failure.')))
- expect(jira_service.test(nil)).to eq( { success: false, result: 'Some specific failure.' })
+ expect(jira_service).to receive(:log_error).with(
+ "Error sending message",
+ hash_including(
+ client_url: url,
+ error: hash_including(
+ exception_class: 'JIRA::HTTPError',
+ exception_message: 'Some specific failure.'
+ )
+ )
+ )
+
+ expect(jira_service.test(nil)).to eq(success: false, result: 'Some specific failure.')
end
end
end