Merge tag 'debian/13.12.4+ds1-1' into bullseye-fasttrack
gitlab Debian release 13.12.4+ds1-1
This commit is contained in:
commit
cd8b5e7a8a
14 changed files with 160 additions and 15 deletions
|
@ -2,6 +2,14 @@
|
|||
documentation](doc/development/changelog.md) for instructions on adding your own
|
||||
entry.
|
||||
|
||||
## 13.12.4 (2021-06-14)
|
||||
|
||||
### Fixed (3 changes)
|
||||
|
||||
- [Add alias method usage_ping_enabled?](gitlab-org/gitlab@eb8755115a2a7045b6291171aaa0c7ae76f43fec) ([merge request](gitlab-org/gitlab!63974))
|
||||
- [Fix MR diff compare with previous version](gitlab-org/gitlab@96d4df8bb4eb5f148e4dabcc4c3eea88ad27cbc3) ([merge request](gitlab-org/gitlab!63974))
|
||||
- [Fix double render in project's git URL redirect](gitlab-org/gitlab@be4059b7a5cddd2e70fa760d8935b1d170068759) ([merge request](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/62053))
|
||||
|
||||
## 13.12.3 (2021-06-07)
|
||||
|
||||
### Added (1 change)
|
||||
|
|
|
@ -1 +1 @@
|
|||
13.12.3
|
||||
13.12.4
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
13.12.3
|
||||
13.12.4
|
|
@ -163,7 +163,10 @@ class Projects::MergeRequests::DiffsController < Projects::MergeRequests::Applic
|
|||
end
|
||||
|
||||
def render_merge_ref_head_diff?
|
||||
Gitlab::Utils.to_boolean(params[:diff_head]) && @merge_request.diffable_merge_ref? && @start_sha.nil?
|
||||
params[:diff_id].blank? &&
|
||||
Gitlab::Utils.to_boolean(params[:diff_head]) &&
|
||||
@merge_request.diffable_merge_ref? &&
|
||||
@start_sha.nil?
|
||||
end
|
||||
|
||||
def note_positions
|
||||
|
|
|
@ -510,7 +510,7 @@ class ProjectsController < Projects::ApplicationController
|
|||
|
||||
# `project` calls `find_routable!`, so this will trigger the usual not-found
|
||||
# behaviour when the user isn't authorized to see the project
|
||||
return unless project
|
||||
return if project.nil? || performed?
|
||||
|
||||
redirect_to(request.original_url.sub(%r{\.git/?\Z}, ''))
|
||||
end
|
||||
|
|
|
@ -374,6 +374,7 @@ module ApplicationSettingImplementation
|
|||
def usage_ping_enabled
|
||||
usage_ping_can_be_configured? && super
|
||||
end
|
||||
alias_method :usage_ping_enabled?, :usage_ping_enabled
|
||||
|
||||
def allowed_key_types
|
||||
SUPPORTED_KEY_TYPES.select do |type|
|
||||
|
|
9
debian/changelog
vendored
9
debian/changelog
vendored
|
@ -1,3 +1,12 @@
|
|||
gitlab (13.12.4+ds1-1) experimental; urgency=medium
|
||||
|
||||
* Update minimum version of golang-any (>= 2:1.15~)
|
||||
* Export GEM_HOME in gitlab-rails-console script
|
||||
* Install grpc and google-protobuf before GEM_HOME is set
|
||||
* New upstream version 13.12.4+ds1
|
||||
|
||||
-- Pirate Praveen <praveen@debian.org> Mon, 21 Jun 2021 23:58:09 +0530
|
||||
|
||||
gitlab (13.12.3+ds1-7~fto11+1) bullseye-fasttrack; urgency=medium
|
||||
|
||||
* Rebuild for bullseye-fasttrack.
|
||||
|
|
2
debian/control
vendored
2
debian/control
vendored
|
@ -10,7 +10,7 @@ Uploaders: Cédric Boutillier <boutil@debian.org>,
|
|||
Build-Depends: debhelper (>= 10~),
|
||||
gem2deb,
|
||||
dh-golang,
|
||||
golang-any,
|
||||
golang-any (>= 2:1.15~),
|
||||
bc,
|
||||
golang-github-alecthomas-chroma-dev,
|
||||
golang-github-aws-aws-sdk-go-dev,
|
||||
|
|
2
debian/gitlab-rails-console.sh
vendored
2
debian/gitlab-rails-console.sh
vendored
|
@ -5,7 +5,7 @@ set -e
|
|||
# Read debian specific configuration
|
||||
. /etc/gitlab-common/gitlab-common.conf
|
||||
. /etc/gitlab/gitlab-debian.conf
|
||||
export DB RAILS_ENV
|
||||
export DB RAILS_ENV GEM_HOME
|
||||
|
||||
cd /usr/share/gitlab
|
||||
|
||||
|
|
16
debian/gitlab.postinst
vendored
16
debian/gitlab.postinst
vendored
|
@ -37,6 +37,13 @@ test -f ${gitlab_common_defaults} && . ${gitlab_common_defaults}
|
|||
# installation fails and the `postinst' is called with `abort-upgrade',
|
||||
# `abort-remove' or `abort-deconfigure'.
|
||||
|
||||
# These gems should be installed as root for gitlab to find it
|
||||
# Setting GEM_HOME seems not working for all cases, help welcome to fix it
|
||||
# Workaround for #966653
|
||||
/usr/bin/gem install -v 1.30.2 grpc
|
||||
# Workaround for #989774
|
||||
/usr/bin/gem install -v 3.17.1 google-protobuf
|
||||
|
||||
#######################################################################
|
||||
# Read debian specific configuration
|
||||
#######################################################################
|
||||
|
@ -50,9 +57,6 @@ cp ${gitlab_debian_conf_example} ${gitlab_debian_conf_private}
|
|||
test -f ${gitlab_debian_conf} && . ${gitlab_debian_conf}
|
||||
export DB RAILS_ENV
|
||||
|
||||
# Required for embedded gems
|
||||
export GEM_HOME=/var/lib/gitlab/.gem
|
||||
|
||||
# Read default values (we cannot do this before gitlab-debian.conf is exported
|
||||
# as we want to override variables set by gitlab-debian.conf in earlier gitlab
|
||||
# versions with gitlab-debian.defaults)
|
||||
|
@ -61,10 +65,8 @@ export GEM_HOME=/var/lib/gitlab/.gem
|
|||
# Read gitlab_user from gitlab-common.conf
|
||||
test -f ${gitlab_common_conf} && . ${gitlab_common_conf}
|
||||
|
||||
# Workaround for #966653
|
||||
/usr/bin/gem install -v 1.30.2 grpc
|
||||
# Workaround for #989774
|
||||
/usr/bin/gem install -v 3.17.1 google-protobuf
|
||||
# Required for embedded gems
|
||||
export GEM_HOME=/var/lib/gitlab/.gem
|
||||
|
||||
#######################################################################
|
||||
# update Gemfile.lock and yarn.lock, always
|
||||
|
|
|
@ -69,6 +69,20 @@ RSpec.describe Projects::MergeRequests::DiffsController do
|
|||
end
|
||||
end
|
||||
|
||||
shared_examples 'show the right diff files with previous diff_id' do
|
||||
context 'with previous diff_id' do
|
||||
let!(:merge_request_diff_1) { merge_request.merge_request_diffs.create!(head_commit_sha: '6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9') }
|
||||
let!(:merge_request_diff_2) { merge_request.merge_request_diffs.create!(head_commit_sha: '5937ac0a7beb003549fc5fd26fc247adbce4a52e', diff_type: :merge_head) }
|
||||
|
||||
subject { go(diff_id: merge_request_diff_1.id, diff_head: true) }
|
||||
|
||||
it 'shows the right diff files' do
|
||||
subject
|
||||
expect(json_response["diff_files"].size).to eq(merge_request_diff_1.files_count)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
let(:project) { create(:project, :repository) }
|
||||
let(:user) { create(:user) }
|
||||
let(:merge_request) { create(:merge_request_with_diffs, target_project: project, source_project: project) }
|
||||
|
@ -142,6 +156,8 @@ RSpec.describe Projects::MergeRequests::DiffsController do
|
|||
|
||||
it_behaves_like '404 for unexistent diffable'
|
||||
|
||||
it_behaves_like 'show the right diff files with previous diff_id'
|
||||
|
||||
context 'when not authorized' do
|
||||
let(:another_user) { create(:user) }
|
||||
|
||||
|
@ -480,6 +496,8 @@ RSpec.describe Projects::MergeRequests::DiffsController do
|
|||
|
||||
it_behaves_like '404 for unexistent diffable'
|
||||
|
||||
it_behaves_like 'show the right diff files with previous diff_id'
|
||||
|
||||
context 'when not authorized' do
|
||||
let(:other_user) { create(:user) }
|
||||
|
||||
|
@ -499,7 +517,7 @@ RSpec.describe Projects::MergeRequests::DiffsController do
|
|||
|
||||
it_behaves_like 'serializes diffs with expected arguments' do
|
||||
let(:collection) { Gitlab::Diff::FileCollection::MergeRequestDiffBatch }
|
||||
let(:expected_options) { collection_arguments(current_page: 1, total_pages: 1) }
|
||||
let(:expected_options) { collection_arguments(current_page: 1, total_pages: 1).merge(merge_ref_head_diff: false) }
|
||||
end
|
||||
|
||||
it_behaves_like 'successful request'
|
||||
|
@ -522,7 +540,7 @@ RSpec.describe Projects::MergeRequests::DiffsController do
|
|||
|
||||
it_behaves_like 'serializes diffs with expected arguments' do
|
||||
let(:collection) { Gitlab::Diff::FileCollection::Compare }
|
||||
let(:expected_options) { collection_arguments }
|
||||
let(:expected_options) { collection_arguments.merge(merge_ref_head_diff: false) }
|
||||
end
|
||||
|
||||
it_behaves_like 'successful request'
|
||||
|
|
|
@ -375,6 +375,23 @@ RSpec.describe ProjectsController do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when project is moved and git format is requested' do
|
||||
let(:old_path) { project.path + 'old' }
|
||||
|
||||
before do
|
||||
project.redirect_routes.create!(path: "#{project.namespace.full_path}/#{old_path}")
|
||||
|
||||
project.add_developer(user)
|
||||
sign_in(user)
|
||||
end
|
||||
|
||||
it 'redirects to new project path' do
|
||||
get :show, params: { namespace_id: project.namespace, id: old_path }, format: :git
|
||||
|
||||
expect(response).to redirect_to(project_path(project, format: :git))
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the project is forked and has a repository', :request_store do
|
||||
let(:public_project) { create(:project, :public, :repository) }
|
||||
let(:other_user) { create(:user) }
|
||||
|
|
|
@ -363,6 +363,85 @@ RSpec.describe ApplicationSetting do
|
|||
.is_less_than(65536)
|
||||
end
|
||||
|
||||
describe 'usage_ping_enabled setting' do
|
||||
shared_examples 'usage ping enabled' do
|
||||
it do
|
||||
expect(setting.usage_ping_enabled).to eq(true)
|
||||
expect(setting.usage_ping_enabled?).to eq(true)
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples 'usage ping disabled' do
|
||||
it do
|
||||
expect(setting.usage_ping_enabled).to eq(false)
|
||||
expect(setting.usage_ping_enabled?).to eq(false)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when setting is in database' do
|
||||
context 'with usage_ping_enabled disabled' do
|
||||
before do
|
||||
setting.update!(usage_ping_enabled: false)
|
||||
end
|
||||
|
||||
it_behaves_like 'usage ping disabled'
|
||||
end
|
||||
|
||||
context 'with usage_ping_enabled enabled' do
|
||||
before do
|
||||
setting.update!(usage_ping_enabled: true)
|
||||
end
|
||||
|
||||
it_behaves_like 'usage ping enabled'
|
||||
end
|
||||
end
|
||||
|
||||
context 'when setting is in GitLab config' do
|
||||
context 'with usage_ping_enabled disabled' do
|
||||
before do
|
||||
allow(Settings.gitlab).to receive(:usage_ping_enabled).and_return(false)
|
||||
end
|
||||
|
||||
it_behaves_like 'usage ping disabled'
|
||||
end
|
||||
|
||||
context 'with usage_ping_enabled enabled' do
|
||||
before do
|
||||
allow(Settings.gitlab).to receive(:usage_ping_enabled).and_return(true)
|
||||
end
|
||||
|
||||
it_behaves_like 'usage ping enabled'
|
||||
end
|
||||
end
|
||||
|
||||
context 'when setting in database false and setting in GitLab config true' do
|
||||
before do
|
||||
setting.update!(usage_ping_enabled: false)
|
||||
allow(Settings.gitlab).to receive(:usage_ping_enabled).and_return(true)
|
||||
end
|
||||
|
||||
it_behaves_like 'usage ping disabled'
|
||||
end
|
||||
|
||||
context 'when setting database true and setting in GitLab config false' do
|
||||
before do
|
||||
setting.update!(usage_ping_enabled: true)
|
||||
allow(Settings.gitlab).to receive(:usage_ping_enabled).and_return(false)
|
||||
end
|
||||
|
||||
it_behaves_like 'usage ping disabled'
|
||||
end
|
||||
|
||||
context 'when setting database true and setting in GitLab config true' do
|
||||
before do
|
||||
setting.update!(usage_ping_enabled: true)
|
||||
allow(Settings.gitlab).to receive(:usage_ping_enabled).and_return(true)
|
||||
end
|
||||
|
||||
it_behaves_like 'usage ping enabled'
|
||||
end
|
||||
end
|
||||
|
||||
context 'key restrictions' do
|
||||
it 'supports all key types' do
|
||||
expect(described_class::SUPPORTED_KEY_TYPES).to contain_exactly(:rsa, :dsa, :ecdsa, :ed25519)
|
||||
|
|
|
@ -90,6 +90,14 @@ RSpec.describe SubmitUsagePingService do
|
|||
it_behaves_like 'does not run'
|
||||
end
|
||||
|
||||
context 'when usage ping is disabled from GitLab config file' do
|
||||
before do
|
||||
stub_config_setting(usage_ping_enabled: false)
|
||||
end
|
||||
|
||||
it_behaves_like 'does not run'
|
||||
end
|
||||
|
||||
context 'when usage ping is enabled' do
|
||||
before do
|
||||
stub_usage_data_connections
|
||||
|
|
Loading…
Reference in a new issue