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

Add latest changes from gitlab-org/gitlab@master

parent 9caed104
No related branches found
No related tags found
No related merge requests found
Showing with 70 additions and 29 deletions
Loading
Loading
@@ -47,7 +47,6 @@
"Facebook",
"Git LFS",
"git-annex",
"gitlab-ui",
"Git",
"Gitaly",
"GitHub",
Loading
Loading
Loading
Loading
@@ -1577,7 +1577,9 @@ class Project < ApplicationRecord
end
 
def wiki
@wiki ||= ProjectWiki.new(self, self.owner)
strong_memoize(:wiki) do
ProjectWiki.new(self, self.owner)
end
end
 
def jira_tracker_active?
Loading
Loading
Loading
Loading
@@ -8,13 +8,12 @@ module Projects
class BaseRepositoryService < BaseService
include Gitlab::ShellAdapter
 
attr_reader :old_disk_path, :new_disk_path, :old_wiki_disk_path, :old_storage_version, :logger, :move_wiki
attr_reader :old_disk_path, :new_disk_path, :old_storage_version, :logger, :move_wiki
 
def initialize(project:, old_disk_path:, logger: nil)
@project = project
@logger = logger || Gitlab::AppLogger
@old_disk_path = old_disk_path
@old_wiki_disk_path = "#{old_disk_path}.wiki"
@move_wiki = has_wiki?
end
 
Loading
Loading
@@ -44,9 +43,21 @@ module Projects
gitlab_shell.mv_repository(project.repository_storage, from_name, to_name)
end
 
def move_repositories
result = move_repository(old_disk_path, new_disk_path)
project.reload_repository!
if move_wiki
result &&= move_repository(old_wiki_disk_path, new_wiki_disk_path)
project.clear_memoization(:wiki)
end
result
end
def rollback_folder_move
move_repository(new_disk_path, old_disk_path)
move_repository("#{new_disk_path}.wiki", old_wiki_disk_path)
move_repository(new_wiki_disk_path, old_wiki_disk_path)
end
 
def try_to_set_repository_read_only!
Loading
Loading
@@ -58,6 +69,20 @@ module Projects
raise RepositoryInUseError, migration_error
end
end
def wiki_path_suffix
@wiki_path_suffix ||= Gitlab::GlRepository::WIKI.path_suffix
end
def old_wiki_disk_path
@old_wiki_disk_path ||= "#{old_disk_path}#{wiki_path_suffix}"
end
def new_wiki_disk_path
@new_wiki_disk_path ||= "#{new_disk_path}#{wiki_path_suffix}"
end
end
end
end
Projects::HashedStorage::BaseRepositoryService.prepend_if_ee('EE::Projects::HashedStorage::BaseRepositoryService')
Loading
Loading
@@ -11,11 +11,7 @@ module Projects
 
@new_disk_path = project.disk_path
 
result = move_repository(old_disk_path, new_disk_path)
if move_wiki
result &&= move_repository(old_wiki_disk_path, "#{new_disk_path}.wiki")
end
result = move_repositories
 
if result
project.write_repository_config
Loading
Loading
Loading
Loading
@@ -11,11 +11,7 @@ module Projects
 
@new_disk_path = project.disk_path
 
result = move_repository(old_disk_path, new_disk_path)
if move_wiki
result &&= move_repository(old_wiki_disk_path, "#{new_disk_path}.wiki")
end
result = move_repositories
 
if result
project.write_repository_config
Loading
Loading
Loading
Loading
@@ -36,6 +36,6 @@ if GitlabDanger.new(helper.gitlab_helper).ci?
 
Also consider auto-formatting [on-save].
 
[on-save]: https://docs.gitlab.com/ee/development/new_fe_guide/style/prettier.html
[on-save]: https://docs.gitlab.com/ee/development/fe_guide/tooling.html#formatting-with-prettier
MARKDOWN
end
# frozen_string_literal: true
class AddDesignDiskPathToGeoHashedStorageMigratedEvents < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def change
add_column :geo_hashed_storage_migrated_events, :old_design_disk_path, :text
add_column :geo_hashed_storage_migrated_events, :new_design_disk_path, :text
end
end
Loading
Loading
@@ -1663,6 +1663,8 @@ ActiveRecord::Schema.define(version: 2019_12_06_122926) do
t.text "new_wiki_disk_path", null: false
t.integer "old_storage_version", limit: 2
t.integer "new_storage_version", limit: 2, null: false
t.text "old_design_disk_path"
t.text "new_design_disk_path"
t.index ["project_id"], name: "index_geo_hashed_storage_migrated_events_on_project_id"
end
 
Loading
Loading
Loading
Loading
@@ -289,16 +289,16 @@ Example: Issues can be sorted by creation date:
 
```graphql
query {
project(fullPath: "gitlab-org/graphql-sandbox") {
name
issues(sort: created_asc) {
nodes {
title
createdAt
}
project(fullPath: "gitlab-org/graphql-sandbox") {
name
issues(sort: created_asc) {
nodes {
title
createdAt
}
}
}
}
```
 
## Pagination
Loading
Loading
@@ -324,9 +324,9 @@ query {
title
}
}
pageInfo {
endCursor
hasNextPage
pageInfo {
endCursor
hasNextPage
}
}
}
Loading
Loading
Loading
Loading
@@ -293,6 +293,10 @@ Scripts specified in `after_script` are executed in a new shell, separate from a
- Command aliases and variables exported in `script` scripts.
- Changes outside of the working tree (depending on the Runner executor), like
software installed by a `before_script` or `script` script.
- Have a separate timeout, which is hard coded to 5 minutes. See
[related issue](https://gitlab.com/gitlab-org/gitlab-runner/issues/2716) for details.
- Do not affect the job's exit code. If the `script` section succeeds and the
`after_script` times out or fails, the job will exit with code `0` (`Job Succeeded`).
 
It's possible to overwrite a globally defined `before_script` or `after_script`
if you set it per-job:
Loading
Loading
Loading
Loading
@@ -51,10 +51,10 @@ bound on mounting and destroyed when the button is, mitigating the above
issue. It also has bindings to a particular container or modal ID
available, to work with the focus trap created by our GlModal.
 
### 3. A gitlab-ui component not conforming to [Pajamas Design System](https://design.gitlab.com/)
### 3. A `gitlab-ui` component not conforming to [Pajamas Design System](https://design.gitlab.com/)
 
Some [Pajamas Design System](https://design.gitlab.com/) components implemented in
gitlab-ui do not conform with the design system specs because they lack some
`gitlab-ui` do not conform with the design system specs because they lack some
planned features or are not correctly styled yet. In the Pajamas website, a
banner on top of the component examples indicates that:
 
Loading
Loading
Loading
Loading
@@ -11,7 +11,7 @@ easy to maintain, and performant for the end-user.
 
### Utility Classes
 
As part of the effort for [cleaning up our CSS and moving our components into gitlab-ui](https://gitlab.com/groups/gitlab-org/-/epics/950)
As part of the effort for [cleaning up our CSS and moving our components into `gitlab-ui`](https://gitlab.com/groups/gitlab-org/-/epics/950)
led by the [GitLab UI WG](https://gitlab.com/gitlab-com/www-gitlab-com/merge_requests/20623) we prefer the use of utility classes over adding new CSS. However, complex CSS can be addressed by adding component classes.
 
#### Where are utility classes defined?
Loading
Loading
Loading
Loading
@@ -1793,6 +1793,7 @@ describe Project do
let(:project) { create(:project, :repository) }
let(:repo) { double(:repo, exists?: true) }
let(:wiki) { double(:wiki, exists?: true) }
let(:design) { double(:wiki, exists?: false) }
 
it 'expires the caches of the repository and wiki' do
allow(Repository).to receive(:new)
Loading
Loading
@@ -1803,6 +1804,10 @@ describe Project do
.with('foo.wiki', project)
.and_return(wiki)
 
allow(Repository).to receive(:new)
.with('foo.design', project)
.and_return(design)
expect(repo).to receive(:before_delete)
expect(wiki).to receive(:before_delete)
 
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