Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9a784bcf
Commit
9a784bcf
authored
Sep 06, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
a8d04c5f
866465f6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
1 deletion
+51
-1
changelogs/unreleased/66616-follow-up-documentation-for-merge-trains-cancel-when-running.yml
...up-documentation-for-merge-trains-cancel-when-running.yml
+5
-0
changelogs/unreleased/use_default_external_auth_label_empty.yml
...logs/unreleased/use_default_external_auth_label_empty.yml
+6
-0
doc/ci/merge_request_pipelines/pipelines_for_merged_results/index.md
...e_request_pipelines/pipelines_for_merged_results/index.md
+14
-0
lib/gitlab/import_export/project_tree_restorer.rb
lib/gitlab/import_export/project_tree_restorer.rb
+8
-1
spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
+18
-0
No files found.
changelogs/unreleased/66616-follow-up-documentation-for-merge-trains-cancel-when-running.yml
0 → 100644
View file @
9a784bcf
---
title
:
Update merge train documentation
merge_request
:
32218
author
:
type
:
changed
changelogs/unreleased/use_default_external_auth_label_empty.yml
0 → 100644
View file @
9a784bcf
---
title
:
Prevent empty external authorization classification labels from overriding
the default label
merge_request
:
32517
author
:
Will Chandler
type
:
fixed
doc/ci/merge_request_pipelines/pipelines_for_merged_results/index.md
View file @
9a784bcf
...
...
@@ -61,6 +61,20 @@ CAUTION: **Warning:**
Make sure your
`gitlab-ci.yml`
file is
[
configured properly for pipelines for merge requests
](
../index.md#configuring-pipelines-for-merge-requests
)
,
otherwise pipelines for merged results won't run and your merge requests will be stuck in an unresolved state.
## Automatic pipeline cancelation
> [Introduced](https://gitlab.com/gitlab-org/gitlab-ee/issues/12996) in [GitLab Premium](https://about.gitlab.com/pricing/) 12.3.
GitLab CI can detect the presence of redundant pipelines,
and will cancel them automatically in order to conserve CI resources.
When a user merges a merge request immediately within an ongoing merge
train, the train will be reconstructed, as it will recreate the expected
post-merge commit and pipeline. In this case, the merge train may already
have pipelines running against the previous expected post-merge commit.
These pipelines are considered redundant and will be automatically
canceled.
## Troubleshooting
### Pipelines for merged results not created even with new change pushed to merge request
...
...
lib/gitlab/import_export/project_tree_restorer.rb
View file @
9a784bcf
...
...
@@ -107,7 +107,7 @@ module Gitlab
def
project_params
@project_params
||=
begin
attrs
=
json_params
.
merge
(
override_params
).
merge
(
visibility_level
)
attrs
=
json_params
.
merge
(
override_params
).
merge
(
visibility_level
,
external_label
)
# Cleaning all imported and overridden params
Gitlab
::
ImportExport
::
AttributeCleaner
.
clean
(
relation_hash:
attrs
,
...
...
@@ -135,6 +135,13 @@ module Gitlab
{
'visibility_level'
=>
level
}
end
def
external_label
label
=
override_params
[
'external_authorization_classification_label'
].
presence
||
json_params
[
'external_authorization_classification_label'
].
presence
{
'external_authorization_classification_label'
=>
label
}
end
# Given a relation hash containing one or more models and its relationships,
# loops through each model and each object from a model type and
# and assigns its correspondent attributes hash from +tree_hash+
...
...
spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
View file @
9a784bcf
...
...
@@ -512,6 +512,24 @@ describe Gitlab::ImportExport::ProjectTreeRestorer do
expect
(
Milestone
.
find_by_title
(
'Group-level milestone'
).
iid
).
to
eq
(
2
)
end
end
context
'with external authorization classification labels'
do
it
'converts empty external classification authorization labels to nil'
do
project
.
create_import_data
(
data:
{
override_params:
{
external_authorization_classification_label:
""
}
})
restored_project_json
expect
(
project
.
external_authorization_classification_label
).
to
be_nil
end
it
'preserves valid external classification authorization labels'
do
project
.
create_import_data
(
data:
{
override_params:
{
external_authorization_classification_label:
"foobar"
}
})
restored_project_json
expect
(
project
.
external_authorization_classification_label
).
to
eq
(
"foobar"
)
end
end
end
describe
'#restored_project'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment