Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2021-02-19 03:10:49 +00:00
parent 6f5b1492ab
commit f9d2a3e215
20 changed files with 81 additions and 22 deletions

View File

@ -7,8 +7,10 @@ require:
- rubocop-rspec
inherit_from:
- .rubocop_manual_todo.yml
- .rubocop_todo.yml
<% unless ENV['REVEAL_RUBOCOP_TODO'] == '1' %>
- '.rubocop_manual_todo.yml'
- '.rubocop_todo.yml'
<% end %>
- ./rubocop/rubocop-migrations.yml
- ./rubocop/rubocop-usage-data.yml
- ./rubocop/rubocop-code_reuse.yml

View File

@ -95,6 +95,7 @@ export default class Profile {
updateHeaderAvatar() {
$('.header-user-avatar').attr('src', this.avatarGlCrop.dataURL);
$('.js-sidebar-user-avatar').attr('src', this.avatarGlCrop.dataURL);
}
setRepoRadio() {

View File

@ -3,7 +3,7 @@
.context-header
= link_to profile_path, title: _('Profile Settings') do
.avatar-container.s40.settings-avatar
= image_tag avatar_icon_for_user(current_user, 40), class: "avatar s40 avatar-tile", alt: current_user.name
= image_tag avatar_icon_for_user(current_user, 40), class: "avatar s40 avatar-tile js-sidebar-user-avatar", alt: current_user.name, data: { testid: 'sidebar-user-avatar' }
.sidebar-context-title= _('User Settings')
%ul.sidebar-top-level-items
= nav_link(path: 'profiles#show', html_options: {class: 'home'}) do

View File

@ -0,0 +1,5 @@
---
title: Update user avatar in sidebar realtime
merge_request: 54135
author: Yogi (@yo)
type: changed

View File

@ -57,6 +57,7 @@ backtracing
badging
Bamboo
Bazel
Bhyve
Bitbucket
blockquote
blockquoted
@ -90,6 +91,7 @@ Certbot
changeset
changesets
chai
ChaosKube
chatbot
chatbots
ChatOps
@ -125,6 +127,8 @@ CrowdIn
CSV
cybersecurity
Dangerfile
datasource
datasources
datetime
Debian
Decompressor
@ -410,6 +414,7 @@ Poedit
polyfill
polyfills
pooler
postfixed
postgres.ai
PostgreSQL
precompile
@ -550,6 +555,7 @@ Sidekiq
Silverlight
Sisense
Sitespeed
skippable
Slack
Slackbot
Slony
@ -575,6 +581,8 @@ strikethrough
strikethroughs
stunnel
stylelint
subchart
subcharts
subfolder
subfolders
subgraph
@ -634,6 +642,7 @@ todos
tokenizer
Tokenizers
tokenizing
tolerations
toolchain
toolchains
toolkit
@ -740,6 +749,7 @@ unstash
unstashed
unstashing
unsynced
unsynchronized
untarred
untracked
untrusted

View File

@ -180,9 +180,16 @@ production:
| `allow_username_or_email_login` | If enabled, GitLab ignores everything after the first `@` in the LDAP username submitted by the user on sign-in. If you are using `uid: 'userPrincipalName'` on ActiveDirectory you need to disable this setting, because the userPrincipalName contains an `@`. | no | boolean |
| `block_auto_created_users` | To maintain tight control over the number of billable users on your GitLab installation, enable this setting to keep new users blocked until they have been cleared by an administrator (default: false). | no | boolean |
| `base` | Base where we can search for users. | yes | `'ou=people,dc=gitlab,dc=example'` or `'DC=mydomain,DC=com'` |
| `user_filter` | Filter LDAP users. Format: [RFC 4515](https://tools.ietf.org/search/rfc4515) Note: GitLab does not support `omniauth-ldap`'s custom filter syntax. | no | `'(employeeType=developer)'` or `'(&(objectclass=user)(|(samaccountname=momo)(samaccountname=toto)))'` |
| `user_filter` | Filter LDAP users. Format: [RFC 4515](https://tools.ietf.org/search/rfc4515) Note: GitLab does not support `omniauth-ldap`'s custom filter syntax. | no | For examples, read [Examples of user filters](#examples-of-user-filters). |
| `lowercase_usernames` | If lowercase_usernames is enabled, GitLab converts the name to lower case. | no | boolean |
#### Examples of user filters
Some examples of the `user_filter` field syntax:
- `'(employeeType=developer)'`
- `'(&(objectclass=user)(|(samaccountname=momo)(samaccountname=toto)))'`
### SSL Configuration Settings **(FREE SELF)**
| Setting | Description | Required | Examples |

View File

@ -38,7 +38,7 @@ POST /projects/:id/invitations
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID or [URL-encoded path of the project or group](README.md#namespaced-path-encoding) owned by the authenticated user |
| `email` | integer/string | yes | The email of the new member or multiple emails separated by commas |
| `email` | string | yes | The email of the new member or multiple emails separated by commas |
| `access_level` | integer | yes | A valid access level |
| `expires_at` | string | no | A date string in the format YEAR-MONTH-DAY |

View File

@ -34,7 +34,7 @@ GET /projects/:id/templates/:type
| Attribute | Type | Required | Description |
| ---------- | ------ | -------- | ----------- |
| `id` | integer / string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) |
| `type` | string | yes | The type `(dockerfiles|gitignores|gitlab_ci_ymls|licenses|issues|merge_requests)` of the template |
| `type` | string | yes | The type of the template. Accepted values are: `dockerfiles`, `gitignores`, `gitlab_ci_ymls`, `licenses`, `issues`, `merge_requests` |
Example response (licenses):

View File

@ -197,7 +197,7 @@ There are a few tools that can produce JUnit report format XML files in C/C++.
#### GoogleTest
In the following example, `gtest` is used to generate the test reports.
If there are multiple gtest executables created for different architectures (`x86`, `x64` or `arm`),
If there are multiple `gtest` executables created for different architectures (`x86`, `x64` or `arm`),
you will be required to run each test providing a unique filename. The results
will then be aggregated together.

View File

@ -154,6 +154,13 @@ resolved and place it in the `.rubocop_manual_todo.yml`. In this scenario, do no
changes to the `.rubocop_todo.yml` as an `exclude limit` that is higher than 15 will make the
`.rubocop_todo.yml` hard to parse.
### Reveal existing RuboCop exceptions
To reveal existing RuboCop exceptions in the code that have been excluded via `.rubocop_todo.yml` and
`.rubocop_manual_todo.yml`, set the environment variable `REVEAL_RUBOCOP_TODO` to `1`.
This allows you to reveal existing RuboCop exceptions during your daily work cycle and fix them along the way.
## Database migrations
See the dedicated [Database Migrations Style Guide](../migration_style_guide.md).

View File

@ -276,17 +276,19 @@ and reduces confidence in our testing suite covering all possible combinations.
Additionally, a feature flag overwritten in some of the environments can result
in undefined and untested system behavior.
To remove a feature flag:
To remove a feature flag, open **one merge request** to make the changes. In the MR:
1. Open a new merge request with the ~"feature flag" label so
release managers are aware the changes are hidden behind a feature flag.
1. Add the ~"feature flag" label so release managers are aware the changes are hidden behind a feature flag.
1. If the merge request has to be picked into a stable branch, add the
appropriate `~"Pick into X.Y"` label, for example `~"Pick into 13.0"`.
See [the feature flag process](process.md#including-a-feature-behind-feature-flag-in-the-final-release)
for further details.
1. Remove all references to the feature flag from the codebase.
1. Remove all references to the feature flag from the codebase, including tests.
1. Remove the YAML definition for the feature from the repository.
1. Clean up the feature flag from all environments with `/chatops run feature delete some_feature`.
Once the above MR has been merged, you should:
1. [Clean up the feature flag from all environments](#cleanup-chatops) with `/chatops run feature delete some_feature`.
1. Close the rollout issue for the feature flag after the feature flag is removed from the codebase.
### Cleanup ChatOps

View File

@ -141,7 +141,7 @@ configure your SSH client to point to the directory where the private key is sto
IdentityFile ~/.ssh/example_com_rsa
```
For more information on these settings, see the [`man ssh_config` (SSH config manual)](https://man.openbsd.org/ssh_config) page.
For more information on these settings, see the [`man ssh_config`](https://man.openbsd.org/ssh_config) page in the SSH configuration manual.
Public SSH keys must be unique to GitLab because they bind to your account.
Your SSH key is the only identifier you have when you push code with SSH.

View File

@ -44,7 +44,7 @@ module QA
end
it 'user transfers a project between groups',
testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/406' do
testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1703' do
# Retry is needed here as the target group is not avaliable for transfer right away.
QA::Support::Retrier.retry_on_exception(reload_page: page) do
Page::File::Show.perform(&:go_to_general_settings)

View File

@ -9,7 +9,7 @@ module QA
end
end
it 'can merge feature branch fork to mainline', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/928' do
it 'can merge feature branch fork to mainline', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1701' do
Flow::Login.while_signed_in do
merge_request.visit!

View File

@ -3,7 +3,7 @@
module QA
RSpec.describe 'Create' do
describe 'Git push over HTTP', :ldap_no_tls do
it 'user pushes code to the repository', :smoke, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/426' do
it 'user pushes code to the repository', :smoke, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1702' do
Flow::Login.sign_in
Resource::Repository::ProjectPush.fabricate! do |push|

View File

@ -3,7 +3,7 @@
module QA
RSpec.describe 'Create', :smoke do
describe 'Personal snippet creation' do
it 'user creates a personal snippet', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/840' do
it 'user creates a personal snippet', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1704' do
Flow::Login.sign_in
Page::Main::Menu.perform do |menu|

View File

@ -23,7 +23,7 @@ RSpec.describe 'User uploads avatar to profile' do
expect(user.reload.avatar.file).to exist
end
it 'their new avatar is immediately visible in the header', :js do
it 'their new avatar is immediately visible in the header and setting sidebar', :js do
find('.js-user-avatar-input', visible: false).set(avatar_file_path)
click_button 'Set new profile picture'
@ -33,5 +33,6 @@ RSpec.describe 'User uploads avatar to profile' do
data_uri = find('.avatar-image .avatar')['src']
expect(page.find('.header-user-avatar')['src']).to eq data_uri
expect(page.find('[data-testid="sidebar-user-avatar"]')['src']).to eq data_uri
end
end

View File

@ -45,9 +45,16 @@ export const extendedWrapper = (wrapper) => {
return wrapper;
}
return Object.defineProperty(wrapper, 'findByTestId', {
value(id) {
return this.find(`[data-testid="${id}"]`);
return Object.defineProperties(wrapper, {
findByTestId: {
value(id) {
return this.find(`[data-testid="${id}"]`);
},
},
findAllByTestId: {
value(id) {
return this.findAll(`[data-testid="${id}"]`);
},
},
});
};

View File

@ -88,5 +88,22 @@ describe('Vue test utils helpers', () => {
expect(mockComponent.findByTestId(testId).exists()).toBe(true);
});
});
describe('findAllByTestId', () => {
const testId = 'a-component';
let mockComponent;
beforeEach(() => {
mockComponent = extendedWrapper(
shallowMount({
template: `<div><div data-testid="${testId}"></div><div data-testid="${testId}"></div></div>`,
}),
);
});
it('should find all components by test id', () => {
expect(mockComponent.findAllByTestId(testId)).toHaveLength(2);
});
});
});
});

View File

@ -35,7 +35,7 @@ RSpec.describe Namespaces::InProductMarketingEmailsService, '#execute' do
end
end
context 'for each track and series with the right conditions' do
context 'for each track and series with the right conditions', :quarantine do # https://gitlab.com/gitlab-org/gitlab/-/issues/322092
using RSpec::Parameterized::TableSyntax
where(:track, :interval, :actions_completed) do