Skip to content
Snippets Groups Projects
Commit 219eead2 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 7c38405b
No related branches found
No related tags found
No related merge requests found
Showing
with 125 additions and 25 deletions
Loading
@@ -305,7 +305,6 @@ linters:
Loading
@@ -305,7 +305,6 @@ linters:
- 'app/views/shared/_milestone_expired.html.haml' - 'app/views/shared/_milestone_expired.html.haml'
- 'app/views/shared/_no_password.html.haml' - 'app/views/shared/_no_password.html.haml'
- 'app/views/shared/_no_ssh.html.haml' - 'app/views/shared/_no_ssh.html.haml'
- 'app/views/shared/_outdated_browser.html.haml'
- 'app/views/shared/_ping_consent.html.haml' - 'app/views/shared/_ping_consent.html.haml'
- 'app/views/shared/_project_limit.html.haml' - 'app/views/shared/_project_limit.html.haml'
- 'app/views/shared/boards/components/_board.html.haml' - 'app/views/shared/boards/components/_board.html.haml'
Loading
Loading
Loading
@@ -25,6 +25,8 @@ import { severityLevel, severityLevelVariant, errorStatus } from './constants';
Loading
@@ -25,6 +25,8 @@ import { severityLevel, severityLevelVariant, errorStatus } from './constants';
   
import query from '../queries/details.query.graphql'; import query from '../queries/details.query.graphql';
   
const SENTRY_TIMEOUT = 10000;
export default { export default {
components: { components: {
GlButton, GlButton,
Loading
@@ -87,6 +89,8 @@ export default {
Loading
@@ -87,6 +89,8 @@ export default {
if (res.data.project?.sentryErrors?.detailedError) { if (res.data.project?.sentryErrors?.detailedError) {
this.$apollo.queries.error.stopPolling(); this.$apollo.queries.error.stopPolling();
this.setStatus(this.error.status); this.setStatus(this.error.status);
} else {
this.onNoApolloResult();
} }
}, },
}, },
Loading
@@ -94,6 +98,8 @@ export default {
Loading
@@ -94,6 +98,8 @@ export default {
data() { data() {
return { return {
error: null, error: null,
errorLoading: true,
errorPollTimeout: 0,
issueCreationInProgress: false, issueCreationInProgress: false,
isAlertVisible: false, isAlertVisible: false,
closedIssueId: null, closedIssueId: null,
Loading
@@ -158,8 +164,19 @@ export default {
Loading
@@ -158,8 +164,19 @@ export default {
return this.errorStatus !== errorStatus.RESOLVED ? __('Resolve') : __('Unresolve'); return this.errorStatus !== errorStatus.RESOLVED ? __('Resolve') : __('Unresolve');
}, },
}, },
watch: {
error(val) {
if (val) {
this.errorLoading = false;
}
},
},
mounted() { mounted() {
this.startPollingStacktrace(this.issueStackTracePath); this.startPollingStacktrace(this.issueStackTracePath);
this.errorPollTimeout = Date.now() + SENTRY_TIMEOUT;
this.$apollo.queries.error.setOptions({
fetchPolicy: 'cache-and-network',
});
}, },
methods: { methods: {
...mapActions('details', [ ...mapActions('details', [
Loading
@@ -191,6 +208,13 @@ export default {
Loading
@@ -191,6 +208,13 @@ export default {
} }
}); });
}, },
onNoApolloResult() {
if (Date.now() > this.errorPollTimeout) {
this.$apollo.queries.error.stopPolling();
this.errorLoading = false;
createFlash(__('Could not connect to Sentry. Refresh the page to try again.'), 'warning');
}
},
formatDate(date) { formatDate(date) {
return `${this.timeFormatted(date)} (${dateFormat(date, 'UTC:yyyy-mm-dd h:MM:ssTT Z')})`; return `${this.timeFormatted(date)} (${dateFormat(date, 'UTC:yyyy-mm-dd h:MM:ssTT Z')})`;
}, },
Loading
@@ -200,7 +224,7 @@ export default {
Loading
@@ -200,7 +224,7 @@ export default {
   
<template> <template>
<div> <div>
<div v-if="$apollo.queries.error.loading" class="py-3"> <div v-if="errorLoading" class="py-3">
<gl-loading-icon :size="3" /> <gl-loading-icon :size="3" />
</div> </div>
<div v-else-if="error" class="error-details"> <div v-else-if="error" class="error-details">
Loading
Loading
# frozen_string_literal: true # frozen_string_literal: true
   
class Import::GitlabProjectsController < Import::BaseController class Import::GitlabProjectsController < Import::BaseController
include WorkhorseRequest
before_action :whitelist_query_limiting, only: [:create] before_action :whitelist_query_limiting, only: [:create]
before_action :verify_gitlab_project_import_enabled before_action :verify_gitlab_project_import_enabled
   
skip_before_action :verify_authenticity_token, only: [:authorize]
before_action :verify_workhorse_api!, only: [:authorize]
def new def new
@namespace = Namespace.find(project_params[:namespace_id]) @namespace = Namespace.find(project_params[:namespace_id])
return render_404 unless current_user.can?(:create_projects, @namespace) return render_404 unless current_user.can?(:create_projects, @namespace)
Loading
@@ -28,10 +33,29 @@ class Import::GitlabProjectsController < Import::BaseController
Loading
@@ -28,10 +33,29 @@ class Import::GitlabProjectsController < Import::BaseController
end end
end end
   
def authorize
set_workhorse_internal_api_content_type
authorized = ImportExportUploader.workhorse_authorize(
has_length: false,
maximum_size: Gitlab::CurrentSettings.max_attachment_size.megabytes.to_i)
render json: authorized
rescue SocketError
render json: _("Error uploading file"), status: :internal_server_error
end
private private
   
def file_is_valid? def file_is_valid?
return false unless project_params[:file] && project_params[:file].respond_to?(:read) # TODO: remove the condition and the private method after the WH version including
# https://gitlab.com/gitlab-org/gitlab-workhorse/-/merge_requests/470
# is released and GITLAB_WORKHORSE_VERSION is updated accordingly.
if with_workhorse_upload_acceleration?
return false unless project_params[:file].is_a?(::UploadedFile)
else
return false unless project_params[:file] && project_params[:file].respond_to?(:read)
end
   
filename = project_params[:file].original_filename filename = project_params[:file].original_filename
   
Loading
@@ -51,4 +75,8 @@ class Import::GitlabProjectsController < Import::BaseController
Loading
@@ -51,4 +75,8 @@ class Import::GitlabProjectsController < Import::BaseController
def whitelist_query_limiting def whitelist_query_limiting
Gitlab::QueryLimiting.whitelist('https://gitlab.com/gitlab-org/gitlab-foss/issues/42437') Gitlab::QueryLimiting.whitelist('https://gitlab.com/gitlab-org/gitlab-foss/issues/42437')
end end
def with_workhorse_upload_acceleration?
request.headers[Gitlab::Workhorse::INTERNAL_API_REQUEST_HEADER].present?
end
end end
Loading
@@ -227,7 +227,7 @@ module ApplicationHelper
Loading
@@ -227,7 +227,7 @@ module ApplicationHelper
end end
   
def outdated_browser? def outdated_browser?
browser.ie? && browser.version.to_i < 10 browser.ie?
end end
   
def path_to_key(key, admin = false) def path_to_key(key, admin = false)
Loading
Loading
Loading
@@ -111,8 +111,8 @@ module BulkInsertSafe
Loading
@@ -111,8 +111,8 @@ module BulkInsertSafe
end end
   
def _bulk_insert_reject_primary_key!(attributes, primary_key) def _bulk_insert_reject_primary_key!(attributes, primary_key)
if attributes.delete(primary_key) if existing_pk = attributes.delete(primary_key)
raise PrimaryKeySetError, "Primary key set: #{primary_key}:#{attributes[primary_key]}\n" \ raise PrimaryKeySetError, "Primary key set: #{primary_key}:#{existing_pk}\n" \
"Bulk-inserts are only supported for rows that don't already have PK set" "Bulk-inserts are only supported for rows that don't already have PK set"
end end
end end
Loading
Loading
Loading
@@ -93,11 +93,14 @@ module BulkInsertableAssociations
Loading
@@ -93,11 +93,14 @@ module BulkInsertableAssociations
end end
   
def _bulk_insert_configure_foreign_key(reflection, items) def _bulk_insert_configure_foreign_key(reflection, items)
primary_key = self[reflection.active_record_primary_key] primary_key_column = reflection.active_record_primary_key
raise "Classes including `BulkInsertableAssociations` must define a `primary_key`" unless primary_key raise "Classes including `BulkInsertableAssociations` must define a `primary_key`" unless primary_key_column
primary_key_value = self[primary_key_column]
raise "No value found for primary key `#{primary_key_column}`" unless primary_key_value
   
items.each do |item| items.each do |item|
item[reflection.foreign_key] = primary_key item[reflection.foreign_key] = primary_key_value
   
if reflection.type if reflection.type
item[reflection.type] = self.class.polymorphic_name item[reflection.type] = self.class.polymorphic_name
Loading
Loading
Loading
@@ -14,23 +14,23 @@ module NotificationRecipients
Loading
@@ -14,23 +14,23 @@ module NotificationRecipients
end end
   
def self.build_recipients(*args) def self.build_recipients(*args)
Builder::Default.new(*args).notification_recipients ::NotificationRecipients::Builder::Default.new(*args).notification_recipients
end end
   
def self.build_new_note_recipients(*args) def self.build_new_note_recipients(*args)
Builder::NewNote.new(*args).notification_recipients ::NotificationRecipients::Builder::NewNote.new(*args).notification_recipients
end end
   
def self.build_merge_request_unmergeable_recipients(*args) def self.build_merge_request_unmergeable_recipients(*args)
Builder::MergeRequestUnmergeable.new(*args).notification_recipients ::NotificationRecipients::Builder::MergeRequestUnmergeable.new(*args).notification_recipients
end end
   
def self.build_project_maintainers_recipients(*args) def self.build_project_maintainers_recipients(*args)
Builder::ProjectMaintainers.new(*args).notification_recipients ::NotificationRecipients::Builder::ProjectMaintainers.new(*args).notification_recipients
end end
   
def self.build_new_release_recipients(*args) def self.build_new_release_recipients(*args)
Builder::NewRelease.new(*args).notification_recipients ::NotificationRecipients::Builder::NewRelease.new(*args).notification_recipients
end end
end end
end end
Loading
Loading
Loading
@@ -2,9 +2,9 @@
Loading
@@ -2,9 +2,9 @@
- if defined?(nav) && nav - if defined?(nav) && nav
= render "layouts/nav/sidebar/#{nav}" = render "layouts/nav/sidebar/#{nav}"
.content-wrapper{ class: "#{@content_wrapper_class}" } .content-wrapper{ class: "#{@content_wrapper_class}" }
= render 'shared/outdated_browser'
.mobile-overlay .mobile-overlay
.alert-wrapper .alert-wrapper
= render 'shared/outdated_browser'
= render_if_exists "layouts/header/ee_license_banner" = render_if_exists "layouts/header/ee_license_banner"
= render "layouts/broadcast" = render "layouts/broadcast"
= render "layouts/header/read_only_banner" = render "layouts/header/read_only_banner"
Loading
Loading
Loading
@@ -5,9 +5,9 @@
Loading
@@ -5,9 +5,9 @@
= render 'peek/bar' = render 'peek/bar'
= header_message = header_message
= render partial: "layouts/header/default", locals: { project: @project, group: @group } = render partial: "layouts/header/default", locals: { project: @project, group: @group }
= render 'shared/outdated_browser'
.mobile-overlay .mobile-overlay
.alert-wrapper .alert-wrapper
= render 'shared/outdated_browser'
= render "layouts/broadcast" = render "layouts/broadcast"
= yield :flash_message = yield :flash_message
= render "layouts/flash" = render "layouts/flash"
Loading
Loading
- if outdated_browser? - if outdated_browser?
.flash-container .gl-alert.gl-alert-danger.outdated-browser{ :role => "alert" }
.flash-alert.text-center = sprite_icon('error', size: 16, css_class: "gl-alert-icon gl-alert-icon-no-title gl-icon")
GitLab may not work properly because you are using an outdated web browser. .gl-alert-body
- if browser.ie? && browser.version.to_i == 11
- feedback_link_url = 'https://gitlab.com/gitlab-org/gitlab/issues/197987'
- feedback_link_start = '<a href="%{url}" class="gl-link" target="_blank" rel="noopener noreferrer">'.html_safe % { url: feedback_link_url }
= s_('OutdatedBrowser|From May 2020 GitLab no longer supports Internet Explorer 11.')
%br
= s_('OutdatedBrowser|You can provide feedback %{feedback_link_start}on this issue%{feedback_link_end} or via your usual support channels.').html_safe % { feedback_link_start: feedback_link_start, feedback_link_end: '</a>'.html_safe }
- else
= s_('OutdatedBrowser|GitLab may not work properly, because you are using an outdated web browser.')
%br %br
Please install a - browser_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('install/requirements', anchor: 'supported-web-browsers') }
= link_to 'supported web browser', help_page_path('install/requirements', anchor: 'supported-web-browsers') = s_('OutdatedBrowser|Please install a %{browser_link_start}supported web browser%{browser_link_end} for a better experience.').html_safe % { browser_link_start: browser_link_start, browser_link_end: '</a>'.html_safe }
for a better experience.
---
title: Fix infinite spinner on error detail page
merge_request: 26188
author:
type: fixed
---
title: Remove unused file_type column from packages_package_files
merge_request: 26527
author:
type: changed
---
title: Use Workhorse acceleration for Project Import file upload via UI
merge_request: 26278
author:
type: performance
---
title: Fix package file finder for conan packages with a conan_package_reference filter
merge_request: 26240
author:
type: fixed
---
title: Default to generating blob links for missing paths
merge_request: 26817
author:
type: fixed
Loading
@@ -1226,6 +1226,8 @@ test:
Loading
@@ -1226,6 +1226,8 @@ test:
gitaly: gitaly:
client_path: tmp/tests/gitaly client_path: tmp/tests/gitaly
token: secret token: secret
workhorse:
secret_file: tmp/tests/gitlab_workhorse_secret
backup: backup:
path: tmp/tests/backups path: tmp/tests/backups
pseudonymizer: pseudonymizer:
Loading
Loading
Loading
@@ -60,6 +60,7 @@ namespace :import do
Loading
@@ -60,6 +60,7 @@ namespace :import do
   
resource :gitlab_project, only: [:create, :new] do resource :gitlab_project, only: [:create, :new] do
post :create post :create
post :authorize
end end
   
resource :manifest, only: [:create, :new], controller: :manifest do resource :manifest, only: [:create, :new], controller: :manifest do
Loading
Loading
# frozen_string_literal: true
class RemoveFileTypeFromPackagesPackageFiles < ActiveRecord::Migration[6.0]
DOWNTIME = false
def change
remove_column :packages_package_files, :file_type, :integer
end
end
Loading
@@ -3029,7 +3029,6 @@ ActiveRecord::Schema.define(version: 2020_03_06_170531) do
Loading
@@ -3029,7 +3029,6 @@ ActiveRecord::Schema.define(version: 2020_03_06_170531) do
t.datetime_with_timezone "created_at", null: false t.datetime_with_timezone "created_at", null: false
t.datetime_with_timezone "updated_at", null: false t.datetime_with_timezone "updated_at", null: false
t.bigint "size" t.bigint "size"
t.integer "file_type"
t.integer "file_store" t.integer "file_store"
t.binary "file_md5" t.binary "file_md5"
t.binary "file_sha1" t.binary "file_sha1"
Loading
Loading
Loading
@@ -236,18 +236,21 @@ For reference, GitLab.com's [auto-scaling shared runner](../user/gitlab_com/inde
Loading
@@ -236,18 +236,21 @@ For reference, GitLab.com's [auto-scaling shared runner](../user/gitlab_com/inde
   
## Supported web browsers ## Supported web browsers
   
CAUTION: **Caution:** With GitLab 13.0 (May 2020) we are removing official support for Internet Explorer 11.
With the release of GitLab 13.4 (September 2020) we will remove all code that supports Internet Explorer 11.
You can provide feedback [on this issue](https://gitlab.com/gitlab-org/gitlab/issues/197987) or via your usual support channels.
GitLab supports the following web browsers: GitLab supports the following web browsers:
   
- Firefox - Firefox
- Chrome/Chromium - Chrome/Chromium
- Safari - Safari
- Microsoft Edge - Microsoft Edge
- Internet Explorer 11 - Internet Explorer 11 (until May 2020)
   
For the listed web browsers, GitLab supports: For the listed web browsers, GitLab supports:
   
- The current and previous major versions of browsers except Internet Explorer. - The current and previous major versions of browsers except Internet Explorer.
- Only version 11 of Internet Explorer.
- The current minor version of a supported major version. - The current minor version of a supported major version.
   
NOTE: **Note:** We do not support running GitLab with JavaScript disabled in the browser and have no plans of supporting that NOTE: **Note:** We do not support running GitLab with JavaScript disabled in the browser and have no plans of supporting that
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment