Skip to content

Commit ff7b545

Browse files
Merge remote-tracking branch 'origin/master' into 18608-lock-issues
2 parents 55a7529 + ff1deab commit ff7b545

File tree

248 files changed

+4543
-1953
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

248 files changed

+4543
-1953
lines changed

.gitlab-ci.yml

+12-7
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ stages:
128128
- export CACHE_CLASSES=true
129129
- cp ${KNAPSACK_SPINACH_SUITE_REPORT_PATH} ${KNAPSACK_REPORT_PATH}
130130
- scripts/gitaly-test-spawn
131-
- knapsack spinach "-r rerun" || retry '[[ -e tmp/spinach-rerun.txt ]] && bundle exec spinach -r rerun $(cat tmp/spinach-rerun.txt)'
131+
- knapsack spinach "-r rerun" -b || retry '[[ -e tmp/spinach-rerun.txt ]] && bundle exec spinach -b -r rerun $(cat tmp/spinach-rerun.txt)'
132132
artifacts:
133133
expire_in: 31d
134134
when: always
@@ -174,7 +174,8 @@ build-package:
174174
# Review docs base
175175
.review-docs: &review-docs
176176
image: ruby:2.4-alpine
177-
before_script: []
177+
before_script:
178+
- gem install gitlab --no-doc
178179
services: []
179180
variables:
180181
SETUP_DB: "false"
@@ -193,10 +194,9 @@ review-docs-deploy:
193194
name: review-docs/$CI_COMMIT_REF_NAME
194195
# DOCS_REVIEW_APPS_DOMAIN and DOCS_GITLAB_REPO_SUFFIX are secret variables
195196
# Discussion: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14236/diffs#note_40140693
196-
url: http://$CI_COMMIT_REF_SLUG-built-from-ce-ee.$DOCS_REVIEW_APPS_DOMAIN/$DOCS_GITLAB_REPO_SUFFIX
197+
url: http://preview-$CI_COMMIT_REF_SLUG.$DOCS_REVIEW_APPS_DOMAIN/$DOCS_GITLAB_REPO_SUFFIX
197198
on_stop: review-docs-cleanup
198199
script:
199-
- gem install gitlab --no-doc
200200
- scripts/trigger-build-docs deploy
201201

202202
# Cleanup remote environment of gitlab-docs
@@ -207,7 +207,6 @@ review-docs-cleanup:
207207
name: review-docs/$CI_COMMIT_REF_NAME
208208
action: stop
209209
script:
210-
- gem install gitlab --no-doc
211210
- scripts/trigger-build-docs cleanup
212211

213212
# Retrieve knapsack and rspec_flaky reports
@@ -413,12 +412,12 @@ downtime_check:
413412

414413
ee_compat_check:
415414
<<: *rake-exec
416-
only:
417-
- branches@gitlab-org/gitlab-ce
418415
except:
419416
- master
420417
- tags
421418
- /^[\d-]+-stable(-ee)?/
419+
- branches@gitlab-org/gitlab-ee
420+
- branches@gitlab/gitlab-ee
422421
allow_failure: yes
423422
cache:
424423
key: "ee_compat_check_repo"
@@ -517,6 +516,12 @@ db:seed_fu-mysql:
517516
<<: *db-seed_fu
518517
<<: *use-mysql
519518

519+
db:check-schema-pg:
520+
<<: *db-migrate-reset
521+
<<: *use-pg
522+
script:
523+
- source scripts/schema_changed.sh
524+
520525
# Frontend-related jobs
521526
gitlab:assets:compile:
522527
<<: *dedicated-runner

GITLAB_WORKHORSE_VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.0
1+
3.1.0

Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,7 @@ group :test do
362362
gem 'sham_rack', '~> 1.3.6'
363363
gem 'timecop', '~> 0.8.0'
364364
gem 'concurrent-ruby', '~> 1.0.5'
365+
gem 'test-prof', '~> 0.2.5'
365366
end
366367

367368
gem 'octokit', '~> 4.6.2'

Gemfile.lock

+2
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,7 @@ GEM
882882
ffi
883883
sysexits (1.2.0)
884884
temple (0.7.7)
885+
test-prof (0.2.5)
885886
test_after_commit (1.1.0)
886887
activerecord (>= 3.2)
887888
text (1.3.1)
@@ -1163,6 +1164,7 @@ DEPENDENCIES
11631164
stackprof (~> 0.2.10)
11641165
state_machines-activerecord (~> 0.4.0)
11651166
sys-filesystem (~> 1.1.6)
1167+
test-prof (~> 0.2.5)
11661168
test_after_commit (~> 1.1)
11671169
thin (~> 1.7.0)
11681170
timecop (~> 0.8.0)

LICENSE

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
Copyright (c) 2011-2017 GitLab B.V.
22

3+
With regard to the GitLab Software:
4+
35
Permission is hereby granted, free of charge, to any person obtaining a copy
46
of this software and associated documentation files (the "Software"), to deal
57
in the Software without restriction, including without limitation the rights
@@ -17,3 +19,7 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1719
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1820
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1921
THE SOFTWARE.
22+
23+
For all third party components incorporated into the GitLab Software, those
24+
components are licensed under the original license provided by the owner of the
25+
applicable component.

app/assets/javascripts/deploy_keys/components/key.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
</span>
7474
<a
7575
v-if="deployKey.can_edit"
76-
class="btn btn-small"
76+
class="btn btn-sm"
7777
:href="editDeployKeyPath"
7878
>
7979
Edit

app/assets/javascripts/diff_notes/components/jump_to_discussion.js

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
import Vue from 'vue';
66

7+
import '../mixins/discussion';
8+
79
const JumpToDiscussion = Vue.extend({
810
mixins: [DiscussionMixins],
911
props: {

app/assets/javascripts/diff_notes/components/resolve_count.js

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
import Vue from 'vue';
66

7+
import '../mixins/discussion';
8+
79
window.ResolveCount = Vue.extend({
810
mixins: [DiscussionMixins],
911
props: {

app/assets/javascripts/feature_highlight/feature_highlight.js

-61
This file was deleted.

app/assets/javascripts/feature_highlight/feature_highlight_helper.js

-57
This file was deleted.

app/assets/javascripts/feature_highlight/feature_highlight_options.js

-12
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,61 @@
11
import _ from 'underscore';
22

3-
(() => {
4-
/*
5-
* TODO: Make these methods more configurable (e.g. stringifyTime condensed or
6-
* non-condensed, abbreviateTimelengths)
7-
* */
8-
9-
const utils = window.gl.utils = gl.utils || {};
10-
const prettyTime = utils.prettyTime = {
11-
/*
12-
* Accepts seconds and returns a timeObject { weeks: #, days: #, hours: #, minutes: # }
13-
* Seconds can be negative or positive, zero or non-zero. Can be configured for any day
14-
* or week length.
15-
*/
16-
parseSeconds(seconds, { daysPerWeek = 5, hoursPerDay = 8 } = {}) {
17-
const DAYS_PER_WEEK = daysPerWeek;
18-
const HOURS_PER_DAY = hoursPerDay;
19-
const MINUTES_PER_HOUR = 60;
20-
const MINUTES_PER_WEEK = DAYS_PER_WEEK * HOURS_PER_DAY * MINUTES_PER_HOUR;
21-
const MINUTES_PER_DAY = HOURS_PER_DAY * MINUTES_PER_HOUR;
22-
23-
const timePeriodConstraints = {
24-
weeks: MINUTES_PER_WEEK,
25-
days: MINUTES_PER_DAY,
26-
hours: MINUTES_PER_HOUR,
27-
minutes: 1,
28-
};
3+
/*
4+
* TODO: Make these methods more configurable (e.g. stringifyTime condensed or
5+
* non-condensed, abbreviateTimelengths)
6+
* */
7+
8+
/*
9+
* Accepts seconds and returns a timeObject { weeks: #, days: #, hours: #, minutes: # }
10+
* Seconds can be negative or positive, zero or non-zero. Can be configured for any day
11+
* or week length.
12+
*/
13+
14+
export function parseSeconds(seconds, { daysPerWeek = 5, hoursPerDay = 8 } = {}) {
15+
const DAYS_PER_WEEK = daysPerWeek;
16+
const HOURS_PER_DAY = hoursPerDay;
17+
const MINUTES_PER_HOUR = 60;
18+
const MINUTES_PER_WEEK = DAYS_PER_WEEK * HOURS_PER_DAY * MINUTES_PER_HOUR;
19+
const MINUTES_PER_DAY = HOURS_PER_DAY * MINUTES_PER_HOUR;
20+
21+
const timePeriodConstraints = {
22+
weeks: MINUTES_PER_WEEK,
23+
days: MINUTES_PER_DAY,
24+
hours: MINUTES_PER_HOUR,
25+
minutes: 1,
26+
};
2927

30-
let unorderedMinutes = prettyTime.secondsToMinutes(seconds);
28+
let unorderedMinutes = Math.abs(seconds / MINUTES_PER_HOUR);
3129

32-
return _.mapObject(timePeriodConstraints, (minutesPerPeriod) => {
33-
const periodCount = Math.floor(unorderedMinutes / minutesPerPeriod);
30+
return _.mapObject(timePeriodConstraints, (minutesPerPeriod) => {
31+
const periodCount = Math.floor(unorderedMinutes / minutesPerPeriod);
3432

35-
unorderedMinutes -= (periodCount * minutesPerPeriod);
33+
unorderedMinutes -= (periodCount * minutesPerPeriod);
3634

37-
return periodCount;
38-
});
39-
},
35+
return periodCount;
36+
});
37+
}
4038

41-
/*
42-
* Accepts a timeObject and returns a condensed string representation of it
43-
* (e.g. '1w 2d 3h 1m' or '1h 30m'). Zero value units are not included.
44-
*/
39+
/*
40+
* Accepts a timeObject (see parseSeconds) and returns a condensed string representation of it
41+
* (e.g. '1w 2d 3h 1m' or '1h 30m'). Zero value units are not included.
42+
*/
4543

46-
stringifyTime(timeObject) {
47-
const reducedTime = _.reduce(timeObject, (memo, unitValue, unitName) => {
48-
const isNonZero = !!unitValue;
49-
return isNonZero ? `${memo} ${unitValue}${unitName.charAt(0)}` : memo;
50-
}, '').trim();
51-
return reducedTime.length ? reducedTime : '0m';
52-
},
44+
export function stringifyTime(timeObject) {
45+
const reducedTime = _.reduce(timeObject, (memo, unitValue, unitName) => {
46+
const isNonZero = !!unitValue;
47+
return isNonZero ? `${memo} ${unitValue}${unitName.charAt(0)}` : memo;
48+
}, '').trim();
49+
return reducedTime.length ? reducedTime : '0m';
50+
}
5351

54-
/*
55-
* Accepts a time string of any size (e.g. '1w 2d 3h 5m' or '1w 2d') and returns
56-
* the first non-zero unit/value pair.
57-
*/
52+
/*
53+
* Accepts a time string of any size (e.g. '1w 2d 3h 5m' or '1w 2d') and returns
54+
* the first non-zero unit/value pair.
55+
*/
5856

59-
abbreviateTime(timeStr) {
60-
return timeStr.split(' ')
61-
.filter(unitStr => unitStr.charAt(0) !== '0')[0];
62-
},
57+
export function abbreviateTime(timeStr) {
58+
return timeStr.split(' ')
59+
.filter(unitStr => unitStr.charAt(0) !== '0')[0];
60+
}
6361

64-
secondsToMinutes(seconds) {
65-
return Math.abs(seconds / 60);
66-
},
67-
};
68-
})(window.gl || (window.gl = {}));

app/assets/javascripts/main.js

-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ import './label_manager';
101101
import './labels';
102102
import './labels_select';
103103
import './layout_nav';
104-
import './feature_highlight/feature_highlight_options';
105104
import LazyLoader from './lazy_loader';
106105
import './line_highlighter';
107106
import './logo';

0 commit comments

Comments
 (0)