Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
78d9d0e138
commit
afd97e44a0
|
|
@ -6,7 +6,7 @@ workflow:
|
|||
|
||||
include:
|
||||
- local: .gitlab/ci/version.yml
|
||||
- component: "gitlab.com/gitlab-org/quality/pipeline-common/allure-report@8.18.5"
|
||||
- component: "gitlab.com/gitlab-org/quality/pipeline-common/allure-report@8.19.0"
|
||||
inputs:
|
||||
job_name: "e2e-test-report"
|
||||
job_stage: "report"
|
||||
|
|
@ -16,7 +16,7 @@ include:
|
|||
gitlab_auth_token_variable_name: "PROJECT_TOKEN_FOR_CI_SCRIPTS_API_USAGE"
|
||||
allure_job_name: "${QA_RUN_TYPE}"
|
||||
- project: gitlab-org/quality/pipeline-common
|
||||
ref: 8.18.5
|
||||
ref: 8.19.0
|
||||
file:
|
||||
- /ci/base.gitlab-ci.yml
|
||||
- /ci/knapsack-report.yml
|
||||
|
|
|
|||
|
|
@ -18,4 +18,4 @@ variables:
|
|||
# Retry failed specs in separate process
|
||||
QA_RETRY_FAILED_SPECS: "true"
|
||||
# helm chart ref used by test-on-cng pipeline
|
||||
GITLAB_HELM_CHART_REF: "5cfe64ff4d0e8fde3fab778dfd3f5c8b4b66ecb5"
|
||||
GITLAB_HELM_CHART_REF: "bb4bad8015746332cd64ea928b5430737a081b2d"
|
||||
|
|
|
|||
|
|
@ -562,7 +562,7 @@
|
|||
{"name":"redis-clustering","version":"5.2.0","platform":"ruby","checksum":"685f388e0bdd81091a96cce9a46e22e727213d5fa14ebfc5111e110440e0038e"},
|
||||
{"name":"redis-namespace","version":"1.11.0","platform":"ruby","checksum":"e91a1aa2b2d888b6dea1d4ab8d39e1ae6fac3426161feb9d91dd5cca598a2239"},
|
||||
{"name":"redis-rack","version":"3.0.0","platform":"ruby","checksum":"abb50b82ae10ad4d11ca2e4901bfc2b98256cdafbbd95f80c86fc9e001478380"},
|
||||
{"name":"redis-store","version":"1.10.0","platform":"ruby","checksum":"f258894f9f7e82834308a3d86242294f0cff2c9db9ae66e5cb4c553a5ec8b09e"},
|
||||
{"name":"redis-store","version":"1.11.0","platform":"ruby","checksum":"edc4f3e239dcd1fdd9905584e6b1e623a84618e14436e6e8a07c70891008eda4"},
|
||||
{"name":"regexp_parser","version":"2.6.0","platform":"ruby","checksum":"f163ba463a45ca2f2730e0902f2475bb0eefcd536dfc2f900a86d1e5a7d7a556"},
|
||||
{"name":"regexp_property_values","version":"1.0.0","platform":"java","checksum":"5e26782b01241616855c4ee7bb8a62fce9387e484f2d3eaf04f2a0633708222e"},
|
||||
{"name":"regexp_property_values","version":"1.0.0","platform":"ruby","checksum":"162499dc0bba1e66d334273a059f207a61981cc8cc69d2ca743594e7886d080f"},
|
||||
|
|
|
|||
|
|
@ -1539,7 +1539,7 @@ GEM
|
|||
redis-rack (3.0.0)
|
||||
rack-session (>= 0.2.0)
|
||||
redis-store (>= 1.2, < 2)
|
||||
redis-store (1.10.0)
|
||||
redis-store (1.11.0)
|
||||
redis (>= 4, < 6)
|
||||
regexp_parser (2.6.0)
|
||||
regexp_property_values (1.0.0)
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ export default {
|
|||
v-if="canUpdate"
|
||||
category="tertiary"
|
||||
size="small"
|
||||
class="gl-text-gray-900! gl-ml-5 js-sidebar-dropdown-toggle edit-link"
|
||||
class="gl-ml-5 js-sidebar-dropdown-toggle edit-link"
|
||||
data-testid="edit-button"
|
||||
@click="toggle"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -198,9 +198,6 @@ export default {
|
|||
}
|
||||
return null;
|
||||
},
|
||||
resolveVariant() {
|
||||
return this.isResolved ? 'success' : 'default';
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['toggleAwardRequest', 'promoteCommentToTimelineEvent']),
|
||||
|
|
@ -289,14 +286,14 @@ export default {
|
|||
v-if="canResolve"
|
||||
ref="resolveButton"
|
||||
v-gl-tooltip
|
||||
data-testid="resolve-line-button"
|
||||
category="tertiary"
|
||||
:variant="resolveVariant"
|
||||
:class="{ 'is-disabled': !resolvable, 'is-active': isResolved }"
|
||||
class="note-action-button"
|
||||
:class="{ '!gl-text-success': isResolved }"
|
||||
:title="resolveButtonTitle"
|
||||
:aria-label="resolveButtonTitle"
|
||||
:icon="resolveIcon"
|
||||
:loading="isResolving"
|
||||
class="line-resolve-btn note-action-button"
|
||||
@click="onResolve"
|
||||
/>
|
||||
<timeline-event-button
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ export default {
|
|||
v-gl-tooltip.viewport.html
|
||||
category="tertiary"
|
||||
size="small"
|
||||
class="gl-text-gray-900! gl-ml-auto hide-collapsed -gl-mr-2 shortcut-sidebar-dropdown-toggle"
|
||||
class="gl-ml-auto hide-collapsed -gl-mr-2 shortcut-sidebar-dropdown-toggle"
|
||||
:title="editTooltipText"
|
||||
:aria-label="editAriaLabelText"
|
||||
:aria-keyshortcuts="editKeyshortcutsText"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
<script>
|
||||
import {
|
||||
GlIcon,
|
||||
GlLink,
|
||||
GlModal,
|
||||
GlButton,
|
||||
|
|
@ -30,7 +29,6 @@ export default {
|
|||
estimatedOnlyText: s__('TimeTracking|Estimated:'),
|
||||
},
|
||||
components: {
|
||||
GlIcon,
|
||||
GlLink,
|
||||
GlModal,
|
||||
GlButton,
|
||||
|
|
@ -245,24 +243,22 @@ export default {
|
|||
v-gl-modal="$options.setTimeEstimateModalId"
|
||||
v-gl-tooltip.top
|
||||
category="tertiary"
|
||||
icon="timer"
|
||||
size="small"
|
||||
data-testid="set-time-estimate-button"
|
||||
:title="timeEstimateTooltip"
|
||||
:aria-label="timeEstimateTooltip"
|
||||
>
|
||||
<gl-icon name="timer" class="gl-text-gray-900!" />
|
||||
</gl-button>
|
||||
/>
|
||||
<gl-button
|
||||
v-if="canAddTimeEntries"
|
||||
v-gl-tooltip.top
|
||||
category="tertiary"
|
||||
icon="plus"
|
||||
size="small"
|
||||
data-testid="add-time-entry-button"
|
||||
:title="__('Add time entry')"
|
||||
@click="openRegisterTimeSpentModal()"
|
||||
>
|
||||
<gl-icon name="plus" class="gl-text-gray-900!" />
|
||||
</gl-button>
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!isTimeTrackingInfoLoading" class="hide-collapsed">
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ export default {
|
|||
iconStyles() {
|
||||
return {
|
||||
size: this.displayAsCard ? 24 : 16,
|
||||
class: this.displayAsCard ? 'gl-mb-2' : 'gl-mr-3 gl-text-gray-500',
|
||||
class: this.displayAsCard ? 'gl-mb-2' : 'gl-mr-3',
|
||||
};
|
||||
},
|
||||
validMimeTypeString() {
|
||||
|
|
|
|||
|
|
@ -162,9 +162,6 @@ export default {
|
|||
}
|
||||
return null;
|
||||
},
|
||||
resolveVariant() {
|
||||
return this.isResolved ? 'success' : 'default';
|
||||
},
|
||||
resolveThreadTitle() {
|
||||
return this.isResolved
|
||||
? __('Resolved by ') + this.resolvedBy.name
|
||||
|
|
@ -240,14 +237,14 @@ export default {
|
|||
v-if="canResolve"
|
||||
ref="resolveButton"
|
||||
v-gl-tooltip.hover
|
||||
data-testid="resolve-line-button"
|
||||
category="tertiary"
|
||||
:variant="resolveVariant"
|
||||
:class="{ 'is-disabled': !resolvable, 'is-active': isResolved }"
|
||||
class="note-action-button"
|
||||
:class="{ '!gl-text-success': isResolved }"
|
||||
:title="resolveThreadTitle"
|
||||
:aria-label="resolveThreadTitle"
|
||||
:icon="resolveIcon"
|
||||
:loading="isResolving"
|
||||
class="line-resolve-btn note-action-button"
|
||||
@click="$emit('resolve')"
|
||||
/>
|
||||
<emoji-picker
|
||||
|
|
|
|||
|
|
@ -164,13 +164,12 @@ export default {
|
|||
v-gl-modal="$options.createMRModalId"
|
||||
v-gl-tooltip.top
|
||||
category="tertiary"
|
||||
icon="plus"
|
||||
size="small"
|
||||
data-testid="add-item"
|
||||
:title="__('Add branch or merge request')"
|
||||
:aria-label="__('Add branch or merge request')"
|
||||
>
|
||||
<gl-icon name="plus" class="!gl-text-gray-900" />
|
||||
</gl-button>
|
||||
/>
|
||||
</div>
|
||||
<template v-if="isRelatedDevelopmentListEmpty">
|
||||
<span v-if="!canUpdate" class="gl-text-secondary">{{ __('None') }}</span>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<script>
|
||||
import {
|
||||
GlButton,
|
||||
GlIcon,
|
||||
GlModal,
|
||||
GlModalDirective,
|
||||
GlProgressBar,
|
||||
|
|
@ -33,7 +32,6 @@ export default {
|
|||
TimeTrackingReport,
|
||||
CreateTimelogForm,
|
||||
GlButton,
|
||||
GlIcon,
|
||||
GlModal,
|
||||
GlProgressBar,
|
||||
GlSprintf,
|
||||
|
|
@ -118,12 +116,11 @@ export default {
|
|||
v-gl-modal="$options.createTimelogModalId"
|
||||
v-gl-tooltip.top
|
||||
category="tertiary"
|
||||
icon="plus"
|
||||
size="small"
|
||||
:title="__('Add time entry')"
|
||||
:aria-label="__('Add time entry')"
|
||||
>
|
||||
<gl-icon name="plus" class="gl-text-gray-900!" />
|
||||
</gl-button>
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -320,10 +320,6 @@ table {
|
|||
.discussion-actions {
|
||||
display: table;
|
||||
|
||||
svg {
|
||||
fill: $gray-500;
|
||||
}
|
||||
|
||||
.btn-group {
|
||||
display: table-cell;
|
||||
|
||||
|
|
|
|||
|
|
@ -997,57 +997,6 @@ $system-note-icon-m-left: $avatar-m-left + $icon-size-diff / $avatar-m-ratio;
|
|||
}
|
||||
}
|
||||
|
||||
.line-resolve-btn {
|
||||
position: relative;
|
||||
top: 0;
|
||||
padding: 0;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
transition: color $general-hover-transition-duration $general-hover-transition-curve;
|
||||
|
||||
&[disabled] {
|
||||
padding: 0 8px !important;
|
||||
box-shadow: none !important;
|
||||
|
||||
// stylelint-disable-next-line gitlab/no-gl-class
|
||||
.gl-button-loading-indicator {
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-disabled {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
&:not(.is-disabled) {
|
||||
&:hover,
|
||||
&:focus {
|
||||
svg {
|
||||
color: $green-600;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.is-active {
|
||||
svg {
|
||||
color: $green-500;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
svg {
|
||||
color: $green-700;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.loading {
|
||||
margin: 0;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
// Vue refactored diff discussion adjustments
|
||||
.files {
|
||||
.diff-discussions {
|
||||
|
|
|
|||
|
|
@ -22,18 +22,6 @@
|
|||
}
|
||||
|
||||
.gl-dark {
|
||||
.gl-button.gl-button,
|
||||
.gl-button.gl-button.btn-block {
|
||||
&.btn-default,
|
||||
&.btn-dashed,
|
||||
&.btn-danger,
|
||||
&.btn-confirm {
|
||||
&-tertiary {
|
||||
mix-blend-mode: screen;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.gl-datepicker-theme {
|
||||
.pika-prev,
|
||||
.pika-next {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ cookie_key = if Rails.env.development?
|
|||
end
|
||||
|
||||
::Redis::Store::Factory.prepend(Gitlab::Patch::RedisStoreFactory)
|
||||
::Redis::Store::Factory.singleton_class.prepend(Gitlab::Patch::RedisStoreFactoryClassMethods)
|
||||
|
||||
Rails.application.configure do
|
||||
config.session_store(
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class RemoveWebHookLogIndexOnWebHookIdAndResponseStatus < Gitlab::Database::Migration[2.2]
|
||||
include Gitlab::Database::PartitioningMigrationHelpers
|
||||
|
||||
milestone '17.4'
|
||||
|
||||
TABLE_NAME = :web_hook_logs
|
||||
COLUMN_NAMES = [:web_hook_id, :response_status]
|
||||
INDEX_NAME = 'web_hook_logs_on_web_hook_id_and_response_status'
|
||||
|
||||
# Reverting the index added in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/151048
|
||||
def up
|
||||
unprepare_partitioned_async_index(TABLE_NAME, COLUMN_NAMES, name: INDEX_NAME)
|
||||
end
|
||||
|
||||
def down
|
||||
prepare_partitioned_async_index(TABLE_NAME, COLUMN_NAMES, name: INDEX_NAME)
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1 @@
|
|||
b860e598cc545ea259380cb3f19f999fa478b26575ae28275574ac3c7c6ffddd
|
||||
|
|
@ -122,6 +122,28 @@ test:
|
|||
- ls -al
|
||||
```
|
||||
|
||||
#### Avoid shallow clones for development
|
||||
|
||||
Avoid shallow clones for development because they greatly increase the time it takes to push changes. Shallow clones
|
||||
work well with CI/CD jobs because the repository contents aren't changed after being checked out.
|
||||
|
||||
Instead, for local development use
|
||||
[partial clones](https://www.git-scm.com/docs/git-clone#Documentation/git-clone.txt---filterltfilter-specgt) to:
|
||||
|
||||
1. Filter out blobs:
|
||||
|
||||
```shell
|
||||
git clone --filter=blob:none
|
||||
```
|
||||
|
||||
1. Filter out trees:
|
||||
|
||||
```shell
|
||||
git clone --filter=tree:0
|
||||
```
|
||||
|
||||
For more information, see [Reduce clone size](../../../../topics/git/clone.md#reduce-clone-size).
|
||||
|
||||
### Git strategy
|
||||
|
||||
Use `git fetch` instead of `git clone` on CI/CD systems if it's possible to keep
|
||||
|
|
|
|||
|
|
@ -12,65 +12,5 @@ module Gitlab
|
|||
super
|
||||
end
|
||||
end
|
||||
|
||||
# Once https://github.com/redis-store/redis-store/pull/373 is merged
|
||||
# and released, we can drop RedisStoreFactoryClassMethods.
|
||||
if Gem::Version.new(::Redis::Store::VERSION) > Gem::Version.new("1.10.0")
|
||||
raise 'This Redis::Store patch could be removed now the version has changed'
|
||||
end
|
||||
|
||||
# rubocop:disable Layout/EndAlignment -- This is upstream code
|
||||
# rubocop:disable Layout/HashAlignment -- This is upstream code
|
||||
# rubocop:disable Style/HashSyntax -- This is upstream code
|
||||
# rubocop:disable Layout/IndentationWidth -- This is upstream code
|
||||
# rubocop:disable Layout/LineLength -- This is upstream code
|
||||
# rubocop:disable Performance/RedundantSplitRegexpArgument -- This is upstream code
|
||||
# rubocop:disable Style/IfUnlessModifier -- This is upstream code
|
||||
# rubocop:disable Style/RegexpLiteralMixedPreserve -- This is upstream code
|
||||
module RedisStoreFactoryClassMethods
|
||||
def extract_host_options_from_uri(uri)
|
||||
uri = URI.parse(uri)
|
||||
if uri.scheme == "unix"
|
||||
options = { :path => uri.path }
|
||||
else
|
||||
_, db, namespace = if uri.path
|
||||
uri.path.split(/\//)
|
||||
end
|
||||
|
||||
options = {
|
||||
:scheme => uri.scheme,
|
||||
:host => uri.hostname,
|
||||
:port => uri.port || ::Redis::Store::Factory::DEFAULT_PORT,
|
||||
:ssl => uri.scheme == 'rediss'
|
||||
}
|
||||
|
||||
options[:db] = db.to_i if db
|
||||
options[:namespace] = namespace if namespace
|
||||
end
|
||||
|
||||
if uri.user && !uri.user.empty?
|
||||
options[:username] = uri.user
|
||||
end
|
||||
|
||||
options[:password] = CGI.unescape(uri.password.to_s) if uri.password
|
||||
|
||||
if uri.query
|
||||
query = Hash[URI.decode_www_form(uri.query)]
|
||||
query.each do |(key, value)|
|
||||
options[key.to_sym] = value
|
||||
end
|
||||
end
|
||||
|
||||
options
|
||||
end
|
||||
end
|
||||
# rubocop:enable Layout/EndAlignment
|
||||
# rubocop:enable Layout/HashAlignment
|
||||
# rubocop:enable Style/HashSyntax
|
||||
# rubocop:enable Layout/IndentationWidth
|
||||
# rubocop:enable Layout/LineLength
|
||||
# rubocop:enable Performance/RedundantSplitRegexpArgument
|
||||
# rubocop:enable Style/IfUnlessModifier
|
||||
# rubocop:enable Style/RegexpLiteralMixedPreserve
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@
|
|||
"@gitlab/favicon-overlay": "2.0.0",
|
||||
"@gitlab/fonts": "^1.3.0",
|
||||
"@gitlab/svgs": "3.112.0",
|
||||
"@gitlab/ui": "88.0.0",
|
||||
"@gitlab/ui": "88.1.0",
|
||||
"@gitlab/web-ide": "^0.0.1-dev-20240731185426",
|
||||
"@mattiasbuelens/web-streams-adapter": "^0.1.0",
|
||||
"@rails/actioncable": "7.0.8-4",
|
||||
|
|
@ -321,4 +321,4 @@
|
|||
"node": ">=12.22.1",
|
||||
"yarn": "^1.10.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,10 +43,11 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js, feat
|
|||
|
||||
it 'allows user to mark a note as resolved' do
|
||||
page.within '.diff-content .note' do
|
||||
find('.line-resolve-btn').click
|
||||
find_by_testid('resolve-line-button').click
|
||||
|
||||
expect(page).to have_selector('.line-resolve-btn.is-active')
|
||||
expect(find('.line-resolve-btn')['aria-label']).to eq("Resolved by #{user.name}")
|
||||
wait_for_requests
|
||||
|
||||
expect(find_by_testid('resolve-line-button')['aria-label']).to eq("Resolved by #{user.name}")
|
||||
end
|
||||
|
||||
page.within '.diff-content' do
|
||||
|
|
@ -65,10 +66,6 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js, feat
|
|||
|
||||
expect(page).to have_selector('.discussion-body', visible: false)
|
||||
|
||||
page.within '.diff-content .note' do
|
||||
expect(page).to have_selector('.line-resolve-btn.is-active')
|
||||
end
|
||||
|
||||
page.within(first('.discussions-counter')) do
|
||||
expect(page).to have_content('All threads resolved')
|
||||
end
|
||||
|
|
@ -231,7 +228,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js, feat
|
|||
|
||||
it 'updates updated text after resolving note' do
|
||||
page.within '.diff-content .note' do
|
||||
resolve_button = find('.line-resolve-btn')
|
||||
resolve_button = find_by_testid('resolve-line-button')
|
||||
|
||||
resolve_button.click
|
||||
wait_for_requests
|
||||
|
|
@ -255,11 +252,11 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js, feat
|
|||
|
||||
it 'marks thread as resolved when resolving single note' do
|
||||
page.within("#note_#{note.id}") do
|
||||
first('.line-resolve-btn').click
|
||||
first('[data-testid="resolve-line-button"]').click
|
||||
|
||||
wait_for_requests
|
||||
|
||||
expect(first('.line-resolve-btn')['aria-label']).to eq("Resolved by #{user.name}")
|
||||
expect(first('[data-testid="resolve-line-button"]')['aria-label']).to eq("Resolved by #{user.name}")
|
||||
end
|
||||
|
||||
page.within(first('.discussions-counter')) do
|
||||
|
|
@ -268,7 +265,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js, feat
|
|||
end
|
||||
|
||||
it 'resolves thread' do
|
||||
resolve_buttons = page.all('.note .line-resolve-btn', count: 1)
|
||||
resolve_buttons = page.all('.note [data-testid="resolve-line-button"]', count: 1)
|
||||
resolve_buttons.each do |button|
|
||||
button.click
|
||||
end
|
||||
|
|
@ -306,7 +303,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js, feat
|
|||
end
|
||||
|
||||
it 'allows user to mark all notes as resolved' do
|
||||
page.all('.note .line-resolve-btn', count: 2).each do |btn|
|
||||
page.all('.note [data-testid="resolve-line-button"]', count: 2).each do |btn|
|
||||
btn.click
|
||||
end
|
||||
|
||||
|
|
@ -341,7 +338,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js, feat
|
|||
|
||||
it 'updates updated text after resolving note' do
|
||||
page.within('.diff-content .note', match: :first) do
|
||||
resolve_button = find('.line-resolve-btn')
|
||||
resolve_button = find_by_testid('resolve-line-button')
|
||||
|
||||
resolve_button.click
|
||||
wait_for_requests
|
||||
|
|
@ -384,9 +381,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js, feat
|
|||
|
||||
it 'allows user to mark a note as resolved' do
|
||||
page.within '.diff-content .note' do
|
||||
find('.line-resolve-btn').click
|
||||
|
||||
expect(page).to have_selector('.line-resolve-btn.is-active')
|
||||
find_by_testid('resolve-line-button').click
|
||||
end
|
||||
|
||||
page.within '.diff-content' do
|
||||
|
|
@ -403,10 +398,6 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js, feat
|
|||
find('button[data-testid="resolve-discussion-button"]').click
|
||||
end
|
||||
|
||||
page.within '.diff-content .note' do
|
||||
expect(page).to have_selector('.line-resolve-btn.is-active')
|
||||
end
|
||||
|
||||
page.within(first('.discussions-counter')) do
|
||||
expect(page).to have_content('All threads resolved')
|
||||
end
|
||||
|
|
@ -473,7 +464,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js, feat
|
|||
|
||||
it 'does not allow user to mark note as resolved' do
|
||||
page.within '.diff-content .note' do
|
||||
expect(page).not_to have_selector('.line-resolve-btn')
|
||||
expect(page).not_to have_selector('[data-testid="resolve-line-button"]')
|
||||
end
|
||||
|
||||
page.within(first('.discussions-counter')) do
|
||||
|
|
@ -497,9 +488,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js, feat
|
|||
|
||||
it 'allows user to mark a note as resolved' do
|
||||
page.within '.diff-content .note' do
|
||||
find('.line-resolve-btn').click
|
||||
|
||||
expect(page).to have_selector('.line-resolve-btn.is-active')
|
||||
find_by_testid('resolve-line-button').click
|
||||
end
|
||||
|
||||
page.within '.diff-content' do
|
||||
|
|
@ -521,7 +510,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js, feat
|
|||
|
||||
it 'does not allow user to mark note as resolved' do
|
||||
page.within '.diff-content .note' do
|
||||
expect(page).not_to have_selector('.line-resolve-btn')
|
||||
expect(page).not_to have_selector('[data-testid="resolve-line-button"]')
|
||||
end
|
||||
|
||||
page.within(first('.discussions-counter')) do
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ describe('Upload dropzone component', () => {
|
|||
it('applies correct classes when displaying as a standalone item', () => {
|
||||
createComponent({ props: { displayAsCard: false } });
|
||||
expect(findDropzoneArea().classes()).not.toContain('gl-flex-col');
|
||||
expect(findIcon().classes()).toEqual(['gl-mr-3', 'gl-text-gray-500']);
|
||||
expect(findIcon().classes()).toEqual(['gl-mr-3']);
|
||||
expect(findIcon().props('size')).toBe(16);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import Vue from 'vue';
|
||||
import { GlLoadingIcon, GlIcon } from '@gitlab/ui';
|
||||
import { GlLoadingIcon } from '@gitlab/ui';
|
||||
import VueApollo from 'vue-apollo';
|
||||
import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
|
||||
import createMockApollo from 'helpers/mock_apollo_helper';
|
||||
|
|
@ -164,7 +164,6 @@ describe('WorkItemDevelopment CE', () => {
|
|||
const findLabel = () => wrapper.findByTestId('dev-widget-label');
|
||||
const findAddButton = () => wrapper.findByTestId('add-item');
|
||||
const findLoadingIcon = () => wrapper.findComponent(GlLoadingIcon);
|
||||
const findAddMoreIcon = () => wrapper.findComponent(GlIcon);
|
||||
const findCreateMRButton = () => wrapper.findByTestId('create-mr-button');
|
||||
const findCreateBranchButton = () => wrapper.findByTestId('create-branch-button');
|
||||
const findMoreInformation = () => wrapper.findByTestId('more-information');
|
||||
|
|
@ -183,7 +182,6 @@ describe('WorkItemDevelopment CE', () => {
|
|||
await waitForPromises();
|
||||
|
||||
expect(findAddButton().exists()).toBe(true);
|
||||
expect(findAddMoreIcon().exists()).toBe(true);
|
||||
});
|
||||
|
||||
it('should not render the add button when `canUpdate` is true and `workItemsAlpha` is off', async () => {
|
||||
|
|
@ -191,7 +189,6 @@ describe('WorkItemDevelopment CE', () => {
|
|||
await waitForPromises();
|
||||
|
||||
expect(findAddButton().exists()).toBe(false);
|
||||
expect(findAddMoreIcon().exists()).toBe(false);
|
||||
});
|
||||
|
||||
it('should not render the add button when `canUpdate` is false and `workItemsAlpha` is off', async () => {
|
||||
|
|
|
|||
|
|
@ -26,31 +26,4 @@ RSpec.describe Gitlab::Patch::RedisStoreFactory, feature_category: :redis do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '#extract_host_options_from_uri' do
|
||||
using RSpec::Parameterized::TableSyntax
|
||||
|
||||
# rubocop:disable Layout/LineLength -- Table is more readable as one line
|
||||
where(:url, :scheme, :username, :password, :port, :path, :db) do
|
||||
"redis://localhost" | 'redis' | nil | nil | 6379 | nil | nil
|
||||
"rediss://localhost" | 'rediss' | nil | nil | 6379 | nil | nil
|
||||
"rediss://:password@localhost" | 'rediss' | nil | 'password' | 6379 | nil | nil
|
||||
"rediss://redis-user:password@localhost:6380?db=5" | 'rediss' | 'redis-user' | 'password' | 6380 | nil | "5"
|
||||
"unix://test-user:secret@/var/run/redis.sock?db=6" | nil | 'test-user' | 'secret' | nil | '/var/run/redis.sock' | "6"
|
||||
end
|
||||
# rubocop:enable Layout/LineLength
|
||||
|
||||
subject(:extracted) { ::Redis::Store::Factory.extract_host_options_from_uri(url) }
|
||||
|
||||
with_them do
|
||||
it 'extracts the URL components', :aggregate_failures do
|
||||
expect(extracted[:scheme]).to eq(scheme)
|
||||
expect(extracted[:username]).to eq(username)
|
||||
expect(extracted[:password]).to eq(password)
|
||||
expect(extracted[:path]).to eq(path)
|
||||
expect(extracted[:port]).to eq(port)
|
||||
expect(extracted[:db]).to eq(db)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -200,10 +200,12 @@ RSpec.shared_examples "redis_shared_examples" do
|
|||
|
||||
with_them do
|
||||
it 'returns hash with host, port, db, username, and password' do
|
||||
is_expected.to include(name: host, password: 'mynewpassword', db: redis_database)
|
||||
|
||||
if username
|
||||
is_expected.to include(name: host, username: username, password: 'mynewpassword', db: redis_database)
|
||||
is_expected.to include(username: username)
|
||||
else
|
||||
is_expected.to include(name: host, password: 'mynewpassword', db: redis_database)
|
||||
is_expected.not_to have_key(:username)
|
||||
end
|
||||
|
||||
is_expected.not_to have_key(:url)
|
||||
|
|
|
|||
|
|
@ -20,16 +20,6 @@ cmd/gitlab-workhorse/main.go:233:5: shadow: declaration of "err" shadows declara
|
|||
cmd/gitlab-workhorse/main.go:241:26: Error return value of `accessCloser.Close` is not checked (errcheck)
|
||||
cmd/gitlab-workhorse/main.go:265:10: G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server (gosec)
|
||||
cmd/gitlab-workhorse/main_test.go:60:2: exitAfterDefer: os.Exit will exit, and `defer gitaly.CloseConnections()` will not run (gocritic)
|
||||
cmd/gitlab-workhorse/main_test.go:158:66: wrapperFunc: use http.NotFoundHandler method in `http.HandlerFunc(http.NotFound)` (gocritic)
|
||||
cmd/gitlab-workhorse/main_test.go:252:25: unnecessary conversion (unconvert)
|
||||
cmd/gitlab-workhorse/main_test.go:467:3: bool-compare: use assert.True (testifylint)
|
||||
cmd/gitlab-workhorse/main_test.go:532:3: ifElseChain: rewrite if-else to switch statement (gocritic)
|
||||
cmd/gitlab-workhorse/main_test.go:592:3: var-naming: var requestIds should be requestIDs (revive)
|
||||
cmd/gitlab-workhorse/main_test.go:593:3: len: use require.Len (testifylint)
|
||||
cmd/gitlab-workhorse/main_test.go:665:4: var-naming: var propagatedRequestId should be propagatedRequestID (revive)
|
||||
cmd/gitlab-workhorse/main_test.go:674:4: var-naming: var requestIds should be requestIDs (revive)
|
||||
cmd/gitlab-workhorse/main_test.go:677:4: len: use require.Len (testifylint)
|
||||
cmd/gitlab-workhorse/main_test.go:954:4: var-naming: var originResourceUrl should be originResourceURL (revive)
|
||||
cmd/gitlab-workhorse/proxy_test.go:55:9: shadow: declaration of "err" shadows declaration at line 36 (govet)
|
||||
cmd/gitlab-workhorse/proxy_test.go:77:6: var-naming: var tsUrl should be tsURL (revive)
|
||||
cmd/gitlab-workhorse/proxy_test.go:87:6: shadow: declaration of "err" shadows declaration at line 78 (govet)
|
||||
|
|
|
|||
|
|
@ -20,16 +20,6 @@ cmd/gitlab-workhorse/main.go:233:5: shadow: declaration of "err" shadows declara
|
|||
cmd/gitlab-workhorse/main.go:241:26: Error return value of `accessCloser.Close` is not checked (errcheck)
|
||||
cmd/gitlab-workhorse/main.go:265:10: G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server (gosec)
|
||||
cmd/gitlab-workhorse/main_test.go:60:2: exitAfterDefer: os.Exit will exit, and `defer gitaly.CloseConnections()` will not run (gocritic)
|
||||
cmd/gitlab-workhorse/main_test.go:158:66: wrapperFunc: use http.NotFoundHandler method in `http.HandlerFunc(http.NotFound)` (gocritic)
|
||||
cmd/gitlab-workhorse/main_test.go:252:25: unnecessary conversion (unconvert)
|
||||
cmd/gitlab-workhorse/main_test.go:467:3: bool-compare: use assert.True (testifylint)
|
||||
cmd/gitlab-workhorse/main_test.go:532:3: ifElseChain: rewrite if-else to switch statement (gocritic)
|
||||
cmd/gitlab-workhorse/main_test.go:592:3: var-naming: var requestIds should be requestIDs (revive)
|
||||
cmd/gitlab-workhorse/main_test.go:593:3: len: use require.Len (testifylint)
|
||||
cmd/gitlab-workhorse/main_test.go:665:4: var-naming: var propagatedRequestId should be propagatedRequestID (revive)
|
||||
cmd/gitlab-workhorse/main_test.go:674:4: var-naming: var requestIds should be requestIDs (revive)
|
||||
cmd/gitlab-workhorse/main_test.go:677:4: len: use require.Len (testifylint)
|
||||
cmd/gitlab-workhorse/main_test.go:954:4: var-naming: var originResourceUrl should be originResourceURL (revive)
|
||||
cmd/gitlab-workhorse/proxy_test.go:55:9: shadow: declaration of "err" shadows declaration at line 36 (govet)
|
||||
cmd/gitlab-workhorse/proxy_test.go:77:6: var-naming: var tsUrl should be tsURL (revive)
|
||||
cmd/gitlab-workhorse/proxy_test.go:87:6: shadow: declaration of "err" shadows declaration at line 78 (govet)
|
||||
|
|
|
|||
|
|
@ -155,6 +155,7 @@ func TestStaticFileRelativeURL(t *testing.T) {
|
|||
content := "PUBLIC"
|
||||
setupStaticFile(t, "static.txt", content)
|
||||
|
||||
// nolint:gocritic // Required for compatibility with existing code structure
|
||||
ts := testhelper.TestServerWithHandler(regexp.MustCompile(`.`), http.HandlerFunc(http.NotFound))
|
||||
defer ts.Close()
|
||||
backendURLString := ts.URL + "/my-relative-url"
|
||||
|
|
@ -249,7 +250,7 @@ This is a static error page for code 499
|
|||
defer resp.Body.Close()
|
||||
|
||||
require.Equal(t, 499, resp.StatusCode, "GET %q: status code", resourcePath)
|
||||
require.Equal(t, string(errorPageBody), body, "GET %q: response body", resourcePath)
|
||||
require.Equal(t, errorPageBody, body, "GET %q: response body", resourcePath)
|
||||
}
|
||||
|
||||
func TestGzipAssets(t *testing.T) {
|
||||
|
|
@ -464,7 +465,7 @@ func TestSendURLForArtifacts(t *testing.T) {
|
|||
|
||||
rawHandler := http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
|
||||
hj, ok := w.(http.Hijacker)
|
||||
assert.Equal(t, true, ok)
|
||||
assert.True(t, ok)
|
||||
|
||||
conn, buf, err := hj.Hijack()
|
||||
assert.NoError(t, err)
|
||||
|
|
@ -529,13 +530,14 @@ func TestAPIFalsePositivesAreProxied(t *testing.T) {
|
|||
goodResponse := []byte(`<html></html>`)
|
||||
ts := testhelper.TestServerWithHandler(regexp.MustCompile(`.`), func(w http.ResponseWriter, r *http.Request) {
|
||||
url := r.URL.String()
|
||||
if url[len(url)-1] == '/' {
|
||||
switch {
|
||||
case url[len(url)-1] == '/':
|
||||
w.WriteHeader(500)
|
||||
w.Write([]byte("PreAuthorize request included a trailing slash"))
|
||||
} else if r.Header.Get(secret.RequestHeader) != "" && r.Method != "GET" {
|
||||
case r.Header.Get(secret.RequestHeader) != "" && r.Method != "GET":
|
||||
w.WriteHeader(500)
|
||||
w.Write([]byte("non-GET request went through PreAuthorize handler"))
|
||||
} else {
|
||||
default:
|
||||
w.Header().Set("Content-Type", "text/html")
|
||||
_, err := w.Write(goodResponse)
|
||||
assert.NoError(t, err)
|
||||
|
|
@ -589,8 +591,8 @@ func TestCorrelationIdHeader(t *testing.T) {
|
|||
defer resp.Body.Close()
|
||||
|
||||
require.Equal(t, 200, resp.StatusCode, "GET %q: status code", resource)
|
||||
requestIds := resp.Header["X-Request-Id"]
|
||||
require.Equal(t, 1, len(requestIds), "GET %q: One X-Request-Id present", resource)
|
||||
requestIDs := resp.Header["X-Request-Id"]
|
||||
require.Len(t, requestIDs, 1, "GET %q: One X-Request-Id present", resource)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -662,8 +664,8 @@ func TestPropagateCorrelationIdHeader(t *testing.T) {
|
|||
ws := startWorkhorseServerWithConfig(t, upstreamConfig)
|
||||
|
||||
resource := "/api/v3/projects/123/repository/not/special"
|
||||
propagatedRequestId := "Propagated-RequestId-12345678"
|
||||
headers := map[string]string{"X-Request-Id": propagatedRequestId}
|
||||
propagatedRequestID := "Propagated-RequestId-12345678"
|
||||
headers := map[string]string{"X-Request-Id": propagatedRequestID}
|
||||
|
||||
if tc.xffHeader != "" {
|
||||
headers["X-Forwarded-For"] = tc.xffHeader
|
||||
|
|
@ -671,15 +673,15 @@ func TestPropagateCorrelationIdHeader(t *testing.T) {
|
|||
|
||||
resp, _ := httpGet(t, ws.URL+resource, headers)
|
||||
defer resp.Body.Close()
|
||||
requestIds := resp.Header["X-Request-Id"]
|
||||
requestIDs := resp.Header["X-Request-Id"]
|
||||
|
||||
require.Equal(t, 200, resp.StatusCode, "GET %q: status code", resource)
|
||||
require.Equal(t, 1, len(requestIds), "GET %q: One X-Request-Id present", resource)
|
||||
require.Len(t, requestIDs, 1, "GET %q: One X-Request-Id present", resource)
|
||||
|
||||
if tc.propagationExpected {
|
||||
require.Contains(t, requestIds, propagatedRequestId, "GET %q: Has X-Request-Id %s present", resource, propagatedRequestId)
|
||||
require.Contains(t, requestIDs, propagatedRequestID, "GET %q: Has X-Request-Id %s present", resource, propagatedRequestID)
|
||||
} else {
|
||||
require.NotContains(t, requestIds, propagatedRequestId, "GET %q: X-Request-Id not propagated")
|
||||
require.NotContains(t, requestIDs, propagatedRequestID, "GET %q: X-Request-Id not propagated")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -951,12 +953,12 @@ func TestDependencyProxyInjector(t *testing.T) {
|
|||
}))
|
||||
defer originResourceServer.Close()
|
||||
|
||||
originResourceUrl := originResourceServer.URL + originResource
|
||||
originResourceURL := originResourceServer.URL + originResource
|
||||
|
||||
ts := testhelper.TestServerWithHandler(regexp.MustCompile(`.`), func(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.URL.String() {
|
||||
case "/base":
|
||||
params := `{"Url": "` + originResourceUrl + `", "Token": "` + token + `"}`
|
||||
params := `{"Url": "` + originResourceURL + `", "Token": "` + token + `"}`
|
||||
w.Header().Set("Gitlab-Workhorse-Send-Data", `send-dependency:`+base64.URLEncoding.EncodeToString([]byte(params)))
|
||||
case "/base/upload/authorize":
|
||||
w.Header().Set("Content-Type", api.ResponseContentType)
|
||||
|
|
|
|||
|
|
@ -1350,10 +1350,10 @@
|
|||
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-3.112.0.tgz#9789d6766de222762594c8512bc3b32b619dfe6b"
|
||||
integrity sha512-lemHTryUoeWcOPd1V8B4Iag6uXU0DvEqfKibPS6PhXAsPdMTCObMb7RPEeVvGp0KI/05fWYJ5EpEBDm5nv0EIw==
|
||||
|
||||
"@gitlab/ui@88.0.0":
|
||||
version "88.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-88.0.0.tgz#aab7b5ef169d02d65e80901680052c1f755eeec3"
|
||||
integrity sha512-O9K5UalOBLboPnskMPezt2nttKL/YXiSlADcDZ/MKTfw9usxRVMm+COuS+zrmqXfOEZfmNMd2lbQnXW9uJlyRQ==
|
||||
"@gitlab/ui@88.1.0":
|
||||
version "88.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-88.1.0.tgz#67eac5bffbfa5acc552e00cf3d8b9dee69d63378"
|
||||
integrity sha512-y/9MJfAzJlvBykgzPket6/bYxh00B3LfwabTPdBar6Yh8KrIKlM2hD+fZQt7SeZcS31ILyM2kVgVlV4AK9M6Ag==
|
||||
dependencies:
|
||||
"@floating-ui/dom" "1.4.3"
|
||||
echarts "^5.3.2"
|
||||
|
|
|
|||
Loading…
Reference in New Issue