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

Add latest changes from gitlab-org/gitlab@master

parent bd860c22
No related branches found
No related tags found
No related merge requests found
Showing
with 146 additions and 68 deletions
Loading
Loading
@@ -2,8 +2,8 @@ function simulateEvent(el, type, options = {}) {
let event;
if (!el) return null;
 
if (/^mouse/.test(type)) {
event = el.ownerDocument.createEvent('MouseEvents');
if (/^(pointer|mouse)/.test(type)) {
event = el.ownerDocument.createEvent('MouseEvent');
event.initMouseEvent(
type,
true,
Loading
Loading
@@ -125,7 +125,7 @@ export default function simulateDrag(options) {
const startTime = new Date().getTime();
const duration = options.duration || 1000;
 
simulateEvent(fromEl, 'mousedown', {
simulateEvent(fromEl, 'pointerdown', {
button: 0,
clientX: fromRect.cx,
clientY: fromRect.cy,
Loading
Loading
@@ -146,7 +146,7 @@ export default function simulateDrag(options) {
const y = fromRect.cy + (toRect.cy - fromRect.cy) * progress;
const overEl = fromEl.ownerDocument.elementFromPoint(x, y);
 
simulateEvent(overEl, 'mousemove', {
simulateEvent(overEl, 'pointermove', {
clientX: x,
clientY: y,
});
Loading
Loading
.job-log {
font-family: $monospace-font;
padding: $gl-padding-8 $input-horizontal-padding;
margin: 0 0 $gl-padding-8;
font-size: 13px;
word-break: break-all;
word-wrap: break-word;
color: $gl-text-color-inverted;
border-radius: $border-radius-small;
min-height: 42px;
background-color: $builds-trace-bg;
}
.line {
padding: 1px $gl-padding 1px $job-log-line-padding;
}
.line-number {
color: $gl-text-color-inverted;
padding: 0 $gl-padding-8;
min-width: $job-line-number-width;
margin-left: -$job-line-number-width;
padding-right: 1em;
&:hover,
&:active,
&:visited {
text-decoration: underline;
color: $gl-text-color-inverted;
}
}
.collapsible-line {
&:hover {
background-color: rgba($white-light, 0.2);
}
.arrow {
margin-left: -$job-arrow-margin;
}
}
.duration {
background: $gl-gray-400;
}
.loader-animation {
@include build-loader-animation;
}
Loading
Loading
@@ -90,3 +90,21 @@
padding: 0;
}
}
.is-dragging {
// Important because plugin sets inline CSS
opacity: 1 !important;
* {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
// !important to make sure no style can override this when dragging
cursor: grabbing !important;
}
&.no-drop * {
cursor: no-drop !important;
}
}
Loading
Loading
@@ -606,6 +606,9 @@ $blame-blue: #254e77;
*/
$builds-trace-bg: #111;
$job-log-highlight-height: 18px;
$job-log-line-padding: 62px;
$job-line-number-width: 40px;
$job-arrow-margin: 50px;
 
/*
* Commit Page
Loading
Loading
Loading
Loading
@@ -2,20 +2,6 @@
cursor: grab;
}
 
.is-dragging {
// Important because plugin sets inline CSS
opacity: 1 !important;
* {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
// !important to make sure no style can override this when dragging
cursor: grabbing !important;
}
}
.is-ghost {
opacity: 0.3;
pointer-events: none;
Loading
Loading
Loading
Loading
@@ -889,11 +889,7 @@ pre.light-well {
@include basic-list-stats;
display: flex;
align-items: center;
padding: $gl-padding 0;
@include media-breakpoint-up(lg) {
padding: $gl-padding 0;
}
padding: $gl-padding-12 0;
 
&.no-description {
@include media-breakpoint-up(sm) {
Loading
Loading
@@ -909,7 +905,7 @@ pre.light-well {
}
 
h2 {
font-size: $gl-font-size-large;
font-size: $gl-font-size;
font-weight: $gl-font-weight-bold;
margin-bottom: 0;
 
Loading
Loading
@@ -951,6 +947,7 @@ pre.light-well {
 
.description {
line-height: 1.5;
color: $gl-text-color-secondary;
}
 
@include media-breakpoint-down(md) {
Loading
Loading
@@ -1096,7 +1093,6 @@ pre.light-well {
&:not(.explore) {
.forks {
display: none;
}
}
 
Loading
Loading
Loading
Loading
@@ -19,7 +19,7 @@ module VersionCheckHelper
end
 
def source_code_project
'gitlab-ce'
'gitlab-foss'
end
end
 
Loading
Loading
Loading
Loading
@@ -88,7 +88,11 @@ module Ci
validates :coverage, numericality: true, allow_blank: true
validates :ref, presence: true
 
scope :not_interruptible, -> { joins(:metadata).where(ci_builds_metadata: { interruptible: false }) }
scope :not_interruptible, -> do
joins(:metadata).where('ci_builds_metadata.id NOT IN (?)',
Ci::BuildMetadata.scoped_build.with_interruptible.select(:id))
end
scope :unstarted, ->() { where(runner_id: nil) }
scope :ignore_failures, ->() { where(allow_failure: false) }
scope :with_artifacts_archive, ->() do
Loading
Loading
Loading
Loading
@@ -25,6 +25,9 @@ module Ci
 
chronic_duration_attr_reader :timeout_human_readable, :timeout
 
scope :scoped_build, -> { where('ci_builds_metadata.build_id = ci_builds.id') }
scope :with_interruptible, -> { where(interruptible: true) }
enum timeout_source: {
unknown_timeout_source: 1,
project_timeout_source: 2,
Loading
Loading
Loading
Loading
@@ -95,7 +95,7 @@ module Ci
# rubocop: disable CodeReuse/ActiveRecord
def auto_cancelable_pipelines
# TODO: Introduced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/23464
if Feature.enabled?(:ci_support_interruptible_pipelines, project, default_enabled: false)
if Feature.enabled?(:ci_support_interruptible_pipelines, project, default_enabled: true)
project.ci_pipelines
.where(ref: pipeline.ref)
.where.not(id: pipeline.id)
Loading
Loading
Loading
Loading
@@ -60,6 +60,11 @@
 
.controls.d-flex.flex-sm-column.align-items-center.align-items-sm-end.flex-wrap.flex-shrink-0.text-secondary{ class: css_controls_class }
.icon-container.d-flex.align-items-center
- if pipeline_status && can?(current_user, :read_cross_project) && project.pipeline_status.has_status? && can?(current_user, :read_build, project)
- pipeline_path = pipelines_project_commit_path(project.pipeline_status.project, project.pipeline_status.sha, ref: project.pipeline_status.ref)
%span.icon-wrapper.pipeline-status
= render 'ci/status/icon', status: project.commit.last_pipeline.detailed_status(current_user), tooltip_placement: 'top', path: pipeline_path
- if project.archived
%span.d-flex.icon-wrapper.badge.badge-warning archived
- if stars
Loading
Loading
@@ -86,10 +91,6 @@
title: _('Issues'), data: { container: 'body', placement: 'top' } do
= sprite_icon('issues', size: 14, css_class: 'append-right-4')
= number_with_delimiter(project.open_issues_count)
- if pipeline_status && can?(current_user, :read_cross_project) && project.pipeline_status.has_status? && can?(current_user, :read_build, project)
- pipeline_path = pipelines_project_commit_path(project.pipeline_status.project, project.pipeline_status.sha, ref: project.pipeline_status.ref)
%span.icon-wrapper.pipeline-status
= render 'ci/status/icon', status: project.commit.last_pipeline.detailed_status(current_user), tooltip_placement: 'top', path: pipeline_path
.updated-note
%span
= _('Updated')
Loading
Loading
Loading
Loading
@@ -15,7 +15,8 @@ Options = Struct.new(
:force,
:merge_request,
:title,
:type
:type,
:ee
)
INVALID_TYPE = -1
 
Loading
Loading
@@ -85,6 +86,10 @@ class ChangelogOptionParser
options.type = parse_type(value)
end
 
opts.on('-e', '--ee', 'Generate a changelog entry for GitLab EE') do |value|
options.ee = value
end
opts.on('-h', '--help', 'Print help message') do
$stdout.puts opts
raise Done.new
Loading
Loading
@@ -249,7 +254,7 @@ class ChangelogEntry
end
 
def ee?
@ee ||= File.exist?(File.expand_path('../CHANGELOG-EE.md', __dir__))
options.ee
end
 
def branch_name
Loading
Loading
Loading
Loading
@@ -12,6 +12,12 @@ You can create one with:
bin/changelog -m %<mr_iid>s "%<mr_title>s"
```
 
If you want to create a changelog entry for GitLab EE, run the following instead:
```
bin/changelog --ee -m %<mr_iid>s "%<mr_title>s"
```
Note: Merge requests with %<labels>s do not trigger this check.
MSG
 
Loading
Loading
# rubocop:disable Style/SignalException
# frozen_string_literal: true
has_only_docs_changes = helper.all_changed_files.all? { |file| file.start_with?('doc/', '.gitlab/ci/docs.gitlab-ci.yml', '.markdownlint.json') || file.end_with?('.md') }
is_docs_only_branch = gitlab.branch_for_head =~ /(^docs[\/-].*|.*-docs$)/
if is_docs_only_branch && !has_only_docs_changes
fail "It seems like your branch name has a `docs` prefix or suffix. "\
"The CI won't run the full pipeline, but you also have changed non-docs files. "\
"Please recreate this MR with a new branch name."
end
if has_only_docs_changes && !is_docs_only_branch
markdown(<<~MARKDOWN)
## Documentation only changes
Hey! Seems your merge request contains only docs changes.
Tired of waiting 2 hours for the pipeline to finish?
Next time, prepend `docs-` to [your branch name](https://docs.gitlab.com/ee/development/documentation/#branch-naming)
and the pipeline will finish before you say GitLab (x300)!
MARKDOWN
end
# frozen_string_literal: true
class ModifyConcurrentIndexToBuildsMetadata < ActiveRecord::Migration[5.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :ci_builds_metadata, [:build_id],
where: "interruptible = true",
name: "index_ci_builds_metadata_on_build_id_and_interruptible"
remove_concurrent_index_by_name(:ci_builds_metadata, 'index_ci_builds_metadata_on_build_id_and_interruptible_false')
end
def down
remove_concurrent_index_by_name(:ci_builds_metadata, 'index_ci_builds_metadata_on_build_id_and_interruptible')
add_concurrent_index :ci_builds_metadata, [:build_id],
where: "interruptible = false",
name: "index_ci_builds_metadata_on_build_id_and_interruptible_false"
end
end
Loading
Loading
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
 
ActiveRecord::Schema.define(version: 2019_09_12_061145) do
ActiveRecord::Schema.define(version: 2019_09_14_223900) do
 
# These are extensions that must be enabled in order to support this database
enable_extension "pg_trgm"
Loading
Loading
@@ -648,7 +648,7 @@ ActiveRecord::Schema.define(version: 2019_09_12_061145) do
t.jsonb "config_options"
t.jsonb "config_variables"
t.index ["build_id"], name: "index_ci_builds_metadata_on_build_id", unique: true
t.index ["build_id"], name: "index_ci_builds_metadata_on_build_id_and_interruptible_false", where: "(interruptible = false)"
t.index ["build_id"], name: "index_ci_builds_metadata_on_build_id_and_interruptible", where: "(interruptible = true)"
t.index ["project_id"], name: "index_ci_builds_metadata_on_project_id"
end
 
Loading
Loading
Loading
Loading
@@ -63,6 +63,11 @@ We need to make Docker Registry send notification events to the
notification secret in `registry.notification_secret` section of
`/etc/gitlab/gitlab.rb` file.
 
NOTE: **Note:**
If you use GitLab HA, you will also have to specify
the notification secret in `registry.notification_secret` section of
`/etc/gitlab/gitlab.rb` file for every web node.
1. Reconfigure the **primary** node for the change to take effect:
 
```sh
Loading
Loading
@@ -94,10 +99,8 @@ generate a short-lived JWT that is pull-only-capable to access the
1. Edit `/etc/gitlab/gitlab.rb`:
 
```ruby
gitlab_rails['registry_replication'] = {
enabled: true,
primary_api_url: 'http://primary.example.com:5000/' # internal address to the primary registry, will be used by GitLab to directly communicate with primary registry API
}
gitlab_rails['geo_registry_replication_enabled'] = true
gitlab_rails['geo_registry_replication_primary_api_url'] = 'http://primary.example.com:5000/' # internal address to the primary registry, will be used by GitLab to directly communicate with primary registry API
```
 
1. Reconfigure the **secondary** node for the change to take effect:
Loading
Loading
Loading
Loading
@@ -2104,7 +2104,7 @@ staging:
 
> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/23464) in GitLab 12.3.
 
`interruptible` is used to indicate that a job should be canceled if made redundant by a newer run of the same job. Defaults to `true`.
`interruptible` is used to indicate that a job should be canceled if made redundant by a newer run of the same job. Defaults to `false`.
This value will only be used if the [automatic cancellation of redundant pipelines feature](../../user/project/pipelines/settings.md#auto-cancel-pending-pipelines)
is enabled.
 
Loading
Loading
Loading
Loading
@@ -18,6 +18,7 @@ description: 'Learn how to contribute to GitLab.'
- [Generate a changelog entry with `bin/changelog`](changelog.md)
- [Code review guidelines](code_review.md) for reviewing code and having code reviewed
- [Database review guidelines](database_review.md) for reviewing database-related changes and complex SQL queries
- [Pipelines for the GitLab project](pipelines.md)
- [Automatic CE->EE merge](automatic_ce_ee_merge.md)
- [Guidelines for implementing Enterprise Edition features](ee_features.md)
- [Security process for developers](https://gitlab.com/gitlab-org/release/docs/blob/master/general/security/developer.md#security-releases-critical-non-critical-as-a-developer)
Loading
Loading
Loading
Loading
@@ -102,6 +102,13 @@ Its simplest usage is to provide the value for `title`:
bin/changelog 'Hey DZ, I added a feature to GitLab!'
```
 
If you want to generate a changelog entry for GitLab EE, you will need to pass
the `--ee` option:
```text
bin/changelog --ee 'Hey DZ, I added a feature to GitLab!'
```
At this point the script would ask you to select the category of the change (mapped to the `type` field in the entry):
 
```text
Loading
Loading
@@ -131,9 +138,6 @@ author:
type:
```
 
If you're working on the GitLab EE repository, the entry will be added to
`ee/changelogs/unreleased/` instead.
### Arguments
 
| Argument | Shorthand | Purpose |
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