Commit bf2b72e0 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'ce-to-ee-2018-11-26' into 'master'

CE upstream - 2018-11-26 18:21 UTC

See merge request gitlab-org/gitlab-ee!8596
parents 8b2e72fe 5859366a
......@@ -332,7 +332,7 @@ group :development do
gem 'rblineprof', '~> 0.3.6', platform: :mri, require: false
# Better errors handler
gem 'better_errors', '~> 2.1.0'
gem 'better_errors', '~> 2.5.0'
gem 'binding_of_caller', '~> 0.8.0'
# thin instead webrick
......
......@@ -85,9 +85,9 @@ GEM
bcrypt (3.1.12)
bcrypt_pbkdf (1.0.0)
benchmark-ips (2.3.0)
better_errors (2.1.1)
better_errors (2.5.0)
coderay (>= 1.0.0)
erubis (>= 2.6.6)
erubi (>= 1.0.0)
rack (>= 0.9.0)
bindata (2.4.3)
binding_of_caller (0.8.0)
......@@ -202,6 +202,7 @@ GEM
mail (~> 2.7)
encryptor (3.0.0)
equalizer (0.0.11)
erubi (1.7.1)
erubis (2.7.0)
escape_utils (1.2.1)
et-orbi (1.0.3)
......@@ -982,7 +983,7 @@ DEPENDENCIES
batch-loader (~> 1.2.1)
bcrypt_pbkdf (~> 1.0)
benchmark-ips (~> 2.3.0)
better_errors (~> 2.1.0)
better_errors (~> 2.5.0)
binding_of_caller (~> 0.8.0)
bootsnap (~> 1.3)
bootstrap_form (~> 2.7.0)
......
......@@ -82,9 +82,9 @@ GEM
bcrypt (3.1.12)
bcrypt_pbkdf (1.0.0)
benchmark-ips (2.3.0)
better_errors (2.1.1)
better_errors (2.5.0)
coderay (>= 1.0.0)
erubis (>= 2.6.6)
erubi (>= 1.0.0)
rack (>= 0.9.0)
bindata (2.4.3)
binding_of_caller (0.8.0)
......@@ -201,6 +201,7 @@ GEM
mail (~> 2.7)
encryptor (3.0.0)
equalizer (0.0.11)
erubi (1.7.1)
erubis (2.7.0)
escape_utils (1.2.1)
et-orbi (1.0.3)
......@@ -973,7 +974,7 @@ DEPENDENCIES
batch-loader (~> 1.2.1)
bcrypt_pbkdf (~> 1.0)
benchmark-ips (~> 2.3.0)
better_errors (~> 2.1.0)
better_errors (~> 2.5.0)
binding_of_caller (~> 0.8.0)
bootsnap (~> 1.3)
bootstrap_form (~> 2.7.0)
......
......@@ -91,7 +91,9 @@ export default class LazyLoader {
onIntersection = entries => {
entries.forEach(entry => {
if (entry.isIntersecting) {
// We are using `intersectionRatio > 0` over `isIntersecting`, as some browsers did not ship the latter
// See: https://gitlab.com/gitlab-org/gitlab-ce/issues/54407
if (entry.intersectionRatio > 0) {
this.intersectionObserver.unobserve(entry.target);
this.lazyImages.push(entry.target);
}
......
---
title: Add index for events on project_id and created_at
merge_request: 23354
author:
type: performance
---
title: Fix Image Lazy Loader for some older browsers
merge_request:
author:
type: fixed
# frozen_string_literal: true
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class AddEventsIndexOnProjectIdAndCreatedAt < ActiveRecord::Migration[5.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index(*index_arguments)
end
def down
remove_concurrent_index(*index_arguments)
end
private
def index_arguments
[
:events,
[:project_id, :created_at],
{
name: 'index_events_on_project_id_and_created_at'
}
]
end
end
......@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20181112103239) do
ActiveRecord::Schema.define(version: 20181126150622) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
......@@ -1052,6 +1052,7 @@ ActiveRecord::Schema.define(version: 20181112103239) do
t.string "target_type"
t.index ["action"], name: "index_events_on_action", using: :btree
t.index ["author_id", "project_id"], name: "index_events_on_author_id_and_project_id", using: :btree
t.index ["project_id", "created_at"], name: "index_events_on_project_id_and_created_at", using: :btree
t.index ["project_id", "id"], name: "index_events_on_project_id_and_id", using: :btree
t.index ["target_type", "target_id"], name: "index_events_on_target_type_and_target_id", using: :btree
end
......
......@@ -106,12 +106,18 @@ module Trigger
def extra_variables
{
'GITLAB_VERSION' => ENV['CI_COMMIT_SHA'],
'GITLAB_REF_SLUG' => ENV['CI_COMMIT_REF_SLUG'],
'GITLAB_REF_SLUG' => ref_slug,
'ALTERNATIVE_SOURCES' => 'true',
'ee' => Trigger.ee? ? 'true' : 'false',
'QA_BRANCH' => ENV['QA_BRANCH'] || 'master'
}
end
def ref_slug
return 'master' if ENV['CI_COMMIT_REF_SLUG'] =~ %r{(\Aqa[/-]|-qa\z)}
ENV['CI_COMMIT_REF_SLUG']
end
end
class CNG < Base
......
require 'spec_helper'
describe 'Every Sidekiq worker' do
DEPRECATED_QUEUES = %w(geo_base_scheduler geo_file_download geo_project_sync geo_repository_shard_sync).freeze
it 'does not use the default queue' do
expect(Gitlab::SidekiqConfig.workers.map(&:queue)).not_to include('default')
end
......@@ -18,10 +16,10 @@ describe 'Every Sidekiq worker' do
worker_queues << ActionMailer::DeliveryJob.new.queue_name
worker_queues << 'default'
missing_from_file = worker_queues - file_worker_queues - DEPRECATED_QUEUES
missing_from_file = worker_queues - file_worker_queues
expect(missing_from_file).to be_empty, "expected #{missing_from_file.to_a.inspect} to be in Gitlab::SidekiqConfig::QUEUE_CONFIG_PATHS"
unncessarily_in_file = file_worker_queues - worker_queues - DEPRECATED_QUEUES
unncessarily_in_file = file_worker_queues - worker_queues
expect(unncessarily_in_file).to be_empty, "expected #{unncessarily_in_file.to_a.inspect} not to be in Gitlab::SidekiqConfig::QUEUE_CONFIG_PATHS"
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment