Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot
2025-03-14 06:09:39 +00:00
parent ec20ebf1c7
commit f2109f5c55
29 changed files with 146 additions and 86 deletions

View File

@ -1 +1 @@
3f3bfa812d4677b2f61884fb13aa5257707352c6
eb76930d3eed5e5faac7155d2d403aa69ff3baa2

View File

@ -4,3 +4,11 @@ import initBoards from '~/boards';
addShortcutsExtension(ShortcutsNavigation);
initBoards();
if (gon.features.workItemsViewPreference) {
import(/* webpackChunkName: 'work_items_feedback' */ '~/work_items_feedback')
.then(({ initWorkItemsFeedback }) => {
initWorkItemsFeedback();
})
.catch({});
}

View File

@ -1,3 +1,11 @@
import { mountIssuesListApp } from '~/issues/list';
mountIssuesListApp();
if (gon.features.workItemsViewPreference) {
import(/* webpackChunkName: 'work_items_feedback' */ '~/work_items_feedback')
.then(({ initWorkItemsFeedback }) => {
initWorkItemsFeedback();
})
.catch({});
}

View File

@ -4,3 +4,11 @@ import initBoards from '~/boards';
addShortcutsExtension(ShortcutsNavigation);
initBoards();
if (gon.features.workItemsViewPreference) {
import(/* webpackChunkName: 'work_items_feedback' */ '~/work_items_feedback')
.then(({ initWorkItemsFeedback }) => {
initWorkItemsFeedback();
})
.catch({});
}

View File

@ -224,27 +224,31 @@ export default {
ref="tooltip"
v-gl-tooltip.hover.top
category="secondary"
:selected="subscribed"
data-testid="subscribe-button"
class="hide-collapsed"
:title="notificationTooltip"
:class="{ 'gl-ml-2': isIssuable, 'btn-icon': isNotificationsTodosButtons }"
@click="toggleSubscribed"
>
<gl-animated-notification-icon :is-on="!subscribed" />
<gl-animated-notification-icon
:is-on="!subscribed"
:class="{ '!gl-text-status-info': subscribed }"
/>
</gl-button>
<gl-button
v-if="!isMergeRequest"
ref="tooltip"
v-gl-tooltip.left.viewport
category="tertiary"
:selected="subscribed"
data-testid="subscribe-button"
:title="notificationTooltip"
class="sidebar-collapsed-icon sidebar-collapsed-container !gl-rounded-none !gl-border-0"
@click="toggleSubscribed"
>
<gl-animated-notification-icon :is-on="!subscribed" />
<gl-animated-notification-icon
:is-on="!subscribed"
:class="{ '!gl-text-status-info': subscribed }"
/>
</gl-button>
</div>
<sidebar-editable-item

View File

@ -212,7 +212,7 @@ export default {
class="hide-collapsed"
@click.stop.prevent="toggleTodo"
>
<gl-animated-todo-icon :is-on="hasTodo" />
<gl-animated-todo-icon :is-on="hasTodo" :class="{ '!gl-text-status-info': hasTodo }" />
</todo-button>
<todo-button
v-else
@ -229,13 +229,12 @@ export default {
v-if="isClassicSidebar && !isMergeRequest"
v-gl-tooltip.left.viewport
:title="tootltipTitle"
:selected="hasTodo"
category="tertiary"
type="reset"
class="sidebar-collapsed-icon sidebar-collapsed-container !gl-rounded-none !gl-shadow-none"
@click.stop.prevent="toggleTodo"
>
<gl-animated-todo-icon :is-on="hasTodo" />
<gl-animated-todo-icon :is-on="hasTodo" :class="{ '!gl-text-status-info': hasTodo }" />
</gl-button>
</div>
</template>

View File

@ -78,7 +78,6 @@ export default {
v-gl-tooltip.left.viewport
:class="buttonClasses"
:variant="buttonVariant"
:selected="isActionActive"
:title="buttonTooltip"
:aria-label="buttonLabel"
:data-issuable-id="issuableId"

View File

@ -47,7 +47,6 @@ export default {
v-bind="$attrs"
:aria-label="buttonLabel"
:class="{ 'btn-icon': isIconButton }"
:selected="isTodo"
@click="onToggle($event)"
>
<slot>{{ buttonLabel }}</slot>

View File

@ -4,7 +4,6 @@ import { uniqueId } from 'lodash';
import { createAlert } from '~/alert';
import { __ } from '~/locale';
import * as Sentry from '~/sentry/sentry_browser_wrapper';
import { DOCS_URL_IN_EE_DIR } from '~/lib/utils/url_utility';
import getUserPreferences from '../graphql/user_preferences.query.graphql';
import setUseWorkItemsView from '../graphql/set_use_work_items_view.mutation.graphql';
@ -21,7 +20,7 @@ export default {
currentUser: {
userPreferences: {},
},
feedbackIssue: `${DOCS_URL_IN_EE_DIR}/user/project/issues/issue_work_items.html`,
feedbackIssue: `https://gitlab.com/gitlab-org/gitlab/-/issues/523713`,
};
},
apollo: {
@ -69,10 +68,11 @@ export default {
badgeId: uniqueId(),
i18n: {
previewWorkItems: __(
'Preview the new issues experience, with real time updates and refreshed design.',
'Weve introduced improvements to issues and epics, such as the ability to view full details from lists and boards, new features, and a refreshed design. Have questions or thoughts on the changes?',
),
leaveFeedback: __('Learn more'),
newIssueLook: __('New issue look'),
leaveFeedback: __('Provide feedback on the experience'),
badgeTitle: __('New look'),
popoverTitle: __('New look (Beta)'),
},
};
</script>
@ -80,7 +80,7 @@ export default {
<template>
<div class="gl-flex gl-content-center">
<gl-badge :id="$options.badgeId" variant="info" icon="information-o" href="#"
>{{ $options.i18n.newIssueLook }}: {{ onOff }}</gl-badge
>{{ $options.i18n.badgeTitle }}: {{ onOff }}</gl-badge
>
<gl-popover
:target="$options.badgeId"
@ -88,7 +88,7 @@ export default {
triggers="focus click manual blur"
placement="bottom"
show-close-button
:title="$options.i18n.newIssueLook"
:title="$options.i18n.popoverTitle"
>
<gl-toggle
:value="currentUser.userPreferences.useWorkItemsView"
@ -99,7 +99,8 @@ export default {
<div class="gl-pt-2">
{{ $options.i18n.previewWorkItems }}
</div>
<gl-link target="_blank" :href="feedbackIssue">{{ $options.i18n.leaveFeedback }}</gl-link>
<gl-link target="_blank" :href="feedbackIssue">{{ $options.i18n.leaveFeedback }}</gl-link
>.
</gl-popover>
</div>
</template>

View File

@ -6,4 +6,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/482931
milestone: '17.4'
group: group::project management
type: beta
default_enabled: false
default_enabled: true

View File

@ -9,15 +9,6 @@ description: Store build-related runner session. Data is removed after the respe
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/6208
milestone: '11.1'
gitlab_schema: gitlab_ci
desired_sharding_key:
project_id:
references: projects
backfill_via:
parent:
foreign_key: build_id
table: p_ci_builds
sharding_key: project_id
belongs_to: build
foreign_key_name: fk_rails_70707857d3_p
desired_sharding_key_migration_job_name: BackfillCiBuildsRunnerSessionProjectId
table_size: small
sharding_key:
project_id: projects

View File

@ -8,14 +8,6 @@ description: Stores unit test failure data produced from builds.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56137
milestone: '13.11'
gitlab_schema: gitlab_ci
desired_sharding_key:
project_id:
references: projects
backfill_via:
parent:
foreign_key: unit_test_id
table: ci_unit_tests
sharding_key: project_id
belongs_to: unit_test
desired_sharding_key_migration_job_name: BackfillCiUnitTestFailuresProjectId
table_size: small
sharding_key:
project_id: projects

View File

@ -8,14 +8,6 @@ description: Join table between packages_packages and packages_dependencies
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/20549
milestone: '12.6'
gitlab_schema: gitlab_main_cell
desired_sharding_key:
project_id:
references: projects
backfill_via:
parent:
foreign_key: package_id
table: packages_packages
sharding_key: project_id
belongs_to: package
desired_sharding_key_migration_job_name: BackfillPackagesDependencyLinksProjectId
table_size: medium
sharding_key:
project_id: projects

View File

@ -17,5 +17,4 @@ desired_sharding_key:
table: packages_dependency_links
sharding_key: project_id
belongs_to: dependency_link
awaiting_backfill_on_parent: true
table_size: small

View File

@ -0,0 +1,14 @@
# frozen_string_literal: true
class AddCiUnitTestFailuresProjectIdNotNull < Gitlab::Database::Migration[2.2]
milestone '17.10'
disable_ddl_transaction!
def up
add_not_null_constraint :ci_unit_test_failures, :project_id
end
def down
remove_not_null_constraint :ci_unit_test_failures, :project_id
end
end

View File

@ -0,0 +1,14 @@
# frozen_string_literal: true
class AddPackagesDependencyLinksProjectIdNotNull < Gitlab::Database::Migration[2.2]
milestone '17.10'
disable_ddl_transaction!
def up
add_not_null_constraint :packages_dependency_links, :project_id
end
def down
remove_not_null_constraint :packages_dependency_links, :project_id
end
end

View File

@ -0,0 +1,14 @@
# frozen_string_literal: true
class AddCiBuildsRunnerSessionProjectIdNotNull < Gitlab::Database::Migration[2.2]
milestone '17.10'
disable_ddl_transaction!
def up
add_not_null_constraint :ci_builds_runner_session, :project_id
end
def down
remove_not_null_constraint :ci_builds_runner_session, :project_id
end
end

View File

@ -0,0 +1 @@
c51e2c1832759dcac7a274f90a7bb832fca9ecf3988f417dc7307826b72d8a18

View File

@ -0,0 +1 @@
356f47905452f47a0094ad79e25d1eb25966ae4857e6fe47a21f50ef4d5f854e

View File

@ -0,0 +1 @@
479d4c91fc305a319b3b3e1bf76af669172430292c32caedc5e90a8ce453a6e2

View File

@ -10526,7 +10526,8 @@ CREATE TABLE ci_builds_runner_session (
"authorization" character varying,
build_id bigint NOT NULL,
partition_id bigint NOT NULL,
project_id bigint
project_id bigint,
CONSTRAINT check_2eb15fa9f3 CHECK ((project_id IS NOT NULL))
);
CREATE SEQUENCE ci_builds_runner_session_id_seq
@ -11685,7 +11686,8 @@ CREATE TABLE ci_unit_test_failures (
unit_test_id bigint NOT NULL,
build_id bigint NOT NULL,
partition_id bigint NOT NULL,
project_id bigint
project_id bigint,
CONSTRAINT check_5e4c2d7261 CHECK ((project_id IS NOT NULL))
);
CREATE SEQUENCE ci_unit_test_failures_id_seq
@ -18506,7 +18508,8 @@ CREATE TABLE packages_dependency_links (
package_id bigint NOT NULL,
dependency_id bigint NOT NULL,
dependency_type smallint NOT NULL,
project_id bigint
project_id bigint,
CONSTRAINT check_dea82eaa8e CHECK ((project_id IS NOT NULL))
);
CREATE SEQUENCE packages_dependency_links_id_seq

View File

@ -33,17 +33,21 @@ incorporate this content into issues/index.md or managing_issues.md and redirect
We have changed how issues look by migrating them to a unified framework for work items to better
meet the product needs of our Agile Planning offering.
These changes include a new drawer view of issues opened from the issue list or issue board, a new creation workflow for issues and incidents, and a new view for issues.
These changes include a new drawer view of issues opened from the issue list, issue board, or child or linked items, a new creation workflow for issues and incidents, and a new view for issues.
For more information, see [epic 9584](https://gitlab.com/groups/gitlab-org/-/epics/9584) and the
blog post
[First look: The new Agile planning experience in GitLab](https://about.gitlab.com/blog/2024/06/18/first-look-the-new-agile-planning-experience-in-gitlab/) (June 2024).
## Feedback
Find a bug or have a request? Leave feedback in [issue 523713](https://gitlab.com/gitlab-org/gitlab/-/issues/523713).
## New features
The new issues experience includes these improvements:
- **Contextual view**: When you open an issue from the issue list or board, the issue opens in a
- **Drawer view**: When you open an issue from the issue list, board, or child or linked item list, the issue opens in a
drawer without leaving the current page.
The drawer provides a complete view of the issue.
To view the full page instead, either:
@ -66,25 +70,9 @@ The new issues experience includes these improvements:
When you view an issue list or issue detail page, you can manage the new experience:
1. In the upper-right corner, next to the Duo Chat button, look for the **New issue look** badge.
1. In the upper-right corner look for the **New look** badge.
1. Select the badge to toggle the experience on or off.
## Known issues
See the [full list of known issues](https://gitlab.com/gitlab-org/gitlab/-/issues/?sort=created_date&state=opened&or%5Blabel_name%5D%5B%5D=work%20items%3A%3Aissues-ga_immediate-follow&or%5Blabel_name%5D%5B%5D=work%20items%3A%3Aga-issues)
planned to be addressed before general availability.
## Feedback
### Customers
Customers participating in the pilot program, or who have voluntarily enabled the new experience, can leave feedback in [issue 513408](https://gitlab.com/gitlab-org/gitlab/-/issues/513408).
### Internal users
GitLab team members using the new experience should leave feedback in confidential issue
`https://gitlab.com/gitlab-org/gitlab/-/issues/512715`.
## Related topics
- [Work items development](../../../development/work_items.md)

View File

@ -19,7 +19,11 @@ module Gitlab
InvalidPathError = Class.new(StandardError)
class << self
delegate :params, :url, :store, :encrypted_secrets, to: :new
delegate :url, :store, :encrypted_secrets, to: :new
def params
@params ||= new.params.freeze
end
def with
pool.with { |redis| yield redis }

View File

@ -38465,9 +38465,6 @@ msgid_plural "New issues"
msgstr[0] ""
msgstr[1] ""
msgid "New issue look"
msgstr ""
msgid "New issue title"
msgstr ""
@ -38480,6 +38477,12 @@ msgstr ""
msgid "New list"
msgstr ""
msgid "New look"
msgstr ""
msgid "New look (Beta)"
msgstr ""
msgid "New merge request"
msgstr ""
@ -44453,9 +44456,6 @@ msgstr ""
msgid "Preview suppressed by a .gitattributes entry or the file's encoding is unsupported."
msgstr ""
msgid "Preview the new issues experience, with real time updates and refreshed design."
msgstr ""
msgid "Previous commit"
msgstr ""
@ -65803,6 +65803,9 @@ msgstr ""
msgid "Welcome, %{name}!"
msgstr ""
msgid "Weve introduced improvements to issues and epics, such as the ability to view full details from lists and boards, new features, and a refreshed design. Have questions or thoughts on the changes?"
msgstr ""
msgid "Weve introduced some improvements to the epic page such as real time updates, additional features, and a refreshed design. Have questions or thoughts on the changes?"
msgstr ""

View File

@ -105,6 +105,7 @@ RSpec.describe BoardsHelper do
allow(helper).to receive(:can?).with(user, :admin_issue_board, project).and_return(false)
allow(helper).to receive(:can?).with(user, :admin_label, project).and_return(false)
allow(helper).to receive(:can?).with(user, :create_saved_replies, project.group).and_return(false)
allow(helper).to receive(:can?).with(user, :create_saved_replies, project).and_return(false)
allow(helper).to receive(:can?).with(user, :create_work_item, project.group).and_return(false)
allow(helper).to receive(:can?).with(user, :bulk_admin_epic, project).and_return(false)
allow(helper).to receive(:can?).with(user, :create_projects, project.group).and_return(false)

View File

@ -25,8 +25,8 @@ RSpec.describe WorkItemsHelper, feature_category: :team_planning do
labels_manage_path: project_labels_path(project),
register_path: new_user_registration_path(redirect_to_referer: 'yes'),
sign_in_path: user_session_path(redirect_to_referer: 'yes'),
new_comment_template_paths:
[{ text: "Your comment templates", href: profile_comment_templates_path }].to_json,
new_comment_template_paths: include({ text: "Your comment templates",
href: profile_comment_templates_path }.to_json),
report_abuse_path: add_category_abuse_reports_path,
default_branch: project.default_branch_or_main,
initial_sort: current_user&.user_preference&.issues_sort,

View File

@ -370,7 +370,7 @@ RSpec.describe Gitlab::Database::Migrations::SidekiqHelpers do
end
define_singleton_method(:params) do
Gitlab::Redis::Queues.params.tap { |h| h[:db] = h[:db].to_i + 1 } # set shard instance in another db
Gitlab::Redis::Queues.params.dup.tap { |h| h[:db] = h[:db].to_i + 1 } # set shard instance in another db
end
end
end

View File

@ -62,7 +62,9 @@ RSpec.describe 'new tables missing sharding_key', feature_category: :cell do
# LFK already present on ci_pipeline_schedules and cascade delete all ci resources.
'ci_pipeline_schedule_variables.project_id',
'p_ci_job_annotations.project_id', # LFK already present on p_ci_builds and cascade delete all ci resources
'ci_builds_runner_session.project_id', # LFK already present on p_ci_builds and cascade delete all ci resources
'p_ci_pipelines_config.project_id', # LFK already present on p_ci_pipelines and cascade delete all ci resources
'ci_unit_test_failures.project_id', # LFK already present on ci_unit_tests and cascade delete all ci resources
'dast_profiles_pipelines.project_id', # LFK already present on dast_profiles and will cascade delete
'dast_scanner_profiles_builds.project_id', # LFK already present on dast_scanner_profiles and will cascade delete
'vulnerability_finding_links.project_id', # LFK already present on vulnerability_occurrence with cascade delete

View File

@ -24,6 +24,11 @@ RSpec.shared_examples "redis_shared_examples" do
before do
allow(described_class).to receive(:config_file_name).and_return(Rails.root.join(config_file_name).to_s)
allow(described_class).to receive(:redis_yml_path).and_return('/dev/null')
clear_params
end
after do
clear_params
end
describe '.config_file_name' do
@ -102,12 +107,14 @@ RSpec.shared_examples "redis_shared_examples" do
end
end
it 'withstands mutation' do
it 'cannot be mutated' do
params1 = described_class.params
params2 = described_class.params
params1[:foo] = :bar
expect(params2).not_to have_key(:foo)
expect { params1[:foo] = :bar }.to raise_exception(FrozenError)
expect(params1).to eq(params2)
expect(params1.object_id).to eq(params2.object_id)
end
context 'with command to generate extra config specified' do
@ -666,6 +673,13 @@ RSpec.shared_examples "redis_shared_examples" do
end
end
def clear_params
described_class.remove_instance_variable(:@params)
described_class.config_fallback&.remove_instance_variable(:@params)
rescue NameError
# raised if @params was not set; ignore
end
def clear_pool
described_class.remove_instance_variable(:@pool)
rescue NameError