Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
aea64c367b
commit
ab7ca19e68
|
@ -21,7 +21,7 @@
|
|||
|
||||
.minimal-rspec-tests:
|
||||
variables:
|
||||
RSPEC_TESTS_MAPPING_ENABLED: "true"
|
||||
MINIMAL_RSPEC_ENABLED: "true"
|
||||
|
||||
.decomposed-database-rspec:
|
||||
variables:
|
||||
|
|
|
@ -82,7 +82,6 @@ detect-tests:
|
|||
- .detect-test-base
|
||||
- .rails:rules:detect-tests
|
||||
variables:
|
||||
RSPEC_TESTS_MAPPING_ENABLED: "true"
|
||||
MATCHED_TESTS_FILE: tmp/matching_tests.txt
|
||||
|
||||
detect-tests as-if-foss:
|
||||
|
|
|
@ -1 +1 @@
|
|||
0077763984dabc1056f34c698fc924cde5400133
|
||||
788a0f1bf74a35d9736bfccc04ab9b5c0539e932
|
||||
|
|
|
@ -140,6 +140,9 @@ export default {
|
|||
this.$el.scrollIntoView();
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
document.removeEventListener('paste', this.onDesignPaste);
|
||||
},
|
||||
methods: {
|
||||
resetFilesToBeSaved() {
|
||||
this.filesToBeSaved = [];
|
||||
|
|
|
@ -39,7 +39,7 @@ export default {
|
|||
:href="value.url"
|
||||
data-track-action="click_link"
|
||||
:data-track-label="$options.i18n.ACTION_LABELS[action].title"
|
||||
data-track-property="Growth::Conversion::Experiment::LearnGitLabA"
|
||||
data-track-property="Growth::Conversion::Experiment::LearnGitLab"
|
||||
>
|
||||
{{ $options.i18n.ACTION_LABELS[action].title }}
|
||||
</gl-link>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Vue from 'vue';
|
||||
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
|
||||
import LearnGitlabA from '../components/learn_gitlab_a.vue';
|
||||
import LearnGitlab from '../components/learn_gitlab.vue';
|
||||
|
||||
function initLearnGitlab() {
|
||||
const el = document.getElementById('js-learn-gitlab-app');
|
||||
|
@ -15,7 +15,7 @@ function initLearnGitlab() {
|
|||
return new Vue({
|
||||
el,
|
||||
render(createElement) {
|
||||
return createElement(LearnGitlabA, {
|
||||
return createElement(LearnGitlab, {
|
||||
props: { actions, sections },
|
||||
});
|
||||
},
|
||||
|
|
|
@ -71,6 +71,17 @@ const deriveProjectPathFromUrl = ($projectImportUrl) => {
|
|||
}
|
||||
};
|
||||
|
||||
const bindHowToImport = () => {
|
||||
$('.how_to_import_link').on('click', (e) => {
|
||||
e.preventDefault();
|
||||
$(e.currentTarget).next('.modal').show();
|
||||
});
|
||||
|
||||
$('.modal-header .close').on('click', () => {
|
||||
$('.modal').hide();
|
||||
});
|
||||
};
|
||||
|
||||
const bindEvents = () => {
|
||||
const $newProjectForm = $('#new_project');
|
||||
const $projectImportUrl = $('#project_import_url');
|
||||
|
@ -88,14 +99,7 @@ const bindEvents = () => {
|
|||
return;
|
||||
}
|
||||
|
||||
$('.how_to_import_link').on('click', (e) => {
|
||||
e.preventDefault();
|
||||
$(e.currentTarget).next('.modal').show();
|
||||
});
|
||||
|
||||
$('.modal-header .close').on('click', () => {
|
||||
$('.modal').hide();
|
||||
});
|
||||
bindHowToImport();
|
||||
|
||||
$('.btn_import_gitlab_project').on('click', () => {
|
||||
const importHref = $('a.btn_import_gitlab_project').attr('href');
|
||||
|
@ -174,3 +178,5 @@ export default {
|
|||
onProjectNameChange,
|
||||
onProjectPathChange,
|
||||
};
|
||||
|
||||
export { bindHowToImport };
|
||||
|
|
|
@ -39,7 +39,8 @@ export default {
|
|||
},
|
||||
defaultCommitMessage: {
|
||||
type: String,
|
||||
required: true,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
inapplicableReason: {
|
||||
type: String,
|
||||
|
|
|
@ -173,6 +173,8 @@ export default {
|
|||
footerManageLabelTitle: this.footerManageLabelTitle,
|
||||
});
|
||||
|
||||
setTimeout(() => this.updateLabelsSetState(), 100);
|
||||
|
||||
this.$store.subscribeAction({
|
||||
after: this.handleVuexActionDispatch,
|
||||
});
|
||||
|
|
|
@ -20,7 +20,7 @@ class Projects::Analytics::CycleAnalytics::SummaryController < Projects::Applica
|
|||
end
|
||||
|
||||
def allowed_params
|
||||
params.permit(:created_after, :created_before)
|
||||
request_params.to_data_collector_params
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ module Registrations
|
|||
result = ::Users::SignupService.new(current_user, update_params).execute
|
||||
|
||||
if result[:status] == :success
|
||||
return redirect_to new_users_sign_up_group_path(trial_params) if show_signup_onboarding?
|
||||
return redirect_to experiment(:combined_registration, user: current_user).redirect_path(trial_params) if show_signup_onboarding?
|
||||
|
||||
members = current_user.members
|
||||
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class CombinedRegistrationExperiment < ApplicationExperiment # rubocop:disable Gitlab/NamespacedClass
|
||||
include Rails.application.routes.url_helpers
|
||||
|
||||
def redirect_path(trial_params)
|
||||
@trial_params = trial_params
|
||||
|
||||
run
|
||||
end
|
||||
|
||||
def control_behavior
|
||||
new_users_sign_up_group_path(@trial_params)
|
||||
end
|
||||
|
||||
def candidate_behavior
|
||||
new_users_sign_up_groups_project_path
|
||||
end
|
||||
end
|
|
@ -760,7 +760,9 @@ module Ci
|
|||
|
||||
def any_runners_available?
|
||||
cache_for_available_runners do
|
||||
project.active_runners.exists?
|
||||
::Gitlab::Database.allow_cross_joins_across_databases(url: 'https://gitlab.com/gitlab-org/gitlab/-/issues/339937') do
|
||||
project.active_runners.exists?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1784,6 +1784,9 @@ class Project < ApplicationRecord
|
|||
Ci::Runner.from_union([runners, group_runners, available_shared_runners])
|
||||
end
|
||||
|
||||
# Once issue 339937 is fixed, please search for all mentioned of
|
||||
# https://gitlab.com/gitlab-org/gitlab/-/issues/339937,
|
||||
# and remove the allow_cross_joins_across_databases.
|
||||
def active_runners
|
||||
strong_memoize(:active_runners) do
|
||||
all_available_runners.active
|
||||
|
|
|
@ -21,14 +21,14 @@ module Ci
|
|||
Ci::Pipeline.transaction do
|
||||
yield(job)
|
||||
|
||||
job.update_older_statuses_retried! if Feature.enabled?(:ci_fix_commit_status_retried, pipeline.project, default_enabled: :yaml)
|
||||
job.update_older_statuses_retried!
|
||||
end
|
||||
end
|
||||
else
|
||||
Ci::Pipeline.transaction do
|
||||
yield(job)
|
||||
|
||||
job.update_older_statuses_retried! if Feature.enabled?(:ci_fix_commit_status_retried, pipeline.project, default_enabled: :yaml)
|
||||
job.update_older_statuses_retried!
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -99,15 +99,17 @@ module Ci
|
|||
private
|
||||
|
||||
def tick_for(build, runners)
|
||||
runners = runners.with_recent_runner_queue
|
||||
runners = runners.with_tags if Feature.enabled?(:ci_preload_runner_tags, default_enabled: :yaml)
|
||||
::Gitlab::Database.allow_cross_joins_across_databases(url: 'https://gitlab.com/gitlab-org/gitlab/-/issues/339937') do
|
||||
runners = runners.with_recent_runner_queue
|
||||
runners = runners.with_tags if Feature.enabled?(:ci_preload_runner_tags, default_enabled: :yaml)
|
||||
|
||||
metrics.observe_active_runners(-> { runners.to_a.size })
|
||||
metrics.observe_active_runners(-> { runners.to_a.size })
|
||||
|
||||
runners.each do |runner|
|
||||
metrics.increment_runner_tick(runner)
|
||||
runners.each do |runner|
|
||||
metrics.increment_runner_tick(runner)
|
||||
|
||||
runner.pick_build!(build)
|
||||
runner.pick_build!(build)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -90,10 +90,14 @@ module Projects
|
|||
def after_create_actions
|
||||
log_info("#{@project.owner.name} created a new project \"#{@project.full_name}\"")
|
||||
|
||||
# Skip writing the config for project imports/forks because it
|
||||
# will always fail since the Git directory doesn't exist until
|
||||
# a background job creates it (see Project#add_import_job).
|
||||
@project.set_full_path unless @project.import?
|
||||
if @project.import?
|
||||
experiment(:combined_registration, user: current_user).track(:import_project)
|
||||
else
|
||||
# Skip writing the config for project imports/forks because it
|
||||
# will always fail since the Git directory doesn't exist until
|
||||
# a background job creates it (see Project#add_import_job).
|
||||
@project.set_full_path
|
||||
end
|
||||
|
||||
unless @project.gitlab_project_import?
|
||||
@project.create_wiki unless skip_wiki?
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
.form-group.project-name.col-sm-12
|
||||
= f.label :name, class: 'label-bold' do
|
||||
%span= _("Project name")
|
||||
= f.text_field :name, placeholder: "My awesome project", class: "form-control gl-form-input input-lg", autofocus: true, data: { track_label: "#{track_label}", track_event: "activate_form_input", track_property: "project_name", track_value: "" }, required: true, aria: { required: true }
|
||||
= f.text_field :name, placeholder: "My awesome project", class: "form-control gl-form-input input-lg", data: { track_label: "#{track_label}", track_event: "activate_form_input", track_property: "project_name", track_value: "" }, required: true, aria: { required: true }
|
||||
.form-group.project-path.col-sm-6
|
||||
= f.label :namespace_id, class: 'label-bold' do
|
||||
%span= _('Project URL')
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
- if @merge_requests.present?
|
||||
= render @merge_requests
|
||||
- else
|
||||
= render 'shared/empty_states/merge_requests'
|
||||
= render 'shared/empty_states/merge_requests', button_path: new_merge_request_path
|
||||
|
||||
- if @merge_requests.present?
|
||||
= paginate_collection @merge_requests, total_pages: @total_pages
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
= render 'shared/issuable/bulk_update_sidebar', type: :merge_requests
|
||||
|
||||
.merge-requests-holder
|
||||
= render 'merge_requests'
|
||||
= render 'merge_requests', new_merge_request_path: new_merge_request_path
|
||||
- if new_merge_request_email
|
||||
.gl-text-center.gl-pt-5.gl-pb-7
|
||||
.js-issueable-by-email{ data: { initial_email: new_merge_request_email, issuable_type: issuable_type, emails_help_page_path: help_page_path('development/emails', anchor: 'email-namespace'), quick_actions_help_path: help_page_path('user/project/quick_actions'), markdown_help_path: help_page_path('user/markdown'), reset_path: new_issuable_address_project_path(@project, issuable_type: issuable_type) } }
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
= _("To widen your search, change or remove filters above")
|
||||
.text-center
|
||||
- if can_create_merge_request
|
||||
= link_to _("New merge request"), project_new_merge_request_path(@project), class: "gl-button btn btn-confirm", title: _("New merge request")
|
||||
= link_to _("New merge request"), button_path || project_new_merge_request_path(@project), class: "gl-button btn btn-confirm", title: _("New merge request")
|
||||
- elsif is_opened_state && opened_merged_count == 0 && closed_merged_count > 0
|
||||
%h4.text-center
|
||||
= _("There are no open merge requests")
|
||||
|
@ -28,7 +28,7 @@
|
|||
= _("To keep this project going, create a new merge request")
|
||||
.text-center
|
||||
- if can_create_merge_request
|
||||
= link_to _("New merge request"), project_new_merge_request_path(@project), class: "gl-button btn btn-confirm", title: _("New merge request")
|
||||
= link_to _("New merge request"), button_path || project_new_merge_request_path(@project), class: "gl-button btn btn-confirm", title: _("New merge request")
|
||||
- elsif is_closed_state && opened_merged_count > 0 && closed_merged_count == 0
|
||||
%h4.text-center
|
||||
= _("There are no closed merge requests")
|
||||
|
|
|
@ -4,7 +4,7 @@ module Deployments
|
|||
class HooksWorker # rubocop:disable Scalability/IdempotentWorker
|
||||
include ApplicationWorker
|
||||
|
||||
data_consistency :delayed, feature_flag: :load_balancing_for_deployments_hooks_worker
|
||||
data_consistency :delayed
|
||||
|
||||
queue_namespace :deployment
|
||||
feature_category :continuous_delivery
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
name: ci_fix_commit_status_retried
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/54300
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/321631
|
||||
milestone: '13.9'
|
||||
type: development
|
||||
group: group::pipeline authoring
|
||||
default_enabled: true
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
name: load_balancing_for_deployments_hooks_worker
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/67878
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/338342
|
||||
milestone: '14.2'
|
||||
type: development
|
||||
group: group::release
|
||||
name: combined_registration
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/67614
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/285533
|
||||
milestone: '14.3'
|
||||
type: experiment
|
||||
group: group::adoption
|
||||
default_enabled: false
|
|
@ -68,6 +68,9 @@ Rails.application.routes.draw do
|
|||
Gitlab.ee do
|
||||
resources :groups, only: [:new, :create]
|
||||
resources :projects, only: [:new, :create]
|
||||
resources :groups_projects, only: [:new, :create] do
|
||||
post :import, on: :collection
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
class SliceMergeRequestDiffCommitMigrations < ActiveRecord::Migration[6.1]
|
||||
include Gitlab::Database::MigrationHelpers
|
||||
|
||||
disable_ddl_transaction!
|
||||
|
||||
BATCH_SIZE = 5_000
|
||||
MIGRATION_CLASS = 'MigrateMergeRequestDiffCommitUsers'
|
||||
STEAL_MIGRATION_CLASS = 'StealMigrateMergeRequestDiffCommitUsers'
|
||||
|
@ -15,31 +17,33 @@ class SliceMergeRequestDiffCommitMigrations < ActiveRecord::Migration[6.1]
|
|||
|
||||
return if old_jobs.empty?
|
||||
|
||||
# This ensures we stop processing the old ranges, as the background
|
||||
# migrations skip already processed jobs.
|
||||
Gitlab::Database::BackgroundMigrationJob
|
||||
.for_migration_class(MIGRATION_CLASS)
|
||||
.pending
|
||||
.update_all(status: :succeeded)
|
||||
transaction do
|
||||
# This ensures we stop processing the old ranges, as the background
|
||||
# migrations skip already processed jobs.
|
||||
Gitlab::Database::BackgroundMigrationJob
|
||||
.for_migration_class(MIGRATION_CLASS)
|
||||
.pending
|
||||
.update_all(status: :succeeded)
|
||||
|
||||
rows = []
|
||||
rows = []
|
||||
|
||||
old_jobs.each do |job|
|
||||
min, max = job.arguments
|
||||
old_jobs.each do |job|
|
||||
min, max = job.arguments
|
||||
|
||||
while min < max
|
||||
rows << {
|
||||
class_name: MIGRATION_CLASS,
|
||||
arguments: [min, min + BATCH_SIZE],
|
||||
created_at: Time.now.utc,
|
||||
updated_at: Time.now.utc
|
||||
}
|
||||
while min < max
|
||||
rows << {
|
||||
class_name: MIGRATION_CLASS,
|
||||
arguments: [min, min + BATCH_SIZE],
|
||||
created_at: Time.now.utc,
|
||||
updated_at: Time.now.utc
|
||||
}
|
||||
|
||||
min += BATCH_SIZE
|
||||
min += BATCH_SIZE
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Gitlab::Database::BackgroundMigrationJob.insert_all!(rows)
|
||||
Gitlab::Database::BackgroundMigrationJob.insert_all!(rows)
|
||||
end
|
||||
|
||||
job = Gitlab::Database::BackgroundMigrationJob
|
||||
.for_migration_class(MIGRATION_CLASS)
|
||||
|
|
|
@ -33,7 +33,6 @@ from where content is sourced, the `gitlab-docs` project, and the published outp
|
|||
D --> E
|
||||
E -- Build pipeline --> F
|
||||
F[docs.gitlab.com]
|
||||
G[/ce/]
|
||||
H[/ee/]
|
||||
I[/runner/]
|
||||
J[/omnibus/]
|
||||
|
@ -42,7 +41,6 @@ from where content is sourced, the `gitlab-docs` project, and the published outp
|
|||
F --> I
|
||||
F --> J
|
||||
F --> K
|
||||
H -- symlink --> G
|
||||
```
|
||||
|
||||
GitLab docs content isn't kept in the `gitlab-docs` repository.
|
||||
|
@ -54,15 +52,6 @@ product, and all together are pulled to generate the docs website:
|
|||
- [GitLab Runner](https://gitlab.com/gitlab-org/gitlab-runner/-/tree/main/docs)
|
||||
- [GitLab Chart](https://gitlab.com/charts/gitlab/tree/master/doc)
|
||||
|
||||
NOTE:
|
||||
In September 2019, we [moved towards a single codebase](https://gitlab.com/gitlab-org/gitlab/-/issues/2952),
|
||||
as such the docs for CE and EE are now identical. For historical reasons and
|
||||
in order not to break any existing links throughout the internet, we still
|
||||
maintain the CE docs (`https://docs.gitlab.com/ce/`), although it is hidden
|
||||
from the website, and is now a symlink to the EE docs. When
|
||||
[Support wildcard redirects](https://gitlab.com/gitlab-org/gitlab-pages/-/issues/500) is resolved,
|
||||
we can remove this completely.
|
||||
|
||||
## Assets
|
||||
|
||||
To provide an optimized site structure, design, and a search-engine friendly
|
||||
|
|
|
@ -60,6 +60,14 @@ After a namespace is added:
|
|||
|
||||
Support for syncing past branch and commit data is tracked [in this issue](https://gitlab.com/gitlab-org/gitlab/-/issues/263240).
|
||||
|
||||
## Update the GitLab.com for Jira Cloud app
|
||||
|
||||
Most updates to the app are fully automated and don't require any user interaction. See the
|
||||
[Atlassian Marketplace documentation](https://developer.atlassian.com/platform/marketplace/upgrading-and-versioning-cloud-apps/)
|
||||
for details.
|
||||
|
||||
If the app requires additional permissions, [the update must first be manually approved in Jira](https://developer.atlassian.com/platform/marketplace/upgrading-and-versioning-cloud-apps/#changes-that-require-manual-customer-approval).
|
||||
|
||||
## Install the GitLab.com for Jira Cloud app for self-managed instances **(FREE SELF)**
|
||||
|
||||
If your GitLab instance is self-managed, you must follow some
|
||||
|
@ -103,7 +111,7 @@ The **GitLab.com for Jira Cloud** app now displays under **Manage apps**. You ca
|
|||
click **Get started** to open the configuration page rendered from your GitLab instance.
|
||||
|
||||
NOTE:
|
||||
If you make changes to the application descriptor, you must uninstall, then reinstall, the
|
||||
If a GitLab update makes changes to the application descriptor, you must uninstall, then reinstall, the
|
||||
application.
|
||||
|
||||
### Create a Marketplace listing **(FREE SELF)**
|
||||
|
@ -127,7 +135,8 @@ Review the
|
|||
for details.
|
||||
|
||||
NOTE:
|
||||
DVCS means distributed version control system.
|
||||
Using this method, [updates are automated](#update-the-gitlabcom-for-jira-cloud-app)
|
||||
the same way as when using our GitLab.com Marketplace listing.
|
||||
|
||||
## Troubleshoot GitLab.com for Jira Cloud app
|
||||
|
||||
|
|
|
@ -356,10 +356,88 @@ the user gets the highest access level from the groups. For example, if one grou
|
|||
is linked as `Guest` and another `Maintainer`, a user in both groups gets `Maintainer`
|
||||
access.
|
||||
|
||||
Users who are not members of any mapped SAML groups are removed from the GitLab group.
|
||||
### Automatic member removal
|
||||
|
||||
You can prevent accidental member removal. For example, if you have a SAML group link for `Owner` level access
|
||||
in a top-level group, you should also set up a group link for all other members.
|
||||
After a group sync, users who are not members of a mapped SAML group are removed from
|
||||
the GitLab group.
|
||||
|
||||
For example, in the following diagram:
|
||||
|
||||
- Alex Garcia signs into GitLab and is removed from GitLab Group C because they don't belong
|
||||
to SAML Group C.
|
||||
- Sidney Jones belongs to SAML Group C, but is not added to GitLab Group C because they have
|
||||
not yet signed in.
|
||||
|
||||
```mermaid
|
||||
graph TB
|
||||
subgraph SAML users
|
||||
SAMLUserA[Sidney Jones]
|
||||
SAMLUserB[Zhang Wei]
|
||||
SAMLUserC[Alex Garcia]
|
||||
SAMLUserD[Charlie Smith]
|
||||
end
|
||||
|
||||
subgraph SAML groups
|
||||
SAMLGroupA["Group A"] --> SAMLGroupB["Group B"]
|
||||
SAMLGroupA --> SAMLGroupC["Group C"]
|
||||
SAMLGroupA --> SAMLGroupD["Group D"]
|
||||
end
|
||||
|
||||
SAMLGroupB --> |Member|SAMLUserA
|
||||
SAMLGroupB --> |Member|SAMLUserB
|
||||
|
||||
SAMLGroupC --> |Member|SAMLUserA
|
||||
SAMLGroupC --> |Member|SAMLUserB
|
||||
|
||||
SAMLGroupD --> |Member|SAMLUserD
|
||||
SAMLGroupD --> |Member|SAMLUserC
|
||||
```
|
||||
|
||||
```mermaid
|
||||
graph TB
|
||||
subgraph GitLab users
|
||||
GitLabUserA[Sidney Jones]
|
||||
GitLabUserB[Zhang Wei]
|
||||
GitLabUserC[Alex Garcia]
|
||||
GitLabUserD[Charlie Smith]
|
||||
end
|
||||
|
||||
subgraph GitLab groups
|
||||
GitLabGroupA["Group A (SAML configured)"] --> GitLabGroupB["Group B (SAML Group Link not configured)"]
|
||||
GitLabGroupA --> GitLabGroupC["Group C (SAML Group Link configured)"]
|
||||
GitLabGroupA --> GitLabGroupD["Group D (SAML Group Link configured)"]
|
||||
end
|
||||
|
||||
GitLabGroupB --> |Member|GitLabUserA
|
||||
|
||||
GitLabGroupC --> |Member|GitLabUserB
|
||||
GitLabGroupC --> |Member|GitLabUserC
|
||||
|
||||
GitLabGroupD --> |Member|GitLabUserC
|
||||
GitLabGroupD --> |Member|GitLabUserD
|
||||
```
|
||||
|
||||
```mermaid
|
||||
graph TB
|
||||
subgraph GitLab users
|
||||
GitLabUserA[Sidney Jones]
|
||||
GitLabUserB[Zhang Wei]
|
||||
GitLabUserC[Alex Garcia]
|
||||
GitLabUserD[Charlie Smith]
|
||||
end
|
||||
|
||||
subgraph GitLab groups after Alex Garcia signs in
|
||||
GitLabGroupA[Group A]
|
||||
GitLabGroupA["Group A (SAML configured)"] --> GitLabGroupB["Group B (SAML Group Link not configured)"]
|
||||
GitLabGroupA --> GitLabGroupC["Group C (SAML Group Link configured)"]
|
||||
GitLabGroupA --> GitLabGroupD["Group D (SAML Group Link configured)"]
|
||||
end
|
||||
|
||||
GitLabGroupB --> |Member|GitLabUserA
|
||||
GitLabGroupC --> |Member|GitLabUserB
|
||||
GitLabGroupD --> |Member|GitLabUserC
|
||||
GitLabGroupD --> |Member|GitLabUserD
|
||||
```
|
||||
|
||||
## Passwords for users created via SAML SSO for Groups
|
||||
|
||||
|
|
|
@ -66,9 +66,8 @@ You can use [cluster certificates](add_existing_cluster.md) to connect
|
|||
clusters in all levels (projects, group, instance). However, for
|
||||
[security implications](#security-implications), this method is no longer recommended.
|
||||
|
||||
### Methods to create new clusters
|
||||
|
||||
To create new clusters, we **recommend** using [Infrastructure as Code](../../infrastructure/index.md).
|
||||
To create new clusters, we **recommend** using
|
||||
[Infrastructure as Code](../../infrastructure/iac/index.md#create-a-new-cluster-through-iac).
|
||||
|
||||
### Cluster levels
|
||||
|
||||
|
|
|
@ -27,6 +27,14 @@ module API
|
|||
|
||||
expose(*::ApplicationSettingsHelper.external_authorization_service_attributes)
|
||||
|
||||
# Also expose these columns under their new attribute names.
|
||||
#
|
||||
# TODO: Once we rename the columns, we have to swap this around and keep supporting the old names until v5.
|
||||
# https://gitlab.com/gitlab-org/gitlab/-/issues/340031
|
||||
expose :throttle_unauthenticated_enabled, as: :throttle_unauthenticated_web_enabled
|
||||
expose :throttle_unauthenticated_period_in_seconds, as: :throttle_unauthenticated_web_period_in_seconds
|
||||
expose :throttle_unauthenticated_requests_per_period, as: :throttle_unauthenticated_web_requests_per_period
|
||||
|
||||
# support legacy names, can be removed in v5
|
||||
expose :password_authentication_enabled_for_web, as: :password_authentication_enabled
|
||||
expose :password_authentication_enabled_for_web, as: :signin_enabled
|
||||
|
|
|
@ -10,10 +10,18 @@ module API
|
|||
end
|
||||
|
||||
def self.optional_attributes
|
||||
[*::ApplicationSettingsHelper.visible_attributes,
|
||||
*::ApplicationSettingsHelper.external_authorization_service_attributes,
|
||||
*::ApplicationSettingsHelper.deprecated_attributes,
|
||||
:performance_bar_allowed_group_id].freeze
|
||||
[
|
||||
*::ApplicationSettingsHelper.visible_attributes,
|
||||
*::ApplicationSettingsHelper.external_authorization_service_attributes,
|
||||
*::ApplicationSettingsHelper.deprecated_attributes,
|
||||
:performance_bar_allowed_group_id,
|
||||
# TODO: Once we rename these columns, we can remove them here and add the old
|
||||
# names to `ApplicationSettingsHelper.deprecated_attributes` instead.
|
||||
# https://gitlab.com/gitlab-org/gitlab/-/issues/340031
|
||||
:throttle_unauthenticated_web_enabled,
|
||||
:throttle_unauthenticated_web_period_in_seconds,
|
||||
:throttle_unauthenticated_web_requests_per_period
|
||||
].freeze
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -225,6 +225,16 @@ module API
|
|||
attrs[:asset_proxy_allowlist] = attrs.delete(:asset_proxy_whitelist)
|
||||
end
|
||||
|
||||
# Also accept these attributes under their new names.
|
||||
#
|
||||
# TODO: Once we rename the columns, we have to swap this around and keep supporting the old names until v5.
|
||||
# https://gitlab.com/gitlab-org/gitlab/-/issues/340031
|
||||
%w[enabled period_in_seconds requests_per_period].each do |suffix|
|
||||
old_name = :"throttle_unauthenticated_#{suffix}"
|
||||
new_name = :"throttle_unauthenticated_web_#{suffix}"
|
||||
attrs[old_name] = attrs.delete(new_name) if attrs.has_key?(new_name)
|
||||
end
|
||||
|
||||
# since 13.0 it's not possible to disable hashed storage - support can be removed in 14.0
|
||||
attrs.delete(:hashed_storage_enabled) if attrs.has_key?(:hashed_storage_enabled)
|
||||
|
||||
|
|
|
@ -55,11 +55,14 @@ module Gitlab
|
|||
schema_creation = ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaCreation.new(ApplicationRecord.connection)
|
||||
definition = schema_creation.accept(create_index)
|
||||
|
||||
async_index = PostgresAsyncIndex.safe_find_or_create_by!(name: index_name) do |rec|
|
||||
async_index = PostgresAsyncIndex.find_or_create_by!(name: index_name) do |rec|
|
||||
rec.table_name = table_name
|
||||
rec.definition = definition
|
||||
end
|
||||
|
||||
async_index.definition = definition
|
||||
async_index.save! # No-op if definition is not changed
|
||||
|
||||
Gitlab::AppLogger.info(
|
||||
message: 'Prepared index for async creation',
|
||||
table_name: async_index.table_name,
|
||||
|
|
|
@ -897,6 +897,9 @@ msgstr ""
|
|||
msgid "%{state} epics"
|
||||
msgstr ""
|
||||
|
||||
msgid "%{strongOpen}Warning:%{strongClose} SAML group links can cause GitLab to automatically remove members from groups."
|
||||
msgstr ""
|
||||
|
||||
msgid "%{strongStart}Tip:%{strongEnd} You can also checkout merge requests locally by %{linkStart}following these guidelines%{linkEnd}"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1200,6 +1203,9 @@ msgstr ""
|
|||
msgid "."
|
||||
msgstr ""
|
||||
|
||||
msgid "/"
|
||||
msgstr ""
|
||||
|
||||
msgid "0 bytes"
|
||||
msgstr ""
|
||||
|
||||
|
@ -9525,6 +9531,9 @@ msgstr ""
|
|||
msgid "Create new..."
|
||||
msgstr ""
|
||||
|
||||
msgid "Create or import your first project"
|
||||
msgstr ""
|
||||
|
||||
msgid "Create project"
|
||||
msgstr ""
|
||||
|
||||
|
@ -16114,6 +16123,9 @@ msgstr ""
|
|||
msgid "GroupSAML|To be able to prohibit outer forks, you first need to enforce dedicate group managed accounts."
|
||||
msgstr ""
|
||||
|
||||
msgid "GroupSAML|Use SAML group links to manage group membership using SAML."
|
||||
msgstr ""
|
||||
|
||||
msgid "GroupSAML|Valid SAML Response"
|
||||
msgstr ""
|
||||
|
||||
|
@ -26615,9 +26627,15 @@ msgstr ""
|
|||
msgid "Projects are graded based on the highest severity vulnerability present"
|
||||
msgstr ""
|
||||
|
||||
msgid "Projects are organized into groups"
|
||||
msgstr ""
|
||||
|
||||
msgid "Projects contributed to"
|
||||
msgstr ""
|
||||
|
||||
msgid "Projects help you organize your work. They contain your file repository, issues, merge requests, and so much more."
|
||||
msgstr ""
|
||||
|
||||
msgid "Projects shared with %{group_name}"
|
||||
msgstr ""
|
||||
|
||||
|
@ -38183,6 +38201,9 @@ msgstr ""
|
|||
msgid "You can also use project access tokens with Git to authenticate over HTTP(S). %{link_start}Learn more.%{link_end}"
|
||||
msgstr ""
|
||||
|
||||
msgid "You can always change your URL later"
|
||||
msgstr ""
|
||||
|
||||
msgid "You can always edit this later"
|
||||
msgstr ""
|
||||
|
||||
|
@ -38882,6 +38903,9 @@ msgstr ""
|
|||
msgid "Your project limit is %{limit} projects! Please contact your administrator to increase it"
|
||||
msgstr ""
|
||||
|
||||
msgid "Your project will be created at:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Your projects"
|
||||
msgstr ""
|
||||
|
||||
|
@ -40660,3 +40684,9 @@ msgstr ""
|
|||
|
||||
msgid "your settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "{group}"
|
||||
msgstr ""
|
||||
|
||||
msgid "{project}"
|
||||
msgstr ""
|
||||
|
|
|
@ -201,7 +201,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@babel/plugin-transform-modules-commonjs": "^7.10.1",
|
||||
"@gitlab/eslint-plugin": "9.2.0",
|
||||
"@gitlab/eslint-plugin": "9.3.0",
|
||||
"@gitlab/stylelint-config": "2.3.0",
|
||||
"@testing-library/dom": "^7.16.2",
|
||||
"@vue/test-utils": "1.2.0",
|
||||
|
|
|
@ -159,7 +159,7 @@ function rspec_paralellized_job() {
|
|||
|
||||
local rspec_args="-Ispec -rspec_helper --color --format documentation --format RspecJunitFormatter --out junit_rspec.xml ${rspec_opts}"
|
||||
|
||||
if [[ -n $RSPEC_TESTS_MAPPING_ENABLED ]]; then
|
||||
if [[ -n $MINIMAL_RSPEC_ENABLED ]]; then
|
||||
tooling/bin/parallel_rspec --rspec_args "${rspec_args}" --filter "tmp/matching_tests.txt"
|
||||
else
|
||||
tooling/bin/parallel_rspec --rspec_args "${rspec_args}"
|
||||
|
|
|
@ -6,7 +6,7 @@ RSpec.describe Projects::Analytics::CycleAnalytics::SummaryController do
|
|||
let_it_be(:user) { create(:user) }
|
||||
let_it_be(:project) { create(:project) }
|
||||
|
||||
let(:params) { { namespace_id: project.namespace.to_param, project_id: project.to_param, created_after: '2010-01-01', created_before: '2010-01-02' } }
|
||||
let(:params) { { namespace_id: project.namespace.to_param, project_id: project.to_param, created_after: '2010-01-01', created_before: '2010-02-01' } }
|
||||
|
||||
before do
|
||||
sign_in(user)
|
||||
|
@ -42,5 +42,39 @@ RSpec.describe Projects::Analytics::CycleAnalytics::SummaryController do
|
|||
expect(response).to have_gitlab_http_status(:not_found)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when filters are applied' do
|
||||
let_it_be(:author) { create(:user) }
|
||||
let_it_be(:milestone) { create(:milestone, title: 'milestone 1', project: project) }
|
||||
let_it_be(:issue_with_author) { create(:issue, project: project, author: author, created_at: Date.new(2010, 1, 15)) }
|
||||
let_it_be(:issue_with_other_author) { create(:issue, project: project, author: user, created_at: Date.new(2010, 1, 15)) }
|
||||
let_it_be(:issue_with_milestone) { create(:issue, project: project, milestone: milestone, created_at: Date.new(2010, 1, 15)) }
|
||||
|
||||
before do
|
||||
project.add_reporter(user)
|
||||
end
|
||||
|
||||
it 'filters by author username' do
|
||||
params[:author_username] = author.username
|
||||
|
||||
subject
|
||||
|
||||
expect(response).to be_successful
|
||||
|
||||
issue_count = json_response.first
|
||||
expect(issue_count['value']).to eq('1')
|
||||
end
|
||||
|
||||
it 'filters by milestone title' do
|
||||
params[:milestone_title] = milestone.title
|
||||
|
||||
subject
|
||||
|
||||
expect(response).to be_successful
|
||||
|
||||
issue_count = json_response.first
|
||||
expect(issue_count['value']).to eq('1')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
require 'spec_helper'
|
||||
|
||||
RSpec.describe 'Merge request > User sees empty state' do
|
||||
include ProjectForksHelper
|
||||
|
||||
let(:project) { create(:project, :public, :repository) }
|
||||
let(:user) { project.creator }
|
||||
|
||||
|
@ -37,4 +39,23 @@ RSpec.describe 'Merge request > User sees empty state' do
|
|||
expect(page).to have_content('To widen your search, change or remove filters above')
|
||||
end
|
||||
end
|
||||
|
||||
context 'as member of a fork' do
|
||||
let(:fork_user) { create(:user) }
|
||||
let(:forked_project) { fork_project(project, fork_user, namespace: fork_user.namespace, repository: true) }
|
||||
|
||||
before do
|
||||
forked_project.add_maintainer(fork_user)
|
||||
sign_in(fork_user)
|
||||
end
|
||||
|
||||
it 'shows an empty state and a "New merge request" button' do
|
||||
visit project_merge_requests_path(project, search: 'foo')
|
||||
|
||||
expect(page).to have_selector('.empty-state')
|
||||
within('.empty-state') do
|
||||
expect(page).to have_link 'New merge request', href: project_new_merge_request_path(forked_project)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -630,6 +630,16 @@ describe('Design management index page', () => {
|
|||
expect(mockMutate).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('does not upload designs if designs wrapper is destroyed', () => {
|
||||
findDesignsWrapper().trigger('mouseenter');
|
||||
|
||||
wrapper.destroy();
|
||||
|
||||
document.dispatchEvent(event);
|
||||
|
||||
expect(mockMutate).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
describe('when designs wrapper is hovered', () => {
|
||||
let realDateNow;
|
||||
const today = () => new Date('2020-12-25');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Learn GitLab Design A renders correctly 1`] = `
|
||||
exports[`Learn GitLab renders correctly 1`] = `
|
||||
<div>
|
||||
<div
|
||||
class="row"
|
||||
|
@ -136,7 +136,7 @@ exports[`Learn GitLab Design A renders correctly 1`] = `
|
|||
class="gl-link"
|
||||
data-track-action="click_link"
|
||||
data-track-label="Set up CI/CD"
|
||||
data-track-property="Growth::Conversion::Experiment::LearnGitLabA"
|
||||
data-track-property="Growth::Conversion::Experiment::LearnGitLab"
|
||||
href="http://example.com/"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
|
@ -157,7 +157,7 @@ exports[`Learn GitLab Design A renders correctly 1`] = `
|
|||
class="gl-link"
|
||||
data-track-action="click_link"
|
||||
data-track-label="Start a free Ultimate trial"
|
||||
data-track-property="Growth::Conversion::Experiment::LearnGitLabA"
|
||||
data-track-property="Growth::Conversion::Experiment::LearnGitLab"
|
||||
href="http://example.com/"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
|
@ -178,7 +178,7 @@ exports[`Learn GitLab Design A renders correctly 1`] = `
|
|||
class="gl-link"
|
||||
data-track-action="click_link"
|
||||
data-track-label="Add code owners"
|
||||
data-track-property="Growth::Conversion::Experiment::LearnGitLabA"
|
||||
data-track-property="Growth::Conversion::Experiment::LearnGitLab"
|
||||
href="http://example.com/"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
|
@ -206,7 +206,7 @@ exports[`Learn GitLab Design A renders correctly 1`] = `
|
|||
class="gl-link"
|
||||
data-track-action="click_link"
|
||||
data-track-label="Add merge request approval"
|
||||
data-track-property="Growth::Conversion::Experiment::LearnGitLabA"
|
||||
data-track-property="Growth::Conversion::Experiment::LearnGitLab"
|
||||
href="http://example.com/"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
|
@ -270,7 +270,7 @@ exports[`Learn GitLab Design A renders correctly 1`] = `
|
|||
class="gl-link"
|
||||
data-track-action="click_link"
|
||||
data-track-label="Create an issue"
|
||||
data-track-property="Growth::Conversion::Experiment::LearnGitLabA"
|
||||
data-track-property="Growth::Conversion::Experiment::LearnGitLab"
|
||||
href="http://example.com/"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
|
@ -291,7 +291,7 @@ exports[`Learn GitLab Design A renders correctly 1`] = `
|
|||
class="gl-link"
|
||||
data-track-action="click_link"
|
||||
data-track-label="Submit a merge request"
|
||||
data-track-property="Growth::Conversion::Experiment::LearnGitLabA"
|
||||
data-track-property="Growth::Conversion::Experiment::LearnGitLab"
|
||||
href="http://example.com/"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
|
@ -348,7 +348,7 @@ exports[`Learn GitLab Design A renders correctly 1`] = `
|
|||
class="gl-link"
|
||||
data-track-action="click_link"
|
||||
data-track-label="Run a Security scan using CI/CD"
|
||||
data-track-property="Growth::Conversion::Experiment::LearnGitLabA"
|
||||
data-track-property="Growth::Conversion::Experiment::LearnGitLab"
|
||||
href="http://example.com/"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
|
@ -1,13 +1,13 @@
|
|||
import { GlProgressBar } from '@gitlab/ui';
|
||||
import { mount } from '@vue/test-utils';
|
||||
import LearnGitlabA from '~/pages/projects/learn_gitlab/components/learn_gitlab_a.vue';
|
||||
import LearnGitlab from '~/pages/projects/learn_gitlab/components/learn_gitlab.vue';
|
||||
import { testActions, testSections } from './mock_data';
|
||||
|
||||
describe('Learn GitLab Design A', () => {
|
||||
describe('Learn GitLab', () => {
|
||||
let wrapper;
|
||||
|
||||
const createWrapper = () => {
|
||||
wrapper = mount(LearnGitlabA, { propsData: { actions: testActions, sections: testSections } });
|
||||
wrapper = mount(LearnGitlab, { propsData: { actions: testActions, sections: testSections } });
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
|
@ -150,6 +150,23 @@ RSpec.describe Gitlab::Database::AsyncIndexes::MigrationHelpers do
|
|||
migration.prepare_async_index(table_name, 'id')
|
||||
end.not_to change { index_model.where(name: index_name).count }
|
||||
end
|
||||
|
||||
it 'updates definition if changed' do
|
||||
index = create(:postgres_async_index, table_name: table_name, name: index_name, definition: '...')
|
||||
|
||||
expect do
|
||||
migration.prepare_async_index(table_name, 'id', name: index_name)
|
||||
end.to change { index.reload.definition }
|
||||
end
|
||||
|
||||
it 'does not update definition if not changed' do
|
||||
definition = "CREATE INDEX CONCURRENTLY \"index_#{table_name}_on_id\" ON \"#{table_name}\" (\"id\")"
|
||||
index = create(:postgres_async_index, table_name: table_name, name: index_name, definition: definition)
|
||||
|
||||
expect do
|
||||
migration.prepare_async_index(table_name, 'id', name: index_name)
|
||||
end.not_to change { index.reload.updated_at }
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the async index table does not exist' do
|
||||
|
|
|
@ -345,38 +345,12 @@ RSpec.describe API::CommitStatuses do
|
|||
expect(json_response['status']).to eq('success')
|
||||
end
|
||||
|
||||
context 'feature flags' do
|
||||
using RSpec::Parameterized::TableSyntax
|
||||
it 'retries the commit status', :sidekiq_might_not_need_inline do
|
||||
post_request
|
||||
|
||||
where(:ci_fix_commit_status_retried, :ci_remove_update_retried_from_process_pipeline, :previous_statuses_retried) do
|
||||
true | true | true
|
||||
true | false | true
|
||||
false | true | false
|
||||
false | false | true
|
||||
end
|
||||
|
||||
with_them do
|
||||
before do
|
||||
stub_feature_flags(
|
||||
ci_fix_commit_status_retried: ci_fix_commit_status_retried,
|
||||
ci_remove_update_retried_from_process_pipeline: ci_remove_update_retried_from_process_pipeline
|
||||
)
|
||||
end
|
||||
|
||||
it 'retries a commit status', :sidekiq_might_not_need_inline do
|
||||
post_request
|
||||
|
||||
expect(CommitStatus.count).to eq 2
|
||||
|
||||
if previous_statuses_retried
|
||||
expect(CommitStatus.first).to be_retried
|
||||
expect(CommitStatus.last.pipeline).to be_success
|
||||
else
|
||||
expect(CommitStatus.first).not_to be_retried
|
||||
expect(CommitStatus.last.pipeline).to be_failed
|
||||
end
|
||||
end
|
||||
end
|
||||
expect(CommitStatus.count).to eq 2
|
||||
expect(CommitStatus.first).to be_retried
|
||||
expect(CommitStatus.last.pipeline).to be_success
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -222,6 +222,45 @@ RSpec.describe API::Settings, 'Settings', :do_not_mock_admin_mode_setting do
|
|||
expect(json_response['asset_proxy_allowlist']).to eq(['example.com', '*.example.com', 'localhost'])
|
||||
end
|
||||
|
||||
it 'supports the deprecated `throttle_unauthenticated_*` attributes' do
|
||||
put api('/application/settings', admin), params: {
|
||||
throttle_unauthenticated_enabled: true,
|
||||
throttle_unauthenticated_period_in_seconds: 123,
|
||||
throttle_unauthenticated_requests_per_period: 456
|
||||
}
|
||||
|
||||
expect(response).to have_gitlab_http_status(:ok)
|
||||
expect(json_response).to include(
|
||||
'throttle_unauthenticated_enabled' => true,
|
||||
'throttle_unauthenticated_period_in_seconds' => 123,
|
||||
'throttle_unauthenticated_requests_per_period' => 456,
|
||||
'throttle_unauthenticated_web_enabled' => true,
|
||||
'throttle_unauthenticated_web_period_in_seconds' => 123,
|
||||
'throttle_unauthenticated_web_requests_per_period' => 456
|
||||
)
|
||||
end
|
||||
|
||||
it 'prefers the new `throttle_unauthenticated_web_*` attributes' do
|
||||
put api('/application/settings', admin), params: {
|
||||
throttle_unauthenticated_enabled: false,
|
||||
throttle_unauthenticated_period_in_seconds: 0,
|
||||
throttle_unauthenticated_requests_per_period: 0,
|
||||
throttle_unauthenticated_web_enabled: true,
|
||||
throttle_unauthenticated_web_period_in_seconds: 123,
|
||||
throttle_unauthenticated_web_requests_per_period: 456
|
||||
}
|
||||
|
||||
expect(response).to have_gitlab_http_status(:ok)
|
||||
expect(json_response).to include(
|
||||
'throttle_unauthenticated_enabled' => true,
|
||||
'throttle_unauthenticated_period_in_seconds' => 123,
|
||||
'throttle_unauthenticated_requests_per_period' => 456,
|
||||
'throttle_unauthenticated_web_enabled' => true,
|
||||
'throttle_unauthenticated_web_period_in_seconds' => 123,
|
||||
'throttle_unauthenticated_web_requests_per_period' => 456
|
||||
)
|
||||
end
|
||||
|
||||
it 'disables ability to switch to legacy storage' do
|
||||
put api("/application/settings", admin),
|
||||
params: { hashed_storage_enabled: false }
|
||||
|
|
|
@ -336,6 +336,28 @@ RSpec.describe ApplicationSettings::UpdateService do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when general rate limits are passed' do
|
||||
let(:params) do
|
||||
{
|
||||
throttle_authenticated_api_enabled: true,
|
||||
throttle_authenticated_api_period_in_seconds: 10,
|
||||
throttle_authenticated_api_requests_per_period: 20,
|
||||
throttle_authenticated_web_enabled: true,
|
||||
throttle_authenticated_web_period_in_seconds: 30,
|
||||
throttle_authenticated_web_requests_per_period: 40,
|
||||
throttle_unauthenticated_enabled: true,
|
||||
throttle_unauthenticated_period_in_seconds: 50,
|
||||
throttle_unauthenticated_requests_per_period: 60
|
||||
}
|
||||
end
|
||||
|
||||
it 'updates general throttle settings' do
|
||||
subject.execute
|
||||
|
||||
expect(application_settings.reload).to have_attributes(params)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when package registry rate limits are passed' do
|
||||
let(:params) do
|
||||
{
|
||||
|
|
|
@ -59,18 +59,6 @@ RSpec.describe Ci::Pipelines::AddJobService do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when the FF ci_fix_commit_status_retried is disabled' do
|
||||
before do
|
||||
stub_feature_flags(ci_fix_commit_status_retried: false)
|
||||
end
|
||||
|
||||
it 'does not call update_older_statuses_retried!' do
|
||||
expect(job).not_to receive(:update_older_statuses_retried!)
|
||||
|
||||
execute
|
||||
end
|
||||
end
|
||||
|
||||
context 'exclusive lock' do
|
||||
let(:lock_uuid) { 'test' }
|
||||
let(:lock_key) { "ci:pipelines:#{pipeline.id}:add-job" }
|
||||
|
|
|
@ -346,6 +346,12 @@ RSpec.describe Projects::CreateService, '#execute' do
|
|||
expect(imported_project.import_data.data).to eq(import_data[:data])
|
||||
expect(imported_project.import_url).to eq('http://import-url')
|
||||
end
|
||||
|
||||
it 'tracks for the combined_registration experiment', :experiment do
|
||||
expect(experiment(:combined_registration)).to track(:import_project).on_next_instance
|
||||
|
||||
imported_project
|
||||
end
|
||||
end
|
||||
|
||||
context 'builds_enabled global setting' do
|
||||
|
|
|
@ -295,18 +295,6 @@ RSpec.describe Projects::UpdatePagesService do
|
|||
|
||||
expect(older_deploy_job.reload).to be_retried
|
||||
end
|
||||
|
||||
context 'when FF ci_fix_commit_status_retried is disabled' do
|
||||
before do
|
||||
stub_feature_flags(ci_fix_commit_status_retried: false)
|
||||
end
|
||||
|
||||
it 'does not mark older pages:deploy jobs retried' do
|
||||
expect(execute).to eq(:success)
|
||||
|
||||
expect(older_deploy_job.reload).not_to be_retried
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -75,7 +75,6 @@
|
|||
- "./ee/spec/requests/api/vulnerability_findings_spec.rb"
|
||||
- "./ee/spec/serializers/dashboard_environment_entity_spec.rb"
|
||||
- "./ee/spec/serializers/dashboard_environments_serializer_spec.rb"
|
||||
- "./ee/spec/serializers/ee/build_details_entity_spec.rb"
|
||||
- "./ee/spec/serializers/merge_request_poll_widget_entity_spec.rb"
|
||||
- "./ee/spec/services/auto_merge/add_to_merge_train_when_pipeline_succeeds_service_spec.rb"
|
||||
- "./ee/spec/services/ci/create_pipeline_service/needs_spec.rb"
|
||||
|
@ -308,7 +307,6 @@
|
|||
- "./spec/requests/api/merge_requests_spec.rb"
|
||||
- "./spec/requests/api/package_files_spec.rb"
|
||||
- "./spec/requests/projects/cycle_analytics_events_spec.rb"
|
||||
- "./spec/serializers/build_details_entity_spec.rb"
|
||||
- "./spec/serializers/ci/pipeline_entity_spec.rb"
|
||||
- "./spec/serializers/merge_request_serializer_spec.rb"
|
||||
- "./spec/serializers/pipeline_details_entity_spec.rb"
|
||||
|
@ -331,7 +329,6 @@
|
|||
- "./spec/services/ci/play_build_service_spec.rb"
|
||||
- "./spec/services/ci/register_job_service_spec.rb"
|
||||
- "./spec/services/ci/retry_pipeline_service_spec.rb"
|
||||
- "./spec/services/ci/update_build_queue_service_spec.rb"
|
||||
- "./spec/services/clusters/applications/prometheus_config_service_spec.rb"
|
||||
- "./spec/services/deployments/older_deployments_drop_service_spec.rb"
|
||||
- "./spec/services/environments/auto_stop_service_spec.rb"
|
||||
|
|
|
@ -16,7 +16,7 @@ module LiveDebugger
|
|||
puts "The current user credentials are: #{@current_user.username} / #{@current_user.password}" if @current_user
|
||||
puts "Press any key to resume the execution of the example!!"
|
||||
|
||||
`open #{current_url}` if is_headless_disabled?
|
||||
`open #{current_url}` unless is_headless_disabled?
|
||||
|
||||
loop until $stdin.getch
|
||||
|
||||
|
|
|
@ -52,7 +52,6 @@ RSpec.describe Deployments::HooksWorker do
|
|||
|
||||
it_behaves_like 'worker with data consistency',
|
||||
described_class,
|
||||
feature_flag: :load_balancing_for_deployments_hooks_worker,
|
||||
data_consistency: :delayed
|
||||
end
|
||||
end
|
||||
|
|
|
@ -22,10 +22,7 @@ changed_files = mr_changes.changes.map { |change| change['new_path'] }
|
|||
|
||||
tff = TestFileFinder::FileFinder.new(paths: changed_files).tap do |file_finder|
|
||||
file_finder.use TestFileFinder::MappingStrategies::PatternMatching.load('tests.yml')
|
||||
|
||||
if ENV['RSPEC_TESTS_MAPPING_ENABLED']
|
||||
file_finder.use TestFileFinder::MappingStrategies::DirectMatching.load_json(ENV['RSPEC_TESTS_MAPPING_PATH'])
|
||||
end
|
||||
file_finder.use TestFileFinder::MappingStrategies::DirectMatching.load_json(ENV['RSPEC_TESTS_MAPPING_PATH'])
|
||||
end
|
||||
|
||||
File.write(output_file, tff.test_files.uniq.join(' '))
|
||||
|
|
|
@ -933,10 +933,10 @@
|
|||
resolved "https://registry.yarnpkg.com/@gitlab/at.js/-/at.js-1.5.7.tgz#1ee6f838cc4410a1d797770934df91d90df8179e"
|
||||
integrity sha512-c6ySRK/Ma7lxwpIVbSAF3P+xiTLrNTGTLRx4/pHK111AdFxwgUwrYF6aVZFXvmG65jHOJHoa0eQQ21RW6rm0Rg==
|
||||
|
||||
"@gitlab/eslint-plugin@9.2.0":
|
||||
version "9.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@gitlab/eslint-plugin/-/eslint-plugin-9.2.0.tgz#a281883ebe3cd06a88503c590525a191eb78a885"
|
||||
integrity sha512-iVANLTwn5S4efVUWKX5crLTUChrh3HvAnUrVvLEXTgBw/Aup4t4L5tYLs5YOh5ofw08SUEaaxvAq5ooSqSPqCA==
|
||||
"@gitlab/eslint-plugin@9.3.0":
|
||||
version "9.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@gitlab/eslint-plugin/-/eslint-plugin-9.3.0.tgz#c1765b28d5a2a29143c0a556650fb7527cd9ab0d"
|
||||
integrity sha512-c0bR9sgZuyHsC8xzYNrTl6koXBrLgBnVGG2UWwRbs8QnAF0Sf3LTPMjq0vulXZgKqPvMG++em0O5d6nN+oWvuQ==
|
||||
dependencies:
|
||||
babel-eslint "^10.0.3"
|
||||
eslint-config-airbnb-base "^14.2.1"
|
||||
|
|
Loading…
Reference in New Issue