Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7eb4465a
Commit
7eb4465a
authored
Apr 14, 2021
by
David Fernandez
Committed by
Gabriel Mazetto
Apr 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable `maven_packages_group_level_improvements` by default
parent
0995750f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
5 deletions
+10
-5
app/finders/packages/maven/package_finder.rb
app/finders/packages/maven/package_finder.rb
+1
-1
app/models/packages/package.rb
app/models/packages/package.rb
+1
-1
changelogs/unreleased/326099-enabled-by-default.yml
changelogs/unreleased/326099-enabled-by-default.yml
+5
-0
config/feature_flags/development/maven_packages_group_level_improvements.yml
...s/development/maven_packages_group_level_improvements.yml
+1
-1
lib/api/maven_packages.rb
lib/api/maven_packages.rb
+1
-1
spec/requests/api/maven_packages_spec.rb
spec/requests/api/maven_packages_spec.rb
+1
-1
No files found.
app/finders/packages/maven/package_finder.rb
View file @
7eb4465a
...
...
@@ -76,7 +76,7 @@ module Packages
def
group_level_improvements?
strong_memoize
(
:group_level_improvements
)
do
Feature
.
enabled?
(
:maven_packages_group_level_improvements
)
Feature
.
enabled?
(
:maven_packages_group_level_improvements
,
default_enabled: :yaml
)
end
end
end
...
...
app/models/packages/package.rb
View file @
7eb4465a
...
...
@@ -138,7 +138,7 @@ class Packages::Package < ApplicationRecord
after_commit
:update_composer_cache
,
on: :destroy
,
if:
->
{
composer?
}
def
self
.
for_projects
(
projects
)
unless
Feature
.
enabled?
(
:maven_packages_group_level_improvements
)
unless
Feature
.
enabled?
(
:maven_packages_group_level_improvements
,
default_enabled: :yaml
)
return
none
unless
projects
.
any?
end
...
...
changelogs/unreleased/326099-enabled-by-default.yml
0 → 100644
View file @
7eb4465a
---
title
:
Reduce the number of SQL queries executed on Maven file API endpoints
merge_request
:
59136
author
:
type
:
performance
config/feature_flags/development/maven_packages_group_level_improvements.yml
View file @
7eb4465a
...
...
@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/326099
milestone
:
'
13.11'
type
:
development
group
:
group::package
default_enabled
:
fals
e
default_enabled
:
tru
e
lib/api/maven_packages.rb
View file @
7eb4465a
...
...
@@ -80,7 +80,7 @@ module API
def
fetch_package
(
file_name
:,
project:
nil
,
group:
nil
)
order_by_package_file
=
false
if
Feature
.
enabled?
(
:maven_packages_group_level_improvements
)
if
Feature
.
enabled?
(
:maven_packages_group_level_improvements
,
default_enabled: :yaml
)
order_by_package_file
=
file_name
.
include?
(
::
Packages
::
Maven
::
Metadata
.
filename
)
&&
!
params
[
:path
].
include?
(
::
Packages
::
Maven
::
FindOrCreatePackageService
::
SNAPSHOT_TERM
)
end
...
...
spec/requests/api/maven_packages_spec.rb
View file @
7eb4465a
...
...
@@ -387,7 +387,7 @@ RSpec.describe API::MavenPackages do
subject
status
=
Feature
.
enabled?
(
:maven_packages_group_level_improvements
)
?
:not_found
:
:forbidden
status
=
Feature
.
enabled?
(
:maven_packages_group_level_improvements
,
default_enabled: :yaml
)
?
:not_found
:
:forbidden
expect
(
response
).
to
have_gitlab_http_status
(
status
)
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment