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

Add latest changes from gitlab-org/gitlab@master

parent c2b98d3d
No related branches found
No related tags found
No related merge requests found
Showing
with 102 additions and 57 deletions
Loading
Loading
@@ -65,7 +65,7 @@ scope format: false do
resources :protected_tags, only: [:index, :show, :create, :update, :destroy]
end
 
scope constraints: { id: /[^\0]+/ } do
scope path: '-', constraints: { id: /[^\0]+/ } do
scope controller: :blob do
get '/new/*id', action: :new, as: :new_blob
post '/create/*id', action: :create, as: :create_blob
Loading
Loading
# frozen_string_literal: true
class AddServiceDeskUsername < ActiveRecord::Migration[5.2]
DOWNTIME = false
def change
add_column :service_desk_settings, :outgoing_name, :string, limit: 255
end
end
# frozen_string_literal: true
class Knative09PrometheusUpdate < ActiveRecord::Migration[5.2]
DOWNTIME = false
def up
::Gitlab::DatabaseImporters::CommonMetrics::Importer.new.execute
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: 2019_12_16_183532) do
ActiveRecord::Schema.define(version: 2019_12_17_160632) do
 
# These are extensions that must be enabled in order to support this database
enable_extension "pg_trgm"
Loading
Loading
@@ -3663,6 +3663,7 @@ ActiveRecord::Schema.define(version: 2019_12_16_183532) do
 
create_table "service_desk_settings", primary_key: "project_id", id: :bigint, default: nil, force: :cascade do |t|
t.string "issue_template_key", limit: 255
t.string "outgoing_name", limit: 255
end
 
create_table "services", id: :serial, force: :cascade do |t|
Loading
Loading
Loading
Loading
@@ -10,11 +10,6 @@ migrations automatically reschedule themselves for a later point in time.
 
## When To Use Background Migrations
 
> **Note:**
> When adding background migrations _you must_ make sure they are announced in the
> monthly release post along with an estimate of how long it will take to complete
> the migrations.
In the vast majority of cases you will want to use a regular Rails migration
instead. Background migrations should be used when migrating _data_ in
tables that have so many rows this process would take hours when performed in a
Loading
Loading
@@ -34,6 +29,11 @@ Some examples where background migrations can be useful:
- Populating one column based on JSON stored in another column.
- Migrating data that depends on the output of external services (e.g. an API).
 
> **Note:**
> If the background migration is part of an important upgrade, make sure it's announced
> in the release post. Discuss with your Project Manager if you're not sure the migration falls
> into this category.
## Isolation
 
Background migrations must be isolated and can not use application code (e.g.
Loading
Loading
Loading
Loading
@@ -39,43 +39,31 @@ To distinguish queries from mutations and fragments, the following naming conven
- `addUser.mutation.graphql` for mutations;
- `basicUser.fragment.graphql` for fragments.
 
GraphQL:
- Queries are stored in `(ee/)app/assets/javascripts/` under the feature. For example, `respository/queries`. Frontend components can use these stored queries.
- Mutations are stored in
`(ee/)app/assets/javascripts/<subfolders>/<name of mutation>.mutation.graphql`.
### Fragments
 
Fragments are a way to make your complex GraphQL queries more readable and re-usable.
They can be stored in a separate file and imported.
Fragments are a way to make your complex GraphQL queries more readable and re-usable. Here is an example of GraphQL fragment:
 
For example, a fragment that references another fragment:
```ruby
fragment BaseEpic on Epic {
```javascript
fragment DesignListItem on Design {
id
iid
title
webPath
relativePosition
userPermissions {
adminEpic
createEpic
}
image
event
filename
notesCount
}
```
 
fragment EpicNode on Epic {
...BaseEpic
state
reference(full: true)
relationPath
createdAt
closedAt
hasChildren
hasIssues
group {
fullPath
Fragments can be stored in separate files, imported and used in queries, mutations or other fragments.
```javascript
#import "./designList.fragment.graphql"
#import "./diffRefs.fragment.graphql"
fragment DesignItem on Design {
...DesignListItem
fullPath
diffRefs {
...DesignDiffRefs
}
}
```
Loading
Loading
Loading
Loading
@@ -253,7 +253,7 @@ project and should only have access to that project.
 
External users:
 
- Cannot create groups or projects.
- Cannot create groups, projects, or personal snippets.
- Can only access projects to which they are explicitly granted access,
thus hiding all other internal or private ones from them (like being
logged out).
Loading
Loading
Loading
Loading
@@ -152,11 +152,18 @@ module Banzai
 
def rebuild_relative_uri(uri)
file_path = nested_file_path_if_exists(uri)
resource_type = uri_type(file_path)
# Repository routes are under /-/ scope now.
# Since we craft a path without using route helpers we must
# ensure - is added here.
prefix = '-' if %w(tree blob raw commits).include?(resource_type.to_s)
 
uri.path = [
relative_url_root,
project.full_path,
uri_type(file_path),
prefix,
resource_type,
Addressable::URI.escape(ref).gsub('#', '%23'),
Addressable::URI.escape(file_path)
].compact.join('/').squeeze('/').chomp('/')
Loading
Loading
Loading
Loading
@@ -12,10 +12,12 @@ module Gitlab
def link_dependencies
link_json('ImportPath') do |path|
case path
when %r{\A(?<repo>github\.com/#{REPO_REGEX})/(?<path>.+)\z}
"https://#{$~[:repo]}/tree/master/#{$~[:path]}"
when %r{\A(?<repo>gitlab\.com/#{NESTED_REPO_REGEX})\.git/(?<path>.+)\z},
%r{\A(?<repo>git(lab|hub)\.com/#{REPO_REGEX})/(?<path>.+)\z}
%r{\A(?<repo>gitlab\.com/#{REPO_REGEX})/(?<path>.+)\z}
 
"https://#{$~[:repo]}/tree/master/#{$~[:path]}"
"https://#{$~[:repo]}/-/tree/master/#{$~[:path]}"
when /\Agolang\.org/
"https://godoc.org/#{path}"
else
Loading
Loading
Loading
Loading
@@ -220,6 +220,8 @@ excluded_attributes:
- :encrypted_token
- :encrypted_token_iv
- :enabled
service_desk_setting:
- :outgoing_name
 
methods:
notes:
Loading
Loading
Loading
Loading
@@ -60,7 +60,7 @@ module Gitlab
end
 
meta_import_tag = tag :meta, name: 'go-import', content: "#{import_prefix} git #{repository_url}"
meta_source_tag = tag :meta, name: 'go-source', content: "#{import_prefix} #{project_url} #{project_url}/tree/#{branch}{/dir} #{project_url}/blob/#{branch}{/dir}/{file}#L{line}"
meta_source_tag = tag :meta, name: 'go-source', content: "#{import_prefix} #{project_url} #{project_url}/-/tree/#{branch}{/dir} #{project_url}/-/blob/#{branch}{/dir}/{file}#L{line}"
head_tag = content_tag :head, meta_import_tag + meta_source_tag
html_tag = content_tag :html, head_tag + body_tag
[html_tag, 200]
Loading
Loading
Loading
Loading
@@ -5,6 +5,10 @@ module Quality
UnknownTestLevelError = Class.new(StandardError)
 
TEST_LEVEL_FOLDERS = {
migration: %w[
migrations
lib/gitlab/background_migration
],
unit: %w[
bin
config
Loading
Loading
@@ -19,7 +23,6 @@ module Quality
initializers
javascripts
lib
migrations
models
policies
presenters
Loading
Loading
@@ -36,10 +39,6 @@ module Quality
workers
elastic_integration
],
migration: %w[
migrations
lib/gitlab/background_migration
],
integration: %w[
controllers
mailers
Loading
Loading
Loading
Loading
@@ -4994,12 +4994,18 @@ msgstr ""
msgid "Could not create group"
msgstr ""
 
msgid "Could not create issue"
msgstr ""
msgid "Could not create project"
msgstr ""
 
msgid "Could not delete chat nickname %{chat_name}."
msgstr ""
 
msgid "Could not fetch projects"
msgstr ""
msgid "Could not remove the trigger."
msgstr ""
 
Loading
Loading
@@ -5644,6 +5650,12 @@ msgstr ""
msgid "Delete list"
msgstr ""
 
msgid "Delete snippet"
msgstr ""
msgid "Delete snippet?"
msgstr ""
msgid "Delete source branch"
msgstr ""
 
Loading
Loading
@@ -10001,6 +10013,9 @@ msgstr ""
msgid "IssuesAnalytics|Total:"
msgstr ""
 
msgid "Issue|Title"
msgstr ""
msgid "It must have a header row and at least two columns: the first column is the issue title and the second column is the issue description. The separator is automatically detected."
msgstr ""
 
Loading
Loading
@@ -10709,6 +10724,9 @@ msgstr ""
msgid "Loading issues"
msgstr ""
 
msgid "Loading snippet"
msgstr ""
msgid "Loading the GitLab IDE..."
msgstr ""
 
Loading
Loading
@@ -11724,6 +11742,9 @@ msgstr ""
msgid "New issue"
msgstr ""
 
msgid "New issue title"
msgstr ""
msgid "New label"
msgstr ""
 
Loading
Loading
Loading
Loading
@@ -34,6 +34,7 @@
"@babel/core": "^7.6.2",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/plugin-proposal-json-strings": "^7.2.0",
"@babel/plugin-proposal-optional-chaining": "^7.7.5",
"@babel/plugin-proposal-private-methods": "^7.6.0",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/plugin-syntax-import-meta": "^7.2.0",
Loading
Loading
Loading
Loading
@@ -44,7 +44,7 @@ gitlab:
memory: 37.5M
maxReplicas: 3
hpa:
targetAverageValue: 130m
targetAverageValue: 500m
deployment:
livenessProbe:
timeoutSeconds: 5
Loading
Loading
@@ -56,6 +56,8 @@ gitlab:
limits:
cpu: 975m
memory: 1450M
hpa:
targetAverageValue: 650m
task-runner:
resources:
requests:
Loading
Loading
Loading
Loading
@@ -72,7 +72,7 @@ describe MetricsDashboard do
 
it 'includes project_blob_path only for project dashboards' do
expect(system_dashboard['project_blob_path']).to be_nil
expect(project_dashboard['project_blob_path']).to eq("/#{project.namespace.path}/#{project.name}/blob/master/.gitlab/dashboards/test.yml")
expect(project_dashboard['project_blob_path']).to eq("/#{project.namespace.path}/#{project.name}/-/blob/master/.gitlab/dashboards/test.yml")
end
 
describe 'project permissions' do
Loading
Loading
Loading
Loading
@@ -36,7 +36,7 @@ describe Projects::BlameController do
 
it 'redirects' do
expect(subject)
.to redirect_to("/#{project.full_path}/tree/master")
.to redirect_to("/#{project.full_path}/-/tree/master")
end
end
 
Loading
Loading
Loading
Loading
@@ -33,7 +33,7 @@ describe Projects::BlobController do
 
it 'redirects' do
expect(subject)
.to redirect_to("/#{project.full_path}/tree/master")
.to redirect_to("/#{project.full_path}/-/tree/master")
end
end
 
Loading
Loading
@@ -115,7 +115,7 @@ describe Projects::BlobController do
 
it 'redirects' do
expect(subject)
.to redirect_to("/#{project.full_path}/tree/markdown/doc")
.to redirect_to("/#{project.full_path}/-/tree/markdown/doc")
end
end
end
Loading
Loading
Loading
Loading
@@ -37,7 +37,7 @@ describe Projects::BranchesController do
let(:ref) { "master" }
it 'redirects' do
expect(subject)
.to redirect_to("/#{project.full_path}/tree/merge_branch")
.to redirect_to("/#{project.full_path}/-/tree/merge_branch")
end
end
 
Loading
Loading
@@ -46,7 +46,7 @@ describe Projects::BranchesController do
let(:ref) { "master" }
it 'redirects' do
expect(subject)
.to redirect_to("/#{project.full_path}/tree/alert('merge');")
.to redirect_to("/#{project.full_path}/-/tree/alert('merge');")
end
end
 
Loading
Loading
@@ -88,7 +88,7 @@ describe Projects::BranchesController do
}
 
expect(subject)
.to redirect_to("/#{project.full_path}/tree/1-feature-branch")
.to redirect_to("/#{project.full_path}/-/tree/1-feature-branch")
end
 
it 'posts a system note' do
Loading
Loading
Loading
Loading
@@ -69,7 +69,7 @@ describe Projects::RawController do
env: :raw_blob_request_limit,
remote_ip: '0.0.0.0',
request_method: 'GET',
path: "/#{project.full_path}/raw/#{file_path}"
path: "/#{project.full_path}/-/raw/#{file_path}"
}
 
expect(Gitlab::AuthLogger).to receive(:error).with(attributes).once
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