提交 f493fb90 编写于 作者: G GitLab Bot

Add latest changes from gitlab-org/gitlab@master

上级 ed00b1a6
<script>
import {
GlBadge,
GlDeprecatedButton,
GlButton,
GlIcon,
GlModal,
GlModalDirective,
......@@ -37,7 +37,7 @@ export default {
name: 'PackagesApp',
components: {
GlBadge,
GlDeprecatedButton,
GlButton,
GlEmptyState,
GlLink,
GlModal,
......@@ -204,14 +204,16 @@ export default {
<package-title />
<div class="mt-sm-2">
<gl-deprecated-button
<gl-button
v-if="canDeletePackage"
v-gl-modal="'delete-modal'"
class="js-delete-button"
variant="danger"
category="primary"
data-qa-selector="delete_button"
>{{ __('Delete') }}</gl-deprecated-button
>
{{ __('Delete') }}
</gl-button>
</div>
</div>
......@@ -326,16 +328,18 @@ export default {
<div slot="modal-footer" class="w-100">
<div class="float-right">
<gl-deprecated-button @click="cancelDelete()">{{ __('Cancel') }}</gl-deprecated-button>
<gl-deprecated-button
<gl-button @click="cancelDelete()">{{ __('Cancel') }}</gl-button>
<gl-button
ref="modal-delete-button"
data-method="delete"
:to="destroyPath"
variant="danger"
category="primary"
data-qa-selector="delete_modal_button"
@click="track($options.trackingActions.DELETE_PACKAGE)"
>{{ __('Delete') }}</gl-deprecated-button
>
{{ __('Delete') }}
</gl-button>
</div>
</div>
</gl-modal>
......
......@@ -55,9 +55,17 @@ module Boards
end
def list
return @list if defined?(@list)
return unless params.key?(:id)
@list = board.lists.find(params[:id]) if params.key?(:id)
strong_memoize(:list) do
id = params[:id]
if board.lists.loaded?
board.lists.find { |l| l.id == id }
else
board.lists.find(id)
end
end
end
def filter_params
......
......@@ -27,6 +27,13 @@ The following are GitLab upgrade validation tests we performed.
- [Investigate why `reconfigure` and `hup` cause downtime on multi-node Geo deployments](https://gitlab.com/gitlab-org/gitlab/-/issues/228898)
- [Geo multi-node deployment upgrade: investigate order when upgrading non-deploy nodes](https://gitlab.com/gitlab-org/gitlab/-/issues/228954)
[Switch from repmgr to Patroni on a Geo primary site](https://gitlab.com/gitlab-org/gitlab/-/issues/224652):
- Description: Tested switching from repmgr to Patroni on a multi-node Geo primary site. Used [the orchestrator tool](https://gitlab.com/gitlab-org/gitlab-orchestrator) to deploy a Geo installation with 3 database nodes managed by repmgr. With this approach, we were also able to address a related issue for [verifying a Geo installation with Patroni and PostgreSQL 11](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/5113).
- Outcome: Partial success. We enabled Patroni on the primary site and set up database replication on the secondary site. However, we found that Patroni would delete the secondary site's replication slot whenever Patroni was restarted. Another issue is that when Patroni elects a new leader in the cluster, the secondary site will fail to automatically follow the new leader. Until these issues are resolved, we cannot officially support and recommend Patroni for Geo installations.
- Follow up issues/actions:
- [Investigate permanent replication slot for Patroni with Geo single node secondary](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/5528)
### June 2020
[Upgrade Geo multi-node installation](https://gitlab.com/gitlab-org/gitlab/-/issues/223284):
......
......@@ -44,6 +44,8 @@ For information on how to resolve common errors reported from the UI, see
If the UI is not working, or you are unable to log in, you can run the Geo
health check manually to get this information as well as a few more details.
#### Health check Rake task
This Rake task can be run on an app node in the **primary** or **secondary**
Geo nodes:
......@@ -77,6 +79,8 @@ All projects are in hashed storage? ... yes
Checking Geo ... Finished
```
#### Sync status Rake task
Current sync information can be found manually by running this Rake task on any
**secondary** app node:
......@@ -205,7 +209,7 @@ sudo gitlab-rake gitlab:geo:check
- Verify the correct password is set for `gitlab_rails['db_password']` that was used when creating the hash in `postgresql['sql_user_password']` by running `gitlab-ctl pg-password-md5 gitlab` and entering the password.
1. Check returns not a secondary node
1. Check returns `not a secondary node`
```plaintext
Checking Geo ...
......@@ -257,7 +261,8 @@ sudo gitlab-rake gitlab:geo:check
## Fixing replication errors
The following sections outline troubleshooting steps for fixing replication
errors.
errors (indicated by `Database replication working? ... no` in the
[`geo:check` output](#health-check-rake-task).
### Message: `ERROR: replication slots can only be used if max_replication_slots > 0`?
......
......@@ -711,6 +711,12 @@ appear to be associated to any of the services running, since they all appear to
| `releases` | `usage_activity_by_stage` | `release` | | CE+EE | Unique release tags in project |
| `successful_deployments` | `usage_activity_by_stage` | `release` | | CE+EE | Total successful deployments |
| `user_preferences_group_overview_security_dashboard` | `usage_activity_by_stage` | `secure` | | | |
| `sast_pipeline` | `usage_activity_by_stage_monthly` | `secure` | | EE | Number of pipelines running sast jobs |
| `dependency_scanning_pipeline` | `usage_activity_by_stage_monthly` | `secure` | | EE | Number of pipelines running dependency jobs |
| `container_scanning_pipeline` | `usage_activity_by_stage_monthly` | `secure` | | EE | Number of pipelines running container scanning jobs |
| `dast_pipeline` | `usage_activity_by_stage_monthly` | `secure` | | EE | Number of pipelines running dast jobs |
| `secret_detection_pipeline` | `usage_activity_by_stage_monthly` | `secure` | | EE | Number of pipelines running secret detection jobs |
| `coverage_fuzzing_pipeline` | `usage_activity_by_stage_monthly` | `secure` | | EE | Number of pipelines running coverage jobs |
| `ci_builds` | `usage_activity_by_stage` | `verify` | | CE+EE | Unique builds in project |
| `ci_external_pipelines` | `usage_activity_by_stage` | `verify` | | CE+EE | Total pipelines in external repositories |
| `ci_internal_pipelines` | `usage_activity_by_stage` | `verify` | | CE+EE | Total pipelines in GitLab repositories |
......
......@@ -55,6 +55,33 @@ Project::Issues::Index.perform do |index|
end
```
## Prefer `aggregate_failures` when there are back-to-back expectations
In cases where there must be multiple (back-to-back) expectations within a test case, it is preferable to use `aggregate_failures`.
This allows you to group a set of expectations and see all the failures altogether, rather than having the test being aborted on the first failure.
For example:
```ruby
#=> Good
Page::Search::Results.perform do |search|
search.switch_to_code
aggregate_failures 'testing search results' do
expect(search).to have_file_in_project(template[:file_name], project.name)
expect(search).to have_file_with_content(template[:file_name], content[0..33])
end
end
#=> Bad
Page::Search::Results.perform do |search|
search.switch_to_code
expect(search).to have_file_in_project(template[:file_name], project.name)
expect(search).to have_file_with_content(template[:file_name], content[0..33])
end
```
## Prefer to split tests across multiple files
Our framework includes a couple of parallelization mechanisms that work by executing spec files in parallel.
......
......@@ -52,7 +52,7 @@ user interface:
1. Sign in to GitLab as a user with Reporter or greater
[permissions](../user/permissions.md).
1. Navigate to **{cloud-gear}** **Operations > TODO HERE**
1. Navigate to **{cloud-gear}** **Operations > Product Analytics**
The user interface contains:
......
......@@ -62,7 +62,7 @@ describe('PackagesApp', () => {
store,
stubs: {
...stubChildren(PackagesApp),
GlDeprecatedButton: false,
GlButton: false,
GlModal: false,
GlTab: false,
GlTabs: false,
......
......@@ -19,6 +19,15 @@ RSpec.shared_examples 'issues list service' do
end
end
it 'avoids N+1' do
params = { board_id: board.id }
control = ActiveRecord::QueryRecorder.new { described_class.new(parent, user, params).execute }
create(:list, board: board)
expect { described_class.new(parent, user, params).execute }.not_to exceed_query_limit(control)
end
context 'issues are ordered by priority' do
it 'returns opened issues when list_id is missing' do
params = { board_id: board.id }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册