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
1ba3c45e
Commit
1ba3c45e
authored
Feb 15, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
77ce4fea
83a760c5
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
38 additions
and
72 deletions
+38
-72
app/models/clusters/cluster.rb
app/models/clusters/cluster.rb
+1
-1
app/models/clusters/concerns/application_status.rb
app/models/clusters/concerns/application_status.rb
+8
-1
changelogs/unreleased/56937-edit-knative-domain-after-it-has-been-deployed.yml
.../56937-edit-knative-domain-after-it-has-been-deployed.yml
+5
-0
lib/gitlab/usage_data.rb
lib/gitlab/usage_data.rb
+6
-6
spec/models/clusters/applications/helm_spec.rb
spec/models/clusters/applications/helm_spec.rb
+4
-3
spec/models/clusters/applications/ingress_spec.rb
spec/models/clusters/applications/ingress_spec.rb
+0
-12
spec/models/clusters/applications/knative_spec.rb
spec/models/clusters/applications/knative_spec.rb
+0
-24
spec/models/clusters/applications/prometheus_spec.rb
spec/models/clusters/applications/prometheus_spec.rb
+1
-13
spec/models/clusters/applications/runner_spec.rb
spec/models/clusters/applications/runner_spec.rb
+0
-12
spec/support/shared_examples/models/cluster_application_status_shared_examples.rb
...ples/models/cluster_application_status_shared_examples.rb
+13
-0
No files found.
app/models/clusters/cluster.rb
View file @
1ba3c45e
...
...
@@ -99,7 +99,7 @@ module Clusters
where
(
'NOT EXISTS (?)'
,
subquery
)
end
scope
:with_knative_installed
,
->
{
joins
(
:application_knative
).
merge
(
Clusters
::
Applications
::
Knative
.
installed
)
}
scope
:with_knative_installed
,
->
{
joins
(
:application_knative
).
merge
(
Clusters
::
Applications
::
Knative
.
available
)
}
scope
:preload_knative
,
->
{
preload
(
...
...
app/models/clusters/concerns/application_status.rb
View file @
1ba3c45e
...
...
@@ -6,7 +6,14 @@ module Clusters
extend
ActiveSupport
::
Concern
included
do
scope
:installed
,
->
{
where
(
status:
self
.
state_machines
[
:status
].
states
[
:installed
].
value
)
}
scope
:available
,
->
do
where
(
status:
[
self
.
state_machines
[
:status
].
states
[
:installed
].
value
,
self
.
state_machines
[
:status
].
states
[
:updated
].
value
]
)
end
state_machine
:status
,
initial: :not_installable
do
state
:not_installable
,
value:
-
2
...
...
changelogs/unreleased/56937-edit-knative-domain-after-it-has-been-deployed.yml
0 → 100644
View file @
1ba3c45e
---
title
:
Fixes functions finder for upgraded Knative app
merge_request
:
25067
author
:
type
:
fixed
lib/gitlab/usage_data.rb
View file @
1ba3c45e
...
...
@@ -66,12 +66,12 @@ module Gitlab
group_clusters_disabled:
count
(
::
Clusters
::
Cluster
.
disabled
.
group_type
),
clusters_platforms_gke:
count
(
::
Clusters
::
Cluster
.
gcp_installed
.
enabled
),
clusters_platforms_user:
count
(
::
Clusters
::
Cluster
.
user_provided
.
enabled
),
clusters_applications_helm:
count
(
::
Clusters
::
Applications
::
Helm
.
installed
),
clusters_applications_ingress:
count
(
::
Clusters
::
Applications
::
Ingress
.
installed
),
clusters_applications_cert_managers:
count
(
::
Clusters
::
Applications
::
CertManager
.
installed
),
clusters_applications_prometheus:
count
(
::
Clusters
::
Applications
::
Prometheus
.
installed
),
clusters_applications_runner:
count
(
::
Clusters
::
Applications
::
Runner
.
installed
),
clusters_applications_knative:
count
(
::
Clusters
::
Applications
::
Knative
.
installed
),
clusters_applications_helm:
count
(
::
Clusters
::
Applications
::
Helm
.
available
),
clusters_applications_ingress:
count
(
::
Clusters
::
Applications
::
Ingress
.
available
),
clusters_applications_cert_managers:
count
(
::
Clusters
::
Applications
::
CertManager
.
available
),
clusters_applications_prometheus:
count
(
::
Clusters
::
Applications
::
Prometheus
.
available
),
clusters_applications_runner:
count
(
::
Clusters
::
Applications
::
Runner
.
available
),
clusters_applications_knative:
count
(
::
Clusters
::
Applications
::
Knative
.
available
),
in_review_folder:
count
(
::
Environment
.
in_review_folder
),
groups:
count
(
Group
),
issues:
count
(
Issue
),
...
...
spec/models/clusters/applications/helm_spec.rb
View file @
1ba3c45e
...
...
@@ -3,16 +3,17 @@ require 'rails_helper'
describe
Clusters
::
Applications
::
Helm
do
include_examples
'cluster application core specs'
,
:clusters_applications_helm
describe
'.
installed
'
do
subject
{
described_class
.
installed
}
describe
'.
available
'
do
subject
{
described_class
.
available
}
let!
(
:installed_cluster
)
{
create
(
:clusters_applications_helm
,
:installed
)
}
let!
(
:updated_cluster
)
{
create
(
:clusters_applications_helm
,
:updated
)
}
before
do
create
(
:clusters_applications_helm
,
:errored
)
end
it
{
is_expected
.
to
contain_exactly
(
installed_cluster
)
}
it
{
is_expected
.
to
contain_exactly
(
installed_cluster
,
updated_cluster
)
}
end
describe
'#issue_client_cert'
do
...
...
spec/models/clusters/applications/ingress_spec.rb
View file @
1ba3c45e
...
...
@@ -16,18 +16,6 @@ describe Clusters::Applications::Ingress do
allow
(
ClusterWaitForIngressIpAddressWorker
).
to
receive
(
:perform_async
)
end
describe
'.installed'
do
subject
{
described_class
.
installed
}
let!
(
:cluster
)
{
create
(
:clusters_applications_ingress
,
:installed
)
}
before
do
create
(
:clusters_applications_ingress
,
:errored
)
end
it
{
is_expected
.
to
contain_exactly
(
cluster
)
}
end
describe
'#make_installed!'
do
before
do
application
.
make_installed!
...
...
spec/models/clusters/applications/knative_spec.rb
View file @
1ba3c45e
...
...
@@ -24,30 +24,6 @@ describe Clusters::Applications::Knative do
it
{
expect
(
knative_no_rbac
).
to
be_not_installable
}
end
describe
'.installed'
do
subject
{
described_class
.
installed
}
let!
(
:cluster
)
{
create
(
:clusters_applications_knative
,
:installed
)
}
before
do
create
(
:clusters_applications_knative
,
:errored
)
end
it
{
is_expected
.
to
contain_exactly
(
cluster
)
}
end
describe
'#make_installed'
do
subject
{
described_class
.
installed
}
let!
(
:cluster
)
{
create
(
:clusters_applications_knative
,
:installed
)
}
before
do
create
(
:clusters_applications_knative
,
:errored
)
end
it
{
is_expected
.
to
contain_exactly
(
cluster
)
}
end
describe
'make_installed with external_ip'
do
before
do
application
.
make_installed!
...
...
spec/models/clusters/applications/prometheus_spec.rb
View file @
1ba3c45e
...
...
@@ -9,18 +9,6 @@ describe Clusters::Applications::Prometheus do
include_examples
'cluster application helm specs'
,
:clusters_applications_prometheus
include_examples
'cluster application initial status specs'
describe
'.installed'
do
subject
{
described_class
.
installed
}
let!
(
:cluster
)
{
create
(
:clusters_applications_prometheus
,
:installed
)
}
before
do
create
(
:clusters_applications_prometheus
,
:errored
)
end
it
{
is_expected
.
to
contain_exactly
(
cluster
)
}
end
describe
'transition to installed'
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:cluster
)
{
create
(
:cluster
,
:with_installed_helm
,
projects:
[
project
])
}
...
...
@@ -192,7 +180,7 @@ describe Clusters::Applications::Prometheus do
end
context
'with knative installed'
do
let
(
:knative
)
{
create
(
:clusters_applications_knative
,
:
install
ed
)
}
let
(
:knative
)
{
create
(
:clusters_applications_knative
,
:
updat
ed
)
}
let
(
:prometheus
)
{
create
(
:clusters_applications_prometheus
,
cluster:
knative
.
cluster
)
}
subject
{
prometheus
.
install_command
}
...
...
spec/models/clusters/applications/runner_spec.rb
View file @
1ba3c45e
...
...
@@ -11,18 +11,6 @@ describe Clusters::Applications::Runner do
it
{
is_expected
.
to
belong_to
(
:runner
)
}
describe
'.installed'
do
subject
{
described_class
.
installed
}
let!
(
:cluster
)
{
create
(
:clusters_applications_runner
,
:installed
)
}
before
do
create
(
:clusters_applications_runner
,
:errored
)
end
it
{
is_expected
.
to
contain_exactly
(
cluster
)
}
end
describe
'#install_command'
do
let
(
:kubeclient
)
{
double
(
'kubernetes client'
)
}
let
(
:gitlab_runner
)
{
create
(
:clusters_applications_runner
,
runner:
ci_runner
)
}
...
...
spec/support/shared_examples/models/cluster_application_status_shared_examples.rb
View file @
1ba3c45e
...
...
@@ -9,6 +9,19 @@ shared_examples 'cluster application status specs' do |application_name|
end
end
describe
'.available'
do
subject
{
described_class
.
available
}
let!
(
:installed_cluster
)
{
create
(
application_name
,
:installed
)
}
let!
(
:updated_cluster
)
{
create
(
application_name
,
:updated
)
}
before
do
create
(
application_name
,
:errored
)
end
it
{
is_expected
.
to
contain_exactly
(
installed_cluster
,
updated_cluster
)
}
end
describe
'status state machine'
do
describe
'#make_installing'
do
subject
{
create
(
application_name
,
:scheduled
)
}
...
...
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