Skip to content

Commit 1edce67

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 208ef94 commit 1edce67

File tree

8 files changed

+96
-76
lines changed

8 files changed

+96
-76
lines changed

.rubocop_manual_todo.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1884,7 +1884,6 @@ Gitlab/NamespacedClass:
18841884
- 'app/models/issue_email_participant.rb'
18851885
- 'app/models/issue_link.rb'
18861886
- 'app/models/issue_user_mention.rb'
1887-
- 'app/models/iteration.rb'
18881887
- 'app/models/jira_connect_installation.rb'
18891888
- 'app/models/jira_connect_subscription.rb'
18901889
- 'app/models/jira_import_state.rb'
@@ -2696,6 +2695,7 @@ Gitlab/NamespacedClass:
26962695
- 'ee/app/models/issuable_metric_image.rb'
26972696
- 'ee/app/models/issuable_sla.rb'
26982697
- 'ee/app/models/issuables_analytics.rb'
2698+
- 'ee/app/models/iteration.rb'
26992699
- 'ee/app/models/iteration_note.rb'
27002700
- 'ee/app/models/ldap_group_link.rb'
27012701
- 'ee/app/models/ldap_key.rb'

GITLAB_KAS_VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
13.10.1
1+
13.11.0

app/models/iteration.rb

-16
This file was deleted.

config/feature_flags/development/board_new_list.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/299366
55
milestone: '13.8'
66
type: development
77
group: group::project management
8-
default_enabled: false
8+
default_enabled: true

doc/user/application_security/dast/index.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ stages:
164164
- build
165165
- dast
166166
167-
include:
167+
include:
168168
- template: DAST.gitlab-ci.yml
169169
170170
# Deploys the container to the GitLab container registry
@@ -469,16 +469,14 @@ variables:
469469

470470
#### Import API specification from a file
471471

472-
If your API specification is in your repository, you can provide the specification's
473-
filename directly as the target. The specification file is expected to be in the
474-
`/zap/wrk` directory.
472+
If your API specification file is in your repository, you can provide its filename as the target.
473+
The API specification file must be in the `/zap/wrk` directory.
475474

476475
```yaml
477476
dast:
478-
script:
477+
before_script:
479478
- mkdir -p /zap/wrk
480479
- cp api-specification.yml /zap/wrk/api-specification.yml
481-
- /analyze -t $DAST_WEBSITE
482480
variables:
483481
GIT_STRATEGY: fetch
484482
DAST_API_SPECIFICATION: api-specification.yml
@@ -496,6 +494,12 @@ host referenced may be different than the host of the API's review instance.
496494
This can cause incorrect URLs to be imported, or a scan on an incorrect host.
497495
Use the `DAST_API_HOST_OVERRIDE` CI/CD variable to override these values.
498496

497+
WARNING:
498+
When using the API host override feature, you cannot use the `$DAST_WEBSITE` variable to override the hostname.
499+
A host override is _only_ supported when importing the API specification from a URL. Attempts to override the
500+
host throw an error when the API specification is imported from a file. This is due to a limitation in the
501+
ZAP OpenAPI extension.
502+
499503
For example, with a OpenAPI V3 specification containing:
500504

501505
```yaml
@@ -515,10 +519,6 @@ variables:
515519
DAST_API_HOST_OVERRIDE: api-test.host.com
516520
```
517521

518-
Note that using a host override is ONLY supported when importing the API specification from a URL.
519-
It doesn't work and is ignored when importing the specification from a file. This is due to a
520-
limitation in the ZAP OpenAPI extension.
521-
522522
#### Authentication using headers
523523

524524
Tokens in request headers are often used as a way to authenticate API requests.
@@ -963,7 +963,7 @@ follows:
963963
- _Header validation_ requires the header `Gitlab-On-Demand-DAST` be added to the target site,
964964
with a value unique to the project. The validation process checks that the header is present, and
965965
checks its value.
966-
966+
967967
Both methods are equivalent in functionality. Use whichever is feasible.
968968

969969
#### Create a site profile

doc/user/project/issue_board.md

+16-14
Original file line numberDiff line numberDiff line change
@@ -342,14 +342,16 @@ As in other list types, click the trash icon to remove a list.
342342

343343
### Iteration lists **(PREMIUM)**
344344

345-
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/250479) in GitLab 13.10.
346-
> - It's [deployed behind the `board_new_lists` and `iteration_board_lists` feature flags](../feature_flags.md), disabled by default.
347-
> - It's disabled on GitLab.com.
348-
> - It's recommended for production use.
349-
> - To use it in GitLab self-managed instances, ask a GitLab administrator to enable the feature flags: [`board_new_lists`](#enable-or-disable-new-add-list-form) and [`iteration_board_lists`](#enable-or-disable-iteration-lists-in-boards).
345+
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/250479) in GitLab 13.11.
346+
> - [Deployed behind the `board_new_lists` and `iteration_board_lists` feature flags](../feature_flags.md), disabled by default.
347+
> - [Enabled by default](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57439) in GitLab 13.11.
348+
> - Enabled on GitLab.com.
349+
> - Recommended for production use.
350+
> - For GitLab self-managed instances, GitLab administrators can opt to disable the feature flags: [`board_new_lists`](#enable-or-disable-new-add-list-form) and [`iteration_board_lists`](#enable-or-disable-iteration-lists-in-boards). **(PREMIUM SELF)**
350351
351-
WARNING:
352-
This feature might not be available to you. Check the **version history** note above for details.
352+
There can be
353+
[risks when disabling released features](../feature_flags.md#risks-when-disabling-released-features).
354+
Refer to this feature's version history for more details.
353355

354356
You're also able to create lists of an iteration.
355357
These are lists that filter issues by the assigned
@@ -646,10 +648,10 @@ Feature.disable(:graphql_board_lists)
646648

647649
### Enable or disable new add list form **(FREE SELF)**
648650

649-
The new form for adding lists is under development and not ready for production use. It is
650-
deployed behind a feature flag that is **disabled by default**.
651+
The new form for adding lists is under development but ready for production use. It is
652+
deployed behind a feature flag that is **enabled by default**.
651653
[GitLab administrators with access to the GitLab Rails console](../../administration/feature_flags.md)
652-
can enable it.
654+
can disable it.
653655

654656
To enable it:
655657

@@ -666,12 +668,12 @@ Feature.disable(:board_new_list)
666668
### Enable or disable iteration lists in boards **(PREMIUM SELF)**
667669

668670
NOTE:
669-
To enable iteration lists in boards, you also need to enable the [new add list form](#enable-or-disable-new-add-list-form).
671+
When disabling iteration lists in boards, you also need to disable the [new add list form](#enable-or-disable-new-add-list-form).
670672

671-
The iteration list is under development and not ready for production use. It is
672-
deployed behind a feature flag that is **disabled by default**.
673+
The iteration list is under development but ready for production use. It is
674+
deployed behind a feature flag that is **enabled by default**.
673675
[GitLab administrators with access to the GitLab Rails console](../../administration/feature_flags.md)
674-
can enable it.
676+
can disable it.
675677

676678
To enable it:
677679

qa/qa/specs/features/browser_ui/3_create/merge_request/merge_when_pipeline_succeeds_spec.rb

+37-23
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module QA
2929
content: <<~EOF
3030
test:
3131
tags: ["runner-for-#{project.name}"]
32-
script: sleep 5
32+
script: sleep 10
3333
only:
3434
- merge_requests
3535
EOF
@@ -47,36 +47,50 @@ module QA
4747
end
4848

4949
it 'merges when pipeline succeeds', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1684' do
50-
branch_name = "merge-request-test-#{SecureRandom.hex(8)}"
50+
verify_merge_when_pipeline_succeeds
51+
end
5152

52-
# Create a branch that will be merged into the default branch
53-
Resource::Repository::ProjectPush.fabricate! do |project_push|
54-
project_push.project = project
55-
project_push.new_branch = true
56-
project_push.branch_name = branch_name
57-
project_push.file_name = "file-#{SecureRandom.hex(8)}.txt"
53+
it 'reliably merges when pipeline succeeds', :transient, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1684' do
54+
verify_merge_when_pipeline_succeeds(repeat: Runtime::Env.transient_trials) do |i|
55+
QA::Runtime::Logger.info("Transient bug test - Trial #{i}")
5856
end
57+
end
5958

60-
# Create a merge request to merge the branch we just created
61-
merge_request = Resource::MergeRequest.fabricate_via_api! do |merge_request|
62-
merge_request.project = project
63-
merge_request.source_branch = branch_name
64-
merge_request.no_preparation = true
65-
end
59+
def verify_merge_when_pipeline_succeeds(repeat: 1)
60+
repeat.times do |i|
61+
yield i if block_given?
6662

67-
merge_request.visit!
63+
branch_name = "merge-request-test-#{SecureRandom.hex(8)}"
6864

69-
Page::MergeRequest::Show.perform do |mr|
70-
mr.merge_when_pipeline_succeeds!
65+
# Create a branch that will be merged into the default branch
66+
Resource::Repository::ProjectPush.fabricate! do |project_push|
67+
project_push.project = project
68+
project_push.new_branch = true
69+
project_push.branch_name = branch_name
70+
project_push.file_name = "file-#{SecureRandom.hex(8)}.txt"
71+
end
7172

72-
Support::Waiter.wait_until(sleep_interval: 5) do
73-
merge_request = merge_request.reload!
74-
merge_request.state == 'merged'
73+
# Create a merge request to merge the branch we just created
74+
merge_request = Resource::MergeRequest.fabricate_via_api! do |merge_request|
75+
merge_request.project = project
76+
merge_request.source_branch = branch_name
77+
merge_request.no_preparation = true
7578
end
7679

77-
aggregate_failures do
78-
expect(merge_request.merge_when_pipeline_succeeds).to be_truthy
79-
expect(mr.merged?).to be_truthy, "Expected content 'The changes were merged' but it did not appear."
80+
merge_request.visit!
81+
82+
Page::MergeRequest::Show.perform do |mr|
83+
mr.merge_when_pipeline_succeeds!
84+
85+
Support::Waiter.wait_until(sleep_interval: 5) do
86+
merge_request = merge_request.reload!
87+
merge_request.state == 'merged'
88+
end
89+
90+
aggregate_failures do
91+
expect(merge_request.merge_when_pipeline_succeeds).to be_truthy
92+
expect(mr.merged?).to be_truthy, "Expected content 'The changes were merged' but it did not appear."
93+
end
8094
end
8195
end
8296
end

spec/frontend/users_select/index_spec.js

+29-9
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,38 @@
11
import { waitFor } from '@testing-library/dom';
22
import MockAdapter from 'axios-mock-adapter';
33
import { cloneDeep } from 'lodash';
4-
import { getFixture, getJSONFixture } from 'helpers/fixtures';
4+
import { getJSONFixture } from 'helpers/fixtures';
55
import axios from '~/lib/utils/axios_utils';
66
import UsersSelect from '~/users_select';
77

8-
const getUserSearchHTML = () => {
9-
const html = getFixture('merge_requests/merge_request_of_current_user.html');
10-
const parser = new DOMParser();
11-
12-
const el = parser.parseFromString(html, 'text/html').querySelector('.assignee');
13-
14-
return el.outerHTML;
15-
};
8+
// TODO: generate this from a fixture that guarantees the same output in CE and EE [(see issue)][1].
9+
// Hardcoding this HTML temproarily fixes a FOSS ~"master::broken" [(see issue)][2].
10+
// [1]: https://gitlab.com/gitlab-org/gitlab/-/issues/327809
11+
// [2]: https://gitlab.com/gitlab-org/gitlab/-/issues/327805
12+
const getUserSearchHTML = () => `
13+
<div class="js-sidebar-assignee-data selectbox hide-collapsed">
14+
<input type="hidden" name="merge_request[assignee_ids][]" value="0">
15+
<div class="dropdown js-sidebar-assignee-dropdown">
16+
<button class="dropdown-menu-toggle js-user-search js-author-search js-multiselect js-save-user-data js-invite-members-track" type="button" data-first-user="frontend-fixtures" data-current-user="true" data-iid="1" data-issuable-type="merge_request" data-project-id="1" data-author-id="1" data-field-name="merge_request[assignee_ids][]" data-issue-update="http://test.host/frontend-fixtures/merge-requests-project/-/merge_requests/1.json" data-ability-name="merge_request" data-null-user="true" data-display="static" data-multi-select="true" data-dropdown-title="Select assignee(s)" data-dropdown-header="Assignee(s)" data-track-event="show_invite_members" data-toggle="dropdown"><span class="dropdown-toggle-text ">Select assignee(s)</span><svg class="s16 dropdown-menu-toggle-icon gl-top-3" data-testid="chevron-down-icon"><use xlink:href="http://test.host/assets/icons-16c30bec0d8a57f0a33e6f6215c6aff7a6ec5e4a7e6b7de733a6b648541a336a.svg#chevron-down"></use></svg></button><div class="dropdown-menu dropdown-select dropdown-menu-user dropdown-menu-selectable dropdown-menu-author dropdown-extended-height">
17+
<div class="dropdown-title gl-display-flex">
18+
<span class="gl-ml-auto">Assign to</span><button class="dropdown-title-button dropdown-menu-close gl-ml-auto" aria-label="Close" type="button"><svg class="s16 dropdown-menu-close-icon" data-testid="close-icon"><use xlink:href="http://test.host/assets/icons-16c30bec0d8a57f0a33e6f6215c6aff7a6ec5e4a7e6b7de733a6b648541a336a.svg#close"></use></svg></button>
19+
</div>
20+
<div class="dropdown-input">
21+
<input type="search" id="" data-qa-selector="dropdown_input_field" class="dropdown-input-field" placeholder="Search users" autocomplete="off"><svg class="s16 dropdown-input-search" data-testid="search-icon"><use xlink:href="http://test.host/assets/icons-16c30bec0d8a57f0a33e6f6215c6aff7a6ec5e4a7e6b7de733a6b648541a336a.svg#search"></use></svg><svg class="s16 dropdown-input-clear js-dropdown-input-clear" data-testid="close-icon"><use xlink:href="http://test.host/assets/icons-16c30bec0d8a57f0a33e6f6215c6aff7a6ec5e4a7e6b7de733a6b648541a336a.svg#close"></use></svg>
22+
</div>
23+
<div data-qa-selector="dropdown_list_content" class="dropdown-content "></div>
24+
<div class="dropdown-footer">
25+
<ul class="dropdown-footer-list">
26+
<li>
27+
<div class="js-invite-members-trigger" data-display-text="Invite Members" data-event="click_invite_members" data-label="edit_assignee" data-trigger-element="anchor"></div>
28+
</li>
29+
</ul>
30+
</div>
31+
<div class="dropdown-loading"><div class="gl-spinner-container"><span class="gl-spinner gl-spinner-orange gl-spinner-md gl-mt-7" aria-label="Loading"></span></div></div>
32+
</div>
33+
</div>
34+
</div>
35+
`;
1636

1737
const USER_SEARCH_HTML = getUserSearchHTML();
1838
const AUTOCOMPLETE_USERS = getJSONFixture('autocomplete/users.json');

0 commit comments

Comments
 (0)