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
ccdc7f86
Commit
ccdc7f86
authored
Sep 29, 2021
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab master
parents
2c9d1abf
3da8152e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
68 additions
and
13 deletions
+68
-13
config/feature_flags/development/disable_joins_upstream_downstream_projects.yml
...evelopment/disable_joins_upstream_downstream_projects.yml
+8
-0
doc/user/packages/dependency_proxy/index.md
doc/user/packages/dependency_proxy/index.md
+0
-4
doc/user/packages/npm_registry/index.md
doc/user/packages/npm_registry/index.md
+0
-5
ee/app/models/ee/ci/pipeline.rb
ee/app/models/ee/ci/pipeline.rb
+1
-1
ee/app/models/ee/project.rb
ee/app/models/ee/project.rb
+10
-2
ee/app/views/projects/settings/subscriptions/_index.html.haml
...pp/views/projects/settings/subscriptions/_index.html.haml
+1
-1
ee/spec/models/project_spec.rb
ee/spec/models/project_spec.rb
+48
-0
No files found.
config/feature_flags/development/disable_joins_upstream_downstream_projects.yml
0 → 100644
View file @
ccdc7f86
---
name
:
disable_joins_upstream_downstream_projects
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/71247
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/341791
milestone
:
'
14.4'
type
:
development
group
:
group::sharding
default_enabled
:
false
doc/user/packages/dependency_proxy/index.md
View file @
ccdc7f86
...
...
@@ -256,10 +256,6 @@ hub_docker_quota_check:
TOKEN=$(curl "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq --raw-output .token) && curl --head --header "Authorization: Bearer $TOKEN" "https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest" 2>&1
```
## Use the NPM Dependency Proxy for NPM packages
For information on this, see
[
Dependency Proxy
](
../npm_registry/#dependency-proxy
)
.
## Troubleshooting
### Dependency Proxy Connection Failure
...
...
doc/user/packages/npm_registry/index.md
View file @
ccdc7f86
...
...
@@ -614,8 +614,3 @@ The GitLab npm repository supports the following commands for the npm CLI (`npm`
-
`npm view`
: Show package metadata.
-
`yarn add`
: Install an npm package.
-
`yarn update`
: Update your dependencies.
## Dependency Proxy
The NPM Dependency Proxy for NPM packages isn't available. For more information, see
[
this epic
](
https://gitlab.com/groups/gitlab-org/-/epics/3608
)
.
ee/app/models/ee/ci/pipeline.rb
View file @
ccdc7f86
...
...
@@ -191,7 +191,7 @@ module EE
def
project_has_subscriptions?
project
.
feature_available?
(
:ci_project_subscriptions
)
&&
project
.
downstream_projects
.
any?
project
.
downstream_project
_subscription
s
.
any?
end
def
merge_train_ref?
...
...
ee/app/models/ee/project.rb
View file @
ccdc7f86
...
...
@@ -93,9 +93,9 @@ module EE
has_many
:project_aliases
has_many
:upstream_project_subscriptions
,
class_name:
'Ci::Subscriptions::Project'
,
foreign_key: :downstream_project_id
,
inverse_of: :downstream_project
has_many
:upstream_projects
,
class_name:
'Project'
,
through: :upstream_project_subscriptions
,
source: :upstream_project
has_many
:upstream_projects
,
class_name:
'Project'
,
through: :upstream_project_subscriptions
,
source: :upstream_project
,
disable_joins:
->
{
::
Feature
.
enabled?
(
:disable_joins_upstream_downstream_projects
,
default_enabled: :yaml
)
}
has_many
:downstream_project_subscriptions
,
class_name:
'Ci::Subscriptions::Project'
,
foreign_key: :upstream_project_id
,
inverse_of: :upstream_project
has_many
:downstream_projects
,
class_name:
'Project'
,
through: :downstream_project_subscriptions
,
source: :downstream_project
has_many
:downstream_projects
,
class_name:
'Project'
,
through: :downstream_project_subscriptions
,
source: :downstream_project
,
disable_joins:
->
{
::
Feature
.
enabled?
(
:disable_joins_upstream_downstream_projects
,
default_enabled: :yaml
)
}
has_many
:sourced_pipelines
,
class_name:
'Ci::Sources::Project'
,
foreign_key: :source_project_id
...
...
@@ -795,6 +795,14 @@ module EE
available_features
[
feature
]
end
def
upstream_projects_count
upstream_project_subscriptions
.
count
end
def
downstream_projects_count
downstream_project_subscriptions
.
count
end
def
merge_pipelines_enabled?
return
false
unless
ci_cd_settings
...
...
ee/app/views/projects/settings/subscriptions/_index.html.haml
View file @
ccdc7f86
...
...
@@ -13,7 +13,7 @@
%h5
=
_
(
"Subscriptions"
)
%span
.badge.badge-pill
=
@project
.
upstream_projects
.
count
+
@project
.
downstream_projects
.
count
=
@project
.
upstream_projects
_count
+
@project
.
downstream_projects_
count
%table
.table.gl-mt-3
%thead
...
...
ee/spec/models/project_spec.rb
View file @
ccdc7f86
...
...
@@ -3032,6 +3032,54 @@ RSpec.describe Project do
end
end
describe
'#upstream_projects'
do
it
'returns the upstream projects'
do
primary_project
=
create
(
:project
,
:public
)
upstream_project
=
create
(
:project
,
:public
)
primary_project
.
upstream_projects
<<
upstream_project
with_cross_joins_prevented
do
expect
(
primary_project
.
upstream_projects
).
to
eq
([
upstream_project
])
end
end
end
describe
'#upstream_projects_count'
do
it
'returns the upstream projects count'
do
primary_project
=
create
(
:project
,
:public
)
upstream_projects
=
create_list
(
:project
,
2
,
:public
)
primary_project
.
upstream_projects
=
upstream_projects
with_cross_joins_prevented
do
expect
(
primary_project
.
upstream_projects_count
).
to
eq
(
2
)
end
end
end
describe
'#downstream_projects'
do
it
'returns the downstream projects'
do
primary_project
=
create
(
:project
,
:public
)
downstream_project
=
create
(
:project
,
:public
)
primary_project
.
downstream_projects
<<
downstream_project
with_cross_joins_prevented
do
expect
(
primary_project
.
downstream_projects
).
to
eq
([
downstream_project
])
end
end
end
describe
'#downstream_projects_count'
do
it
'returns the downstream projects count'
do
primary_project
=
create
(
:project
,
:public
)
downstream_projects
=
create_list
(
:project
,
2
,
:public
)
primary_project
.
downstream_projects
=
downstream_projects
with_cross_joins_prevented
do
expect
(
primary_project
.
downstream_projects_count
).
to
eq
(
2
)
end
end
end
describe
'#vulnerability_report_rule'
do
subject
{
project
.
vulnerability_report_rule
}
...
...
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