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

Add latest changes from gitlab-org/gitlab@master

parent 946771d0
No related branches found
No related tags found
No related merge requests found
Showing
with 563 additions and 312 deletions
Loading
Loading
@@ -26,6 +26,10 @@ export default (resolvers = {}, config = {}) => {
headers: {
[csrf.headerKey]: csrf.token,
},
// fetch won’t send cookies in older browsers, unless you set the credentials init option.
// We set to `same-origin` which is default value in modern browsers.
// See https://github.com/whatwg/fetch/pull/585 for more information.
credentials: 'same-origin',
};
 
return new ApolloClient({
Loading
Loading
Loading
Loading
@@ -39,7 +39,7 @@ class Projects::ForksController < Projects::ApplicationController
# rubocop: enable CodeReuse/ActiveRecord
 
def new
@namespaces = fork_service.valid_fork_targets
@namespaces = fork_service.valid_fork_targets - [project.namespace]
end
 
# rubocop: disable CodeReuse/ActiveRecord
Loading
Loading
Loading
Loading
@@ -8,7 +8,7 @@ class ForkTargetsFinder
 
# rubocop: disable CodeReuse/ActiveRecord
def execute
::Namespace.where(id: user.manageable_namespaces).where.not(id: project.namespace).sort_by_type
::Namespace.where(id: user.manageable_namespaces).sort_by_type
end
# rubocop: enable CodeReuse/ActiveRecord
 
Loading
Loading
Loading
Loading
@@ -62,6 +62,10 @@ module Ci
end
end
 
def has_downstream_pipeline?
sourced_pipelines.exists?
end
def downstream_pipeline_params
return child_params if triggers_child_pipeline?
return cross_project_params if downstream_project.present?
Loading
Loading
Loading
Loading
@@ -227,6 +227,7 @@ module Ci
end
 
after_transition created: :pending do |pipeline|
next if Feature.enabled?(:ci_drop_bridge_on_downstream_errors, pipeline.project, default_enabled: true)
next unless pipeline.bridge_triggered?
next if pipeline.bridge_waiting?
 
Loading
Loading
@@ -756,6 +757,8 @@ module Ci
raise BridgeStatusError unless source_bridge.active?
 
source_bridge.success!
rescue => e
Gitlab::ErrorTracking.track_exception(e, pipeline_id: id)
end
 
def bridge_triggered?
Loading
Loading
@@ -774,6 +777,10 @@ module Ci
child_pipelines.exists?
end
 
def created_successfully?
persisted? && failure_reason.blank?
end
def detailed_status(current_user)
Gitlab::Ci::Status::Pipeline::Factory
.new(self, current_user)
Loading
Loading
Loading
Loading
@@ -188,14 +188,6 @@ class Snippet < ApplicationRecord
end
end
 
def self.content_types
[
".rb", ".py", ".pl", ".scala", ".c", ".cpp", ".java",
".haml", ".html", ".sass", ".scss", ".xml", ".php", ".erb",
".js", ".sh", ".coffee", ".yml", ".md"
]
end
def blob
@blob ||= Blob.decorate(SnippetBlob.new(self), self)
end
Loading
Loading
Loading
Loading
@@ -5,9 +5,19 @@ module Ci
class CreateCrossProjectPipelineService < ::BaseService
include Gitlab::Utils::StrongMemoize
 
DuplicateDownstreamPipelineError = Class.new(StandardError)
def execute(bridge)
@bridge = bridge
 
if bridge.has_downstream_pipeline?
Gitlab::ErrorTracking.track_exception(
DuplicateDownstreamPipelineError.new,
bridge_id: @bridge.id, project_id: @bridge.project_id
)
return
end
pipeline_params = @bridge.downstream_pipeline_params
target_ref = pipeline_params.dig(:target_revision, :ref)
 
Loading
Loading
@@ -18,14 +28,32 @@ module Ci
current_user,
pipeline_params.fetch(:target_revision))
 
service.execute(
downstream_pipeline = service.execute(
pipeline_params.fetch(:source), pipeline_params[:execute_params]) do |pipeline|
pipeline.variables.build(@bridge.downstream_variables)
end
downstream_pipeline.tap do |pipeline|
next if Feature.disabled?(:ci_drop_bridge_on_downstream_errors, project, default_enabled: true)
update_bridge_status!(@bridge, pipeline)
end
end
 
private
 
def update_bridge_status!(bridge, pipeline)
Gitlab::OptimisticLocking.retry_lock(bridge) do |subject|
if pipeline.created_successfully?
# If bridge uses `strategy:depend` we leave it running
# and update the status when the downstream pipeline completes.
subject.success! unless subject.dependent?
else
subject.drop!(:downstream_pipeline_creation_failed)
end
end
end
def ensure_preconditions!(target_ref)
unless downstream_project_accessible?
@bridge.drop!(:downstream_bridge_project_not_found)
Loading
Loading
---
title: Allow to fork to the same namespace and different path via API call
merge_request: 26062
author:
type: fixed
---
title: Project Snippets API endpoints check feature status
merge_request: 26064
author:
type: performance
---
title: Add support for configuring remote mirrors via API
merge_request: 25825
author: Rajendra Kadam
type: added
---
title: Drop bridge if downstream pipeline has errors
merge_request: 25706
author:
type: fixed
---
title: Add avatar upload support for create and update group APIs
merge_request: 25751
author: Rajendra Kadam
type: added
---
title: Add web_url attribute to API response for Commits
merge_request: 26173
author:
type: added
---
title: Remove unused Snippets#content_types method
merge_request: 26306
author:
type: other
---
title: Send credentials with GraphQL fetch requests
merge_request: 26386
author:
type: fixed
Loading
Loading
@@ -79,6 +79,8 @@ From there, you can see the following actions:
- Release was added to a project
- Release was updated
- Release milestone associations changed
- Permission to approve merge requests by committers was updated ([introduced](https://gitlab.com/gitlab-org/gitlab/issues/7531) in GitLab 12.9)
- Permission to approve merge requests by authors was updated ([introduced](https://gitlab.com/gitlab-org/gitlab/issues/7531) in GitLab 12.9)
 
### Instance events **(PREMIUM ONLY)**
 
Loading
Loading
doc/administration/gitaly/img/praefect_architecture_v12_9.png

155 KiB

This diff is collapsed.
Loading
Loading
@@ -42,7 +42,8 @@ Example response:
"message": "Replace sanitize with escape once",
"parent_ids": [
"6104942438c14ec7bd21c6cd5bd995272b3faff6"
]
],
"web_url": "https://gitlab.example.com/thedude/gitlab-foss/-/commit/ed899a2f4b50b4370feeea94676502b42383c746"
},
{
"id": "6104942438c14ec7bd21c6cd5bd995272b3faff6",
Loading
Loading
@@ -56,7 +57,8 @@ Example response:
"message": "Sanitize for network graph",
"parent_ids": [
"ae1d9fb46aa2b07ee9836d49862ec4e2c46fbbba"
]
],
"web_url": "https://gitlab.example.com/thedude/gitlab-foss/-/commit/ed899a2f4b50b4370feeea94676502b42383c746"
}
]
```
Loading
Loading
@@ -156,7 +158,8 @@ Example response:
"deletions": 2,
"total": 4
},
"status": null
"status": null,
"web_url": "https://gitlab.example.com/thedude/gitlab-foss/-/commit/ed899a2f4b50b4370feeea94676502b42383c746"
}
```
 
Loading
Loading
@@ -235,7 +238,8 @@ Example response:
"deletions": 10,
"total": 25
},
"status": "running"
"status": "running",
"web_url": "https://gitlab.example.com/thedude/gitlab-foss/-/commit/6104942438c14ec7bd21c6cd5bd995272b3faff6"
}
```
 
Loading
Loading
@@ -314,7 +318,8 @@ Example response:
"message": "Feature added\n\nSigned-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>\n",
"parent_ids": [
"a738f717824ff53aebad8b090c1b79a14f2bd9e8"
]
],
"web_url": "https://gitlab.example.com/thedude/gitlab-foss/-/commit/8b090c1b79a14f2bd9e8a738f717824ff53aebad"
}
```
 
Loading
Loading
@@ -370,7 +375,8 @@ Example response:
"authored_date":"2018-11-08T15:55:26.000Z",
"committer_name":"Administrator",
"committer_email":"admin@example.com",
"committed_date":"2018-11-08T15:55:26.000Z"
"committed_date":"2018-11-08T15:55:26.000Z",
"web_url": "https://gitlab.example.com/thedude/gitlab-foss/-/commit/8b090c1b79a14f2bd9e8a738f717824ff53aebad"
}
```
 
Loading
Loading
Loading
Loading
@@ -492,6 +492,7 @@ Parameters:
| `auto_devops_enabled` | boolean | no | Default to Auto DevOps pipeline for all projects within this group. |
| `subgroup_creation_level` | string | no | Allowed to create subgroups. Can be `owner` (Owners), or `maintainer` (Maintainers). |
| `emails_disabled` | boolean | no | Disable email notifications |
| `avatar` | mixed | no | Image file for avatar of the group. [Introduced in GitLab 12.9](https://gitlab.com/gitlab-org/gitlab/issues/36681) |
| `mentions_disabled` | boolean | no | Disable the capability of a group from getting mentioned |
| `lfs_enabled` | boolean | no | Enable/disable Large File Storage (LFS) for the projects in this group. |
| `request_access_enabled` | boolean | no | Allow users to request member access. |
Loading
Loading
@@ -553,6 +554,7 @@ PUT /groups/:id
| `auto_devops_enabled` | boolean | no | Default to Auto DevOps pipeline for all projects within this group. |
| `subgroup_creation_level` | string | no | Allowed to create subgroups. Can be `owner` (Owners), or `maintainer` (Maintainers). |
| `emails_disabled` | boolean | no | Disable email notifications |
| `avatar` | mixed | no | Image file for avatar of the group. [Introduced in GitLab 12.9](https://gitlab.com/gitlab-org/gitlab/issues/36681) |
| `mentions_disabled` | boolean | no | Disable the capability of a group from getting mentioned |
| `lfs_enabled` (optional) | boolean | no | Enable/disable Large File Storage (LFS) for the projects in this group. |
| `request_access_enabled` | boolean | no | Allow users to request member access. |
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