Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
ed58c35137
commit
2b67531b0f
10 changed files with 115 additions and 19 deletions
|
@ -43,7 +43,8 @@ class PostReceive
|
|||
return false unless user
|
||||
|
||||
# We only need to expire certain caches once per push
|
||||
expire_caches(post_received)
|
||||
expire_caches(post_received, post_received.project.repository)
|
||||
enqueue_repository_cache_update(post_received)
|
||||
|
||||
post_received.enum_for(:changes_refs).with_index do |(oldrev, newrev, ref), index|
|
||||
service_klass =
|
||||
|
@ -72,18 +73,14 @@ class PostReceive
|
|||
after_project_changes_hooks(post_received, user, refs.to_a, changes)
|
||||
end
|
||||
|
||||
# Expire the project, branch, and tag cache once per push. Schedule an
|
||||
# update for the repository size and commit count if necessary.
|
||||
def expire_caches(post_received)
|
||||
project = post_received.project
|
||||
|
||||
project.repository.expire_status_cache if project.empty_repo?
|
||||
project.repository.expire_branches_cache if post_received.includes_branches?
|
||||
project.repository.expire_caches_for_tags if post_received.includes_tags?
|
||||
|
||||
enqueue_repository_cache_update(post_received)
|
||||
# Expire the repository status, branch, and tag cache once per push.
|
||||
def expire_caches(post_received, repository)
|
||||
repository.expire_status_cache if repository.empty?
|
||||
repository.expire_branches_cache if post_received.includes_branches?
|
||||
repository.expire_caches_for_tags if post_received.includes_tags?
|
||||
end
|
||||
|
||||
# Schedule an update for the repository size and commit count if necessary.
|
||||
def enqueue_repository_cache_update(post_received)
|
||||
stats_to_invalidate = [:repository_size]
|
||||
stats_to_invalidate << :commit_count if post_received.includes_default_branch?
|
||||
|
@ -110,6 +107,9 @@ class PostReceive
|
|||
user = identify_user(post_received)
|
||||
return false unless user
|
||||
|
||||
# We only need to expire certain caches once per push
|
||||
expire_caches(post_received, post_received.project.wiki.repository)
|
||||
|
||||
::Git::WikiPushService.new(post_received.project, user, changes: post_received.enum_for(:changes_refs)).execute
|
||||
end
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Fix bug with new wiki not being indexed
|
||||
merge_request: 18051
|
||||
author:
|
||||
type: fixed
|
|
@ -103,8 +103,7 @@ If you do choose to use EFS, avoid storing GitLab log files (e.g. those in `/var
|
|||
there because this will also affect performance. We recommend that the log files be
|
||||
stored on a local volume.
|
||||
|
||||
For more details on another person's experience with EFS, see
|
||||
[Amazon's Elastic File System: Burst Credits](https://rawkode.com/2017/04/16/amazons-elastic-file-system-burst-credits/)
|
||||
For more details on another person's experience with EFS, see this [Commit Brooklyn 2019 video](https://youtu.be/K6OS8WodRBQ?t=313).
|
||||
|
||||
## Avoid using CephFS and GlusterFS
|
||||
|
||||
|
|
BIN
doc/topics/autodevops/img/disable_postgres.png
Normal file
BIN
doc/topics/autodevops/img/disable_postgres.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.8 KiB |
|
@ -847,6 +847,35 @@ the database are preconfigured, but can be customized by setting the associated
|
|||
postgres://user:password@postgres-host:postgres-port/postgres-database
|
||||
```
|
||||
|
||||
#### Using external PostgreSQL database providers
|
||||
|
||||
While Auto DevOps provides out-of-the-box support for a PostgreSQL container for
|
||||
production environments, for some use-cases it may not be sufficiently secure or
|
||||
resilient and you may wish to use an external managed provider for PostgreSQL.
|
||||
For example, AWS Relational Database Service.
|
||||
|
||||
You will need to define environment-scoped variables for `POSTGRES_ENABLED` and `DATABASE_URL` in your project's CI/CD settings.
|
||||
|
||||
To achieve this:
|
||||
|
||||
1. Disable the built-in PostgreSQL installation for the required environments using
|
||||
scoped [environment variables](../../ci/environments.md#scoping-environments-with-specs).
|
||||
For this use case, it's likely that only `production` will need to be added to this
|
||||
list as the builtin PostgreSQL setup for Review Apps and staging will be sufficient
|
||||
as a high availability setup is not required.
|
||||
|
||||
![Auto Metrics](img/disable_postgres.png)
|
||||
|
||||
1. Define the `DATABASE_URL` CI variable as a scoped environment variable that will be
|
||||
available to your application. This should be a URL in the following format:
|
||||
|
||||
```yaml
|
||||
postgres://user:password@postgres-host:postgres-port/postgres-database
|
||||
```
|
||||
|
||||
You will need to ensure that your Kubernetes cluster has network access to wherever
|
||||
PostgreSQL is hosted.
|
||||
|
||||
### Environment variables
|
||||
|
||||
The following variables can be used for setting up the Auto DevOps domain,
|
||||
|
|
|
@ -158,7 +158,7 @@ application for the changes to take effect.
|
|||
### JupyterHub
|
||||
|
||||
> - Introduced in GitLab 11.0 for project-level clusters.
|
||||
> - Introduced in GitLab 12.3 for group-level clusters.
|
||||
> - Introduced in GitLab 12.3 for group and instance-level clusters.
|
||||
|
||||
[JupyterHub](https://jupyterhub.readthedocs.io/en/stable/) is a
|
||||
multi-user service for managing notebooks across a team. [Jupyter
|
||||
|
@ -191,6 +191,7 @@ file.
|
|||
#### Jupyter Git Integration
|
||||
|
||||
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/28783) in GitLab 12.0 for project-level clusters.
|
||||
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/32512) in GitLab 12.3 for group and instance-level clusters.
|
||||
|
||||
When installing JupyterHub onto your Kubernetes cluster, [JupyterLab's Git extension](https://github.com/jupyterlab/jupyterlab-git)
|
||||
is automatically provisioned and configured using the authenticated user's:
|
||||
|
|
|
@ -125,6 +125,7 @@ The following table depicts the various user permission levels in a project.
|
|||
| Manage Error Tracking | | | | ✓ | ✓ |
|
||||
| Delete wiki pages | | | | ✓ | ✓ |
|
||||
| View project Audit Events | | | | ✓ | ✓ |
|
||||
| Manage [push rules](../push_rules/push_rules.md) | | | | ✓ | ✓ |
|
||||
| Switch visibility level | | | | | ✓ |
|
||||
| Transfer project to another namespace | | | | | ✓ |
|
||||
| Remove project | | | | | ✓ |
|
||||
|
|
|
@ -64,8 +64,8 @@ The following quick actions are applicable to descriptions, discussions and thre
|
|||
| `/create_merge_request <branch name>` | ✓ | | | Create a new merge request starting from the current issue |
|
||||
| `/relate #issue1 #issue2` | ✓ | | | Mark issues as related **(STARTER)** |
|
||||
| `/move <path/to/project>` | ✓ | | | Move this issue to another project |
|
||||
| `/zoom <Zoom URL>` | ✓ | | | Add Zoom meeting to this issue. |
|
||||
| `/remove_zoom` | ✓ | | | Remove Zoom meeting from this issue. |
|
||||
| `/zoom <Zoom URL>` | ✓ | | | Add Zoom meeting to this issue. ([Introduced in GitLab 12.4](https://gitlab.com/gitlab-org/gitlab/merge_requests/16609)) |
|
||||
| `/remove_zoom` | ✓ | | | Remove Zoom meeting from this issue. ([Introduced in GitLab 12.4](https://gitlab.com/gitlab-org/gitlab/merge_requests/16609)) |
|
||||
| `/target_branch <local branch name>` | | ✓ | | Set target branch |
|
||||
| `/wip` | | ✓ | | Toggle the Work In Progress status |
|
||||
| `/approve` | | ✓ | | Approve the merge request |
|
||||
|
|
|
@ -985,7 +985,7 @@ msgstr ""
|
|||
msgid "Added"
|
||||
msgstr ""
|
||||
|
||||
msgid "Added %{epic_ref} as child epic."
|
||||
msgid "Added %{epic_ref} as a child epic."
|
||||
msgstr ""
|
||||
|
||||
msgid "Added %{label_references} %{label_text}."
|
||||
|
@ -2934,6 +2934,12 @@ msgstr ""
|
|||
msgid "Cherry-pick this merge request"
|
||||
msgstr ""
|
||||
|
||||
msgid "Child epic does not exist."
|
||||
msgstr ""
|
||||
|
||||
msgid "Child epic doesn't exist."
|
||||
msgstr ""
|
||||
|
||||
msgid "Choose <strong>Create archive</strong> and wait for archiving to complete."
|
||||
msgstr ""
|
||||
|
||||
|
@ -7700,6 +7706,9 @@ msgstr ""
|
|||
msgid "Given access %{time_ago}"
|
||||
msgstr ""
|
||||
|
||||
msgid "Given epic is already related to this epic."
|
||||
msgstr ""
|
||||
|
||||
msgid "Global Shortcuts"
|
||||
msgstr ""
|
||||
|
||||
|
@ -11141,6 +11150,12 @@ msgstr ""
|
|||
msgid "Parameter"
|
||||
msgstr ""
|
||||
|
||||
msgid "Parent epic doesn't exist."
|
||||
msgstr ""
|
||||
|
||||
msgid "Parent epic is not present."
|
||||
msgstr ""
|
||||
|
||||
msgid "Part of merge request changes"
|
||||
msgstr ""
|
||||
|
||||
|
@ -14039,6 +14054,12 @@ msgstr ""
|
|||
msgid "SecurityDashboard| The security dashboard displays the latest security report. Use it to find and fix vulnerabilities."
|
||||
msgstr ""
|
||||
|
||||
msgid "SecurityDashboard|%{firstProject} and %{secondProject}"
|
||||
msgstr ""
|
||||
|
||||
msgid "SecurityDashboard|%{firstProject}, %{secondProject}, and %{rest}"
|
||||
msgstr ""
|
||||
|
||||
msgid "SecurityDashboard|Confidence"
|
||||
msgstr ""
|
||||
|
||||
|
@ -14060,6 +14081,9 @@ msgstr ""
|
|||
msgid "SecurityDashboard|Severity"
|
||||
msgstr ""
|
||||
|
||||
msgid "SecurityDashboard|Unable to add %{invalidProjects}"
|
||||
msgstr ""
|
||||
|
||||
msgid "See metrics"
|
||||
msgstr ""
|
||||
|
||||
|
@ -14297,7 +14321,7 @@ msgstr ""
|
|||
msgid "Session expiration, projects limit and attachment size."
|
||||
msgstr ""
|
||||
|
||||
msgid "Set %{epic_ref} as parent epic."
|
||||
msgid "Set %{epic_ref} as the parent epic."
|
||||
msgstr ""
|
||||
|
||||
msgid "Set a default template for issue descriptions."
|
||||
|
@ -14785,6 +14809,9 @@ msgstr ""
|
|||
msgid "Something went wrong, unable to add %{project} to dashboard"
|
||||
msgstr ""
|
||||
|
||||
msgid "Something went wrong, unable to add projects to dashboard"
|
||||
msgstr ""
|
||||
|
||||
msgid "Something went wrong, unable to get projects"
|
||||
msgstr ""
|
||||
|
||||
|
@ -16134,6 +16161,9 @@ msgstr ""
|
|||
msgid "This environment has no deployments yet."
|
||||
msgstr ""
|
||||
|
||||
msgid "This epic does not exist or you don't have sufficient permission."
|
||||
msgstr ""
|
||||
|
||||
msgid "This feature requires local storage to be enabled"
|
||||
msgstr ""
|
||||
|
||||
|
@ -18342,6 +18372,9 @@ msgstr ""
|
|||
msgid "You don't have any recent searches"
|
||||
msgstr ""
|
||||
|
||||
msgid "You don't have sufficient permission to perform this action."
|
||||
msgstr ""
|
||||
|
||||
msgid "You don’t have access to Cycle Analytics for this group"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ describe PostReceive do
|
|||
|
||||
before do
|
||||
allow_any_instance_of(Gitlab::GitPostReceive).to receive(:identify).and_return(empty_project.owner)
|
||||
# Need to mock here so we can expect calls on project
|
||||
allow(Gitlab::GlRepository).to receive(:parse).and_return([empty_project, Gitlab::GlRepository::PROJECT])
|
||||
end
|
||||
|
||||
|
@ -102,7 +103,7 @@ describe PostReceive do
|
|||
end
|
||||
|
||||
it 'expires the status cache' do
|
||||
expect(project).to receive(:empty_repo?).and_return(true)
|
||||
expect(project.repository).to receive(:empty?).and_return(true)
|
||||
expect(project.repository).to receive(:expire_status_cache)
|
||||
|
||||
perform
|
||||
|
@ -300,6 +301,11 @@ describe PostReceive do
|
|||
describe '#process_wiki_changes' do
|
||||
let(:gl_repository) { "wiki-#{project.id}" }
|
||||
|
||||
before do
|
||||
# Need to mock here so we can expect calls on project
|
||||
allow(Gitlab::GlRepository).to receive(:parse).and_return([project, Gitlab::GlRepository::WIKI])
|
||||
end
|
||||
|
||||
it 'updates project activity' do
|
||||
# Force Project#set_timestamps_for_create to initialize timestamps
|
||||
project
|
||||
|
@ -314,6 +320,28 @@ describe PostReceive do
|
|||
.and change(project, :last_repository_updated_at)
|
||||
end
|
||||
end
|
||||
|
||||
context "branches" do
|
||||
let(:changes) do
|
||||
<<~EOF
|
||||
123456 789012 refs/heads/tést1
|
||||
123456 789012 refs/heads/tést2
|
||||
EOF
|
||||
end
|
||||
|
||||
it 'expires the branches cache' do
|
||||
expect(project.wiki.repository).to receive(:expire_branches_cache).once
|
||||
|
||||
perform
|
||||
end
|
||||
|
||||
it 'expires the status cache' do
|
||||
expect(project.wiki.repository).to receive(:empty?).and_return(true)
|
||||
expect(project.wiki.repository).to receive(:expire_status_cache)
|
||||
|
||||
perform
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "webhook" do
|
||||
|
|
Loading…
Reference in a new issue