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

Add latest changes from gitlab-org/gitlab@master

parent 05f1d5d9
No related branches found
No related tags found
No related merge requests found
Showing
with 245 additions and 12 deletions
Loading
Loading
@@ -28,6 +28,11 @@ export default {
required: false,
default: 7,
},
showParticipantLabel: {
type: Boolean,
required: false,
default: true,
},
},
data() {
return {
Loading
Loading
@@ -80,6 +85,7 @@ export default {
<template>
<div>
<div
v-if="showParticipantLabel"
v-tooltip
:title="participantLabel"
class="sidebar-collapsed-icon"
Loading
Loading
@@ -92,7 +98,7 @@ export default {
<gl-loading-icon v-if="loading" class="js-participants-collapsed-loading-icon" />
<span v-else class="js-participants-collapsed-count"> {{ participantCount }} </span>
</div>
<div class="title hide-collapsed">
<div v-if="showParticipantLabel" class="title hide-collapsed">
<gl-loading-icon
v-if="loading"
:inline="true"
Loading
Loading
Loading
Loading
@@ -28,7 +28,8 @@ class Projects::TreeController < Projects::ApplicationController
 
respond_to do |format|
format.html do
lfs_blob_ids
lfs_blob_ids if Feature.disabled?(:vue_file_list, @project)
@last_commit = @repository.last_commit_for_path(@commit.id, @tree.path) || @commit
end
end
Loading
Loading
Loading
Loading
@@ -21,8 +21,7 @@ class ProjectsController < Projects::ApplicationController
before_action :assign_ref_vars, if: -> { action_name == 'show' && repo_exists? }
before_action :tree,
if: -> { action_name == 'show' && repo_exists? && project_view_files? }
before_action :lfs_blob_ids,
if: -> { action_name == 'show' && repo_exists? && project_view_files? }
before_action :lfs_blob_ids, if: :show_blob_ids?, only: :show
before_action :project_export_enabled, only: [:export, :download_export, :remove_export, :generate_new_export]
before_action :present_project, only: [:edit]
before_action :authorize_download_code!, only: [:refs]
Loading
Loading
@@ -296,6 +295,10 @@ class ProjectsController < Projects::ApplicationController
 
private
 
def show_blob_ids?
repo_exists? && project_view_files? && Feature.disabled?(:vue_file_list, @project)
end
# Render project landing depending of which features are available
# So if page is not available in the list it renders the next page
#
Loading
Loading
Loading
Loading
@@ -7,7 +7,7 @@ module HasStatus
BLOCKED_STATUS = %w[manual scheduled].freeze
AVAILABLE_STATUSES = %w[created waiting_for_resource preparing pending running success failed canceled skipped manual scheduled].freeze
STARTED_STATUSES = %w[running success failed skipped manual scheduled].freeze
ACTIVE_STATUSES = %w[preparing pending running].freeze
ACTIVE_STATUSES = %w[waiting_for_resource preparing pending running].freeze
COMPLETED_STATUSES = %w[success failed canceled skipped].freeze
ORDERED_STATUSES = %w[failed preparing pending running waiting_for_resource manual scheduled canceled success skipped created].freeze
PASSED_WITH_WARNINGS_STATUSES = %w[failed canceled].to_set.freeze
Loading
Loading
---
title: Extend Design view sidebar with issue link and a list of participants
merge_request: 22103
author:
type: added
---
title: New API endpoint GET /projects/:id/services
merge_request: 21330
author:
type: added
---
title: add background migration for sha256 fingerprints of ssh keys
merge_request: 21579
author: Roger Meier
type: added
---
title: Add migrations for version control snippets
merge_request: 22275
author:
type: added
---
title: Execute Gitaly LFS call once when Vue file enabled
merge_request: 22168
author:
type: performance
---
title: Make jobs with resource group cancellable
merge_request: 22356
author:
type: fixed
# frozen_string_literal: true
class AddRepositoryStorageToSnippets < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_column_with_default( # rubocop:disable Migration/AddColumnWithDefault
:snippets,
:repository_storage,
:string,
default: 'default',
limit: 255,
allow_null: false
)
end
def down
remove_column(:snippets, :repository_storage)
end
end
# frozen_string_literal: true
class AddStorageVersionToSnippets < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
DOWNTIME = false
disable_ddl_transaction!
def up
add_column_with_default( # rubocop:disable Migration/AddColumnWithDefault
:snippets,
:storage_version,
:integer,
default: 2,
allow_null: false
)
end
def down
remove_column(:snippets, :storage_version)
end
end
# frozen_string_literal: true
class UpdateFingerprintSha256WithinKeys < ActiveRecord::Migration[5.0]
include Gitlab::Database::MigrationHelpers
class Key < ActiveRecord::Base
include EachBatch
self.table_name = 'keys'
self.inheritance_column = :_type_disabled
end
disable_ddl_transaction!
def up
queue_background_migration_jobs_by_range_at_intervals(Key, 'MigrateFingerprintSha256WithinKeys', 5.minutes)
end
def down
# no-op
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: 2020_01_02_170221) do
ActiveRecord::Schema.define(version: 2020_01_06_071113) do
 
# These are extensions that must be enabled in order to support this database
enable_extension "pg_trgm"
Loading
Loading
@@ -3803,6 +3803,8 @@ ActiveRecord::Schema.define(version: 2020_01_02_170221) do
t.string "encrypted_secret_token", limit: 255
t.string "encrypted_secret_token_iv", limit: 255
t.boolean "secret", default: false, null: false
t.string "repository_storage", limit: 255, default: "default", null: false
t.integer "storage_version", default: 2, null: false
t.index ["author_id"], name: "index_snippets_on_author_id"
t.index ["content"], name: "index_snippets_on_content_trigram", opclass: :gin_trgm_ops, using: :gin
t.index ["created_at"], name: "index_snippets_on_created_at"
Loading
Loading
Loading
Loading
@@ -2,6 +2,59 @@
 
>**Note:** This API requires an access token with Maintainer or Owner permissions
 
## List all active services
> [Introduced](https://gitlab.com/gitlab-org/gitlab/merge_requests/21330) in GitLab 12.7.
Get a list of all active project services.
```
GET /projects/:id/services
```
Example response:
```json
[
{
"id": 75,
"title": "Jenkins CI",
"created_at": "2019-11-20T11:20:25.297Z",
"updated_at": "2019-11-20T12:24:37.498Z",
"active": true,
"commit_events": true,
"push_events": true,
"issues_events": true,
"confidential_issues_events": true,
"merge_requests_events": true,
"tag_push_events": false,
"note_events": true,
"confidential_note_events": true,
"pipeline_events": true,
"wiki_page_events": true,
"job_events": true
}
{
"id": 76,
"title": "Alerts endpoint",
"created_at": "2019-11-20T11:20:25.297Z",
"updated_at": "2019-11-20T12:24:37.498Z",
"active": true,
"commit_events": true,
"push_events": true,
"issues_events": true,
"confidential_issues_events": true,
"merge_requests_events": true,
"tag_push_events": true,
"note_events": true,
"confidential_note_events": true,
"pipeline_events": true,
"wiki_page_events": true,
"job_events": true
}
]
```
## Asana
 
Asana - Teamwork without email
Loading
Loading
Loading
Loading
@@ -1109,12 +1109,15 @@ module API
end
end
 
class ProjectService < Grape::Entity
class ProjectServiceBasic < Grape::Entity
expose :id, :title, :created_at, :updated_at, :active
expose :commit_events, :push_events, :issues_events, :confidential_issues_events
expose :merge_requests_events, :tag_push_events, :note_events
expose :confidential_note_events, :pipeline_events, :wiki_page_events
expose :job_events
end
class ProjectService < ProjectServiceBasic
# Expose serialized properties
expose :properties do |service, options|
# TODO: Simplify as part of https://gitlab.com/gitlab-org/gitlab/issues/29404
Loading
Loading
Loading
Loading
@@ -66,6 +66,15 @@ module API
end
end
 
desc 'Get all active project services' do
success Entities::ProjectServiceBasic
end
get ":id/services" do
services = user_project.services.active
present services, with: Entities::ProjectServiceBasic
end
SERVICES.each do |service_slug, settings|
desc "Set #{service_slug} service for project"
params do
Loading
Loading
# frozen_string_literal: true
module Gitlab
module BackgroundMigration
# This class is responsible to update all sha256 fingerprints within the keys table
class MigrateFingerprintSha256WithinKeys
# Temporary AR table for keys
class Key < ActiveRecord::Base
include EachBatch
self.table_name = 'keys'
self.inheritance_column = :_type_disabled
end
TEMP_TABLE = 'tmp_fingerprint_sha256_migration'
def perform(start_id, stop_id)
ActiveRecord::Base.transaction do
execute(<<~SQL)
CREATE TEMPORARY TABLE #{TEMP_TABLE}
(id bigint primary key, fingerprint_sha256 bytea not null)
ON COMMIT DROP
SQL
fingerprints = []
Key.where(id: start_id..stop_id, fingerprint_sha256: nil).find_each do |regular_key|
fingerprint = Base64.decode64(generate_ssh_public_key(regular_key.key))
fingerprints << {
id: regular_key.id,
fingerprint_sha256: ActiveRecord::Base.connection.escape_bytea(fingerprint)
}
end
Gitlab::Database.bulk_insert(TEMP_TABLE, fingerprints)
execute("ANALYZE #{TEMP_TABLE}")
execute(<<~SQL)
UPDATE keys
SET fingerprint_sha256 = t.fingerprint_sha256
FROM #{TEMP_TABLE} t
WHERE keys.id = t.id
SQL
end
end
private
def generate_ssh_public_key(regular_key)
Gitlab::SSHPublicKey.new(regular_key).fingerprint("SHA256").gsub("SHA256:", "")
end
def execute(query)
ActiveRecord::Base.connection.execute(query)
end
end
end
end
Loading
Loading
@@ -172,6 +172,8 @@ excluded_attributes:
- :secret
- :encrypted_secret_token
- :encrypted_secret_token_iv
- :repository_storage
- :storage_version
merge_request_diff:
- :external_diff
- :stored_externally
Loading
Loading
Loading
Loading
@@ -15,13 +15,9 @@ module QA
issue.visit!
 
Page::Project::Issue::Show.perform do |show|
my_first_discussion = 'My first discussion'
show.select_all_activities_filter
show.start_discussion(my_first_discussion)
page.assert_text(my_first_discussion)
show.start_discussion('My first discussion')
show.reply_to_discussion(my_first_reply)
page.assert_text(my_first_reply)
end
end
 
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