Commit 613e6317 authored by GitLab Bot's avatar GitLab Bot

Merge remote-tracking branch 'upstream/master' into ce-to-ee-2018-11-14

parents 2b4ad5ec 078fab66
...@@ -44,8 +44,11 @@ export default { ...@@ -44,8 +44,11 @@ export default {
isNew() { isNew() {
return this.diffMode === diffModes.new; return this.diffMode === diffModes.new;
}, },
isRenamed() {
return this.diffMode === diffModes.renamed;
},
imagePath() { imagePath() {
return this.isNew ? this.newPath : this.oldPath; return this.isNew || this.isRenamed ? this.newPath : this.oldPath;
}, },
}, },
methods: { methods: {
...@@ -114,7 +117,7 @@ export default { ...@@ -114,7 +117,7 @@ export default {
}]" }]"
> >
<slot <slot
v-if="isNew" v-if="isNew || isRenamed"
slot="image-overlay" slot="image-overlay"
name="image-overlay" name="image-overlay"
> >
......
...@@ -176,8 +176,10 @@ ...@@ -176,8 +176,10 @@
background-color: $white-light; background-color: $white-light;
} }
.discussion-form-container { table {
.discussion-form-container {
padding: $gl-padding-top $gl-padding $gl-padding; padding: $gl-padding-top $gl-padding $gl-padding;
}
} }
.discussion-notes .disabled-comment { .discussion-notes .disabled-comment {
......
...@@ -13,12 +13,32 @@ $note-form-margin-left: 72px; ...@@ -13,12 +13,32 @@ $note-form-margin-left: 72px;
} }
} }
@mixin outline-comment() {
margin: $gl-padding;
border: 1px solid $border-color;
border-radius: $border-radius-default;
}
.note-wrapper { .note-wrapper {
padding: $gl-padding; padding: $gl-padding;
&.outlined {
@include outline-comment();
}
} }
.issuable-discussion { .main-notes-list {
.notes.timeline > .timeline-entry { @include vertical-line(39px);
}
.notes {
display: block;
list-style: none;
margin: 0;
padding: 0;
position: relative;
&.timeline > .timeline-entry {
border: 1px solid $border-color; border: 1px solid $border-color;
border-radius: $border-radius-default; border-radius: $border-radius-default;
margin: $gl-padding 0; margin: $gl-padding 0;
...@@ -51,18 +71,6 @@ $note-form-margin-left: 72px; ...@@ -51,18 +71,6 @@ $note-form-margin-left: 72px;
border-top: 1px solid $border-color; border-top: 1px solid $border-color;
} }
} }
}
.main-notes-list {
@include vertical-line(36px);
}
.notes {
display: block;
list-style: none;
margin: 0;
padding: 0;
position: relative;
> .note-discussion { > .note-discussion {
.card { .card {
...@@ -71,10 +79,6 @@ $note-form-margin-left: 72px; ...@@ -71,10 +79,6 @@ $note-form-margin-left: 72px;
li.note { li.note {
border-bottom: 1px solid $border-color; border-bottom: 1px solid $border-color;
&:first-child {
border-radius: $border-radius-default $border-radius-default 0 0;
}
} }
} }
...@@ -387,6 +391,7 @@ $note-form-margin-left: 72px; ...@@ -387,6 +391,7 @@ $note-form-margin-left: 72px;
line-height: 42px; line-height: 42px;
padding: 0 $gl-padding; padding: 0 $gl-padding;
border-top: 1px solid $border-color; border-top: 1px solid $border-color;
border-radius: 0;
&:hover { &:hover {
background-color: $gray-light; background-color: $gray-light;
...@@ -479,9 +484,7 @@ $note-form-margin-left: 72px; ...@@ -479,9 +484,7 @@ $note-form-margin-left: 72px;
} }
.note-wrapper { .note-wrapper {
margin: $gl-padding; @include outline-comment();
border: 1px solid $border-color;
border-radius: $border-radius-default;
} }
.discussion-reply-holder { .discussion-reply-holder {
...@@ -491,6 +494,16 @@ $note-form-margin-left: 72px; ...@@ -491,6 +494,16 @@ $note-form-margin-left: 72px;
} }
} }
.commit-diff {
.notes {
@include vertical-line(52px);
}
.discussion-reply-holder {
border-top: 1px solid $border-color;
}
}
.discussion-header, .discussion-header,
.note-header-info { .note-header-info {
a { a {
......
...@@ -9,14 +9,13 @@ class Shard < ActiveRecord::Base ...@@ -9,14 +9,13 @@ class Shard < ActiveRecord::Base
# The GitLab config does not change for the lifecycle of the process # The GitLab config does not change for the lifecycle of the process
in_config = Gitlab.config.repositories.storages.keys.map(&:to_s) in_config = Gitlab.config.repositories.storages.keys.map(&:to_s)
transaction do
in_db = all.pluck(:name) in_db = all.pluck(:name)
missing = in_config - in_db
# This may race with other processes creating shards at the same time, but
# `by_name` will handle that correctly
missing = in_config - in_db
missing.map { |name| by_name(name) } missing.map { |name| by_name(name) }
end end
end
def self.by_name(name) def self.by_name(name)
find_or_create_by(name: name) find_or_create_by(name: name)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
.suppressed-container .suppressed-container
%a.show-suppressed-diff.js-show-suppressed-diff Changes suppressed. Click to show. %a.show-suppressed-diff.js-show-suppressed-diff Changes suppressed. Click to show.
%table.text-file.diff-wrap-lines.code.js-syntax-highlight{ data: diff_view_data, class: too_big ? 'hide' : '' } %table.text-file.diff-wrap-lines.code.js-syntax-highlight.commit-diff{ data: diff_view_data, class: too_big ? 'hide' : '' }
= render partial: "projects/diffs/line", = render partial: "projects/diffs/line",
collection: diff_file.highlighted_diff_lines, collection: diff_file.highlighted_diff_lines,
as: :line, as: :line,
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
- note_editable = can?(current_user, :admin_note, note) - note_editable = can?(current_user, :admin_note, note)
- note_counter = local_assigns.fetch(:note_counter, 0) - note_counter = local_assigns.fetch(:note_counter, 0)
%li.timeline-entry{ id: dom_id(note), %li.timeline-entry.note-wrapper.outlined{ id: dom_id(note),
class: ["note", "note-row-#{note.id}", ('system-note' if note.system)], class: ["note", "note-row-#{note.id}", ('system-note' if note.system)],
data: { author_id: note.author.id, data: { author_id: note.author.id,
editable: note_editable, editable: note_editable,
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
- if can_create_note? - if can_create_note?
.notes.notes-form.timeline .notes.notes-form.timeline
.timeline-entry .timeline-entry.note-form
.timeline-entry-inner .timeline-entry-inner
.flash-container.timeline-content .flash-container.timeline-content
......
---
title: Fix a race condition intermittently breaking GitLab startup
merge_request: 23028
author:
type: fixed
---
title: Upgrade to Ruby 2.5.3
merge_request: 2806
author:
type: performance
...@@ -132,9 +132,9 @@ Remove the old Ruby 1.8 if present: ...@@ -132,9 +132,9 @@ Remove the old Ruby 1.8 if present:
Download Ruby and compile it: Download Ruby and compile it:
mkdir /tmp/ruby && cd /tmp/ruby mkdir /tmp/ruby && cd /tmp/ruby
curl --remote-name --progress https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.5.tar.gz curl --remote-name --progress https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.3.tar.gz
echo '4d650f302f1ec00256450b112bb023644b6ab6dd ruby-2.4.5.tar.gz' | shasum -c - && tar xzf ruby-2.4.5.tar.gz echo 'f919a9fbcdb7abecd887157b49833663c5c15fda ruby-2.5.3.tar.gz' | shasum -c - && tar xzf ruby-2.5.3.tar.gz
cd ruby-2.4.5 cd ruby-2.5.3
./configure --disable-install-rdoc ./configure --disable-install-rdoc
make make
......
...@@ -179,20 +179,34 @@ function delete() { ...@@ -179,20 +179,34 @@ function delete() {
track="${1-stable}" track="${1-stable}"
name="$CI_ENVIRONMENT_SLUG" name="$CI_ENVIRONMENT_SLUG"
if [ -z "$CI_ENVIRONMENT_SLUG" ]; then
echo "No release given, aborting the delete!"
return
fi
if [[ "$track" != "stable" ]]; then if [[ "$track" != "stable" ]]; then
name="$name-$track" name="$name-$track"
fi fi
if ! deployExists "${KUBE_NAMESPACE}" "${name}"; then
echo "The release $name doesn't exist, aborting the cleanup!"
return
fi
echo "Deleting release '$name'..." echo "Deleting release '$name'..."
helm delete --purge "$name" || true helm delete --purge "$name" || true
} }
function cleanup() { function cleanup() {
echo "Cleaning up $CI_ENVIRONMENT_SLUG..." if [ -z "$CI_ENVIRONMENT_SLUG" ]; then
kubectl -n "$KUBE_NAMESPACE" get ingress,svc,pdb,hpa,deploy,statefulset,job,pod,secret,configmap,pvc,secret,clusterrole,clusterrolebinding,role,rolebinding,sa 2>&1 \ echo "No release given, aborting the delete!"
| grep "$CI_ENVIRONMENT_SLUG" \ return
| awk '{print $1}' \ fi
| xargs kubectl -n "$KUBE_NAMESPACE" delete \
echo "Cleaning up '$CI_ENVIRONMENT_SLUG'..."
kubectl -n "$KUBE_NAMESPACE" delete \
ingress,svc,pdb,hpa,deploy,statefulset,job,pod,secret,configmap,pvc,secret,clusterrole,clusterrolebinding,role,rolebinding,sa \
-l release="$CI_ENVIRONMENT_SLUG" \
|| true || true
} }
......
...@@ -97,6 +97,26 @@ describe('ImageDiffViewer', () => { ...@@ -97,6 +97,26 @@ describe('ImageDiffViewer', () => {
}); });
}); });
it('renders image diff for renamed', done => {
vm = new Vue({
components: {
imageDiffViewer,
},
template: `
<image-diff-viewer diff-mode="renamed" new-path="${GREEN_BOX_IMAGE_URL}" old-path="">
<span slot="image-overlay" class="overlay">test</span>
</image-diff-viewer>
`,
}).$mount();
setTimeout(() => {
expect(vm.$el.querySelector('img').getAttribute('src')).toBe(GREEN_BOX_IMAGE_URL);
expect(vm.$el.querySelector('.overlay')).not.toBe(null);
done();
});
});
describe('swipeMode', () => { describe('swipeMode', () => {
beforeEach(done => { beforeEach(done => {
createComponent({ createComponent({
......
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