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
13886c07
Commit
13886c07
authored
Jun 26, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
54d3eaf1
06585944
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
9 deletions
+28
-9
app/assets/javascripts/clusters/services/application_state_machine.js
...avascripts/clusters/services/application_state_machine.js
+6
-0
app/services/projects/propagate_service_template.rb
app/services/projects/propagate_service_template.rb
+1
-1
changelogs/unreleased/sh-service-template-bug.yml
changelogs/unreleased/sh-service-template-bug.yml
+5
-0
spec/frontend/clusters/services/application_state_machine_spec.js
...ntend/clusters/services/application_state_machine_spec.js
+9
-7
spec/services/projects/propagate_service_template_spec.rb
spec/services/projects/propagate_service_template_spec.rb
+1
-1
spec/spec_helper.rb
spec/spec_helper.rb
+6
-0
No files found.
app/assets/javascripts/clusters/services/application_state_machine.js
View file @
13886c07
...
...
@@ -80,6 +80,9 @@ const applicationStateMachine = {
installFailed
:
false
,
},
},
[
NOT_INSTALLABLE
]:
{
target
:
NOT_INSTALLABLE
,
},
// This is possible in artificial environments for E2E testing
[
INSTALLED
]:
{
target
:
INSTALLED
,
...
...
@@ -108,6 +111,9 @@ const applicationStateMachine = {
updateSuccessful
:
false
,
},
},
[
NOT_INSTALLABLE
]:
{
target
:
NOT_INSTALLABLE
,
},
[
UNINSTALL_EVENT
]:
{
target
:
UNINSTALLING
,
effects
:
{
...
...
app/services/projects/propagate_service_template.rb
View file @
13886c07
...
...
@@ -24,7 +24,7 @@ module Projects
def
propagate_projects_with_template
loop
do
batch
=
project_ids_batch
batch
=
Project
.
uncached
{
project_ids_batch
}
bulk_create_from_template
(
batch
)
unless
batch
.
empty?
...
...
changelogs/unreleased/sh-service-template-bug.yml
0 → 100644
View file @
13886c07
---
title
:
Disable Rails SQL query cache when applying service templates
merge_request
:
30060
author
:
type
:
fixed
spec/frontend/clusters/services/application_state_machine_spec.js
View file @
13886c07
...
...
@@ -72,9 +72,10 @@ describe('applicationStateMachine', () => {
describe
(
`current state is
${
INSTALLABLE
}
`
,
()
=>
{
it
.
each
`
expectedState | event | effects
${
INSTALLING
}
|
${
INSTALL_EVENT
}
|
${{
installFailed
:
false
}
}
${
INSTALLED
}
|
${
INSTALLED
}
|
${
NO_EFFECTS
}
expectedState | event | effects
${
INSTALLING
}
|
${
INSTALL_EVENT
}
|
${{
installFailed
:
false
}
}
${
INSTALLED
}
|
${
INSTALLED
}
|
${
NO_EFFECTS
}
${
NOT_INSTALLABLE
}
|
${
NOT_INSTALLABLE
}
|
${
NO_EFFECTS
}
`
(
`transitions to $expectedState on $event event and applies $effects`
,
data
=>
{
const
{
expectedState
,
event
,
effects
}
=
data
;
const
currentAppState
=
{
...
...
@@ -108,9 +109,10 @@ describe('applicationStateMachine', () => {
describe
(
`current state is
${
INSTALLED
}
`
,
()
=>
{
it
.
each
`
expectedState | event | effects
${
UPDATING
}
|
${
UPDATE_EVENT
}
|
${{
updateFailed
:
false
,
updateSuccessful
:
false
}
}
${
UNINSTALLING
}
|
${
UNINSTALL_EVENT
}
|
${{
uninstallFailed
:
false
,
uninstallSuccessful
:
false
}
}
expectedState | event | effects
${
UPDATING
}
|
${
UPDATE_EVENT
}
|
${{
updateFailed
:
false
,
updateSuccessful
:
false
}
}
${
UNINSTALLING
}
|
${
UNINSTALL_EVENT
}
|
${{
uninstallFailed
:
false
,
uninstallSuccessful
:
false
}
}
${
NOT_INSTALLABLE
}
|
${
NOT_INSTALLABLE
}
|
${
NO_EFFECTS
}
`
(
`transitions to $expectedState on $event event and applies $effects`
,
data
=>
{
const
{
expectedState
,
event
,
effects
}
=
data
;
const
currentAppState
=
{
...
...
@@ -119,7 +121,7 @@ describe('applicationStateMachine', () => {
expect
(
transitionApplicationState
(
currentAppState
,
event
)).
toEqual
({
status
:
expectedState
,
...
effects
,
...
noEffectsToEmptyObject
(
effects
)
,
});
});
});
...
...
spec/services/projects/propagate_service_template_spec.rb
View file @
13886c07
...
...
@@ -72,7 +72,7 @@ describe Projects::PropagateServiceTemplate do
expect
(
project
.
pushover_service
.
properties
).
to
eq
(
service_template
.
properties
)
end
describe
'bulk update'
do
describe
'bulk update'
,
:use_sql_query_cache
do
let
(
:project_total
)
{
5
}
before
do
...
...
spec/spec_helper.rb
View file @
13886c07
...
...
@@ -220,6 +220,12 @@ RSpec.configure do |config|
ActionController
::
Base
.
cache_store
=
caching_store
end
config
.
around
(
:each
,
:use_sql_query_cache
)
do
|
example
|
ActiveRecord
::
Base
.
cache
do
example
.
run
end
end
# The :each scope runs "inside" the example, so this hook ensures the DB is in the
# correct state before any examples' before hooks are called. This prevents a
# problem where `ScheduleIssuesClosedAtTypeChange` (or any migration that depends
...
...
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