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
bd88b80a
Commit
bd88b80a
authored
Sep 01, 2020
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab master
parents
ca241308
1e0ff62a
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
58 additions
and
96 deletions
+58
-96
.gitlab/issue_templates/actionable_insight.md
.gitlab/issue_templates/actionable_insight.md
+2
-2
GITLAB_WORKHORSE_VERSION
GITLAB_WORKHORSE_VERSION
+1
-1
app/assets/javascripts/lib/utils/url_utility.js
app/assets/javascripts/lib/utils/url_utility.js
+18
-3
changelogs/unreleased/workhorse-8-44-0.yml
changelogs/unreleased/workhorse-8-44-0.yml
+5
-0
qa/qa/specs/features/browser_ui/8_monitor/cluster_with_prometheus.rb
.../features/browser_ui/8_monitor/cluster_with_prometheus.rb
+2
-12
qa/qa/specs/features/ee/browser_ui/8_monitor/all_monitor_features_spec.rb
...ures/ee/browser_ui/8_monitor/all_monitor_features_spec.rb
+1
-1
qa/qa/specs/features/ee/browser_ui/8_monitor/cluster_with_prometheus.rb
...atures/ee/browser_ui/8_monitor/cluster_with_prometheus.rb
+0
-77
spec/frontend/lib/utils/url_utility_spec.js
spec/frontend/lib/utils/url_utility_spec.js
+29
-0
No files found.
.gitlab/issue_templates/actionable_insight.md
View file @
bd88b80a
...
...
@@ -12,7 +12,7 @@ Actionable insights always have a follow-up action that needs to take place as a
#### Description
-
[ ] Provide some brief det
ia
ls on the actionable insight and the action to take
-
[ ] Provide some brief det
ai
ls on the actionable insight and the action to take
-------------------------------------------------------------------------------
...
...
@@ -28,4 +28,4 @@ Actionable insights always have a follow-up action that needs to take place as a
~"Actionable Insight"
/label
~"Actionable Insight"
GITLAB_WORKHORSE_VERSION
View file @
bd88b80a
8.4
2.1
8.4
4.0
app/assets/javascripts/lib/utils/url_utility.js
View file @
bd88b80a
...
...
@@ -334,17 +334,32 @@ export function getWebSocketUrl(path) {
* Convert search query into an object
*
* @param {String} query from "document.location.search"
* @param {Object} options
* @param {Boolean} options.gatherArrays - gather array values into an Array
* @returns {Object}
*
* ex: "?one=1&two=2" into {one: 1, two: 2}
*/
export
function
queryToObject
(
query
)
{
export
function
queryToObject
(
query
,
options
=
{})
{
const
{
gatherArrays
=
false
}
=
options
;
const
removeQuestionMarkFromQuery
=
String
(
query
).
startsWith
(
'
?
'
)
?
query
.
slice
(
1
)
:
query
;
return
removeQuestionMarkFromQuery
.
split
(
'
&
'
).
reduce
((
accumulator
,
curr
)
=>
{
const
[
key
,
value
]
=
curr
.
split
(
'
=
'
);
if
(
value
!==
undefined
)
{
accumulator
[
decodeURIComponent
(
key
)]
=
decodeURIComponent
(
value
);
if
(
value
===
undefined
)
{
return
accumulator
;
}
const
decodedValue
=
decodeURIComponent
(
value
);
if
(
gatherArrays
&&
key
.
endsWith
(
'
[]
'
))
{
const
decodedKey
=
decodeURIComponent
(
key
.
slice
(
0
,
-
2
));
if
(
!
Array
.
isArray
(
accumulator
[
decodedKey
]))
{
accumulator
[
decodedKey
]
=
[];
}
accumulator
[
decodedKey
].
push
(
decodedValue
);
}
else
{
accumulator
[
decodeURIComponent
(
key
)]
=
decodedValue
;
}
return
accumulator
;
},
{});
}
...
...
changelogs/unreleased/workhorse-8-44-0.yml
0 → 100644
View file @
bd88b80a
---
title
:
Update Workhorse to v8.44.0
merge_request
:
40970
author
:
type
:
other
qa/qa/specs/features/browser_ui/8_monitor/cluster_with_prometheus.rb
View file @
bd88b80a
# frozen_string_literal: true
module
QA
RSpec
.
configure
do
|
rspec
|
# This config option will be enabled by default on RSpec 4,
# but for reasons of backwards compatibility, you have to
# set it on RSpec 3.
#
# It causes the host group and examples to inherit metadata
# from the shared context.
rspec
.
shared_context_metadata_behavior
=
:apply_to_host_groups
end
RSpec
.
shared_context
"cluster with Prometheus installed"
,
shared_context: :metadata
do
RSpec
.
shared_context
"cluster with Prometheus installed"
do
before
:all
do
@cluster
=
Service
::
KubernetesCluster
.
new
(
provider_class:
Service
::
ClusterProvider
::
K3s
).
create!
@project
=
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
...
...
@@ -71,7 +61,7 @@ module QA
end
after
:all
do
@cluster
.
remove!
@cluster
&
.
remove!
end
end
end
qa/qa/specs/features/ee/browser_ui/8_monitor/all_monitor_features_spec.rb
View file @
bd88b80a
# frozen_string_literal: true
require
'pathname'
require_relative
'cluster_with_prometheus.rb'
require_relative
'
../../../browser_ui/8_monitor/
cluster_with_prometheus.rb'
module
QA
RSpec
.
describe
'Monitor'
,
:orchestrated
,
:kubernetes
,
:requires_admin
,
quarantine:
{
issue:
'https://gitlab.com/gitlab-org/gitlab/-/issues/241448'
,
type: :investigating
}
do
...
...
qa/qa/specs/features/ee/browser_ui/8_monitor/cluster_with_prometheus.rb
deleted
100644 → 0
View file @
ca241308
# frozen_string_literal: true
#
module
QA
RSpec
.
configure
do
|
rspec
|
# This config option will be enabled by default on RSpec 4,
# but for reasons of backwards compatibility, you have to
# set it on RSpec 3.
#
# It causes the host group and examples to inherit metadata
# from the shared context.
rspec
.
shared_context_metadata_behavior
=
:apply_to_host_groups
end
RSpec
.
shared_context
"cluster with Prometheus installed"
,
shared_context: :metadata
,
quarantine:
{
issue:
'https://gitlab.com/gitlab-org/gitlab/-/issues/241546'
,
type: :investigating
}
do
before
:all
do
@cluster
=
Service
::
KubernetesCluster
.
new
(
provider_class:
Service
::
ClusterProvider
::
K3s
).
create!
@project
=
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
project
.
name
=
'monitoring-project'
project
.
auto_devops_enabled
=
true
project
.
template_name
=
'express'
end
deploy_project_with_prometheus
end
def
deploy_project_with_prometheus
%w[
CODE_QUALITY_DISABLED TEST_DISABLED LICENSE_MANAGEMENT_DISABLED
SAST_DISABLED DAST_DISABLED DEPENDENCY_SCANNING_DISABLED
CONTAINER_SCANNING_DISABLED PERFORMANCE_DISABLED SECRET_DETECTION_DISABLED
]
.
each
do
|
key
|
Resource
::
CiVariable
.
fabricate_via_api!
do
|
resource
|
resource
.
project
=
@project
resource
.
key
=
key
resource
.
value
=
'1'
resource
.
masked
=
false
end
end
Flow
::
Login
.
sign_in
Resource
::
KubernetesCluster
::
ProjectCluster
.
fabricate!
do
|
cluster_settings
|
cluster_settings
.
project
=
@project
cluster_settings
.
cluster
=
@cluster
cluster_settings
.
install_runner
=
true
cluster_settings
.
install_ingress
=
true
cluster_settings
.
install_prometheus
=
true
end
Resource
::
Pipeline
.
fabricate_via_api!
do
|
pipeline
|
pipeline
.
project
=
@project
end
.
visit!
Page
::
Project
::
Pipeline
::
Show
.
perform
do
|
pipeline
|
pipeline
.
click_job
(
'build'
)
end
Page
::
Project
::
Job
::
Show
.
perform
do
|
job
|
expect
(
job
).
to
be_successful
(
timeout:
600
)
job
.
click_element
(
:pipeline_path
)
end
Page
::
Project
::
Pipeline
::
Show
.
perform
do
|
pipeline
|
pipeline
.
click_job
(
'production'
)
end
Page
::
Project
::
Job
::
Show
.
perform
do
|
job
|
expect
(
job
).
to
be_successful
(
timeout:
1200
)
job
.
click_element
(
:pipeline_path
)
end
end
after
:all
do
@cluster
.
remove!
end
end
end
spec/frontend/lib/utils/url_utility_spec.js
View file @
bd88b80a
...
...
@@ -616,6 +616,35 @@ describe('URL utility', () => {
expect
(
urlUtils
.
queryToObject
(
searchQuery
)).
toEqual
({
one
:
'
1
'
,
two
:
'
2
'
});
});
describe
(
'
with gatherArrays=false
'
,
()
=>
{
it
(
'
overwrites values with the same array-key and does not change the key
'
,
()
=>
{
const
searchQuery
=
'
?one[]=1&one[]=2&two=2&two=3
'
;
expect
(
urlUtils
.
queryToObject
(
searchQuery
)).
toEqual
({
'
one[]
'
:
'
2
'
,
two
:
'
3
'
});
});
});
describe
(
'
with gatherArrays=true
'
,
()
=>
{
const
options
=
{
gatherArrays
:
true
};
it
(
'
gathers only values with the same array-key and strips `[]` from the key
'
,
()
=>
{
const
searchQuery
=
'
?one[]=1&one[]=2&two=2&two=3
'
;
expect
(
urlUtils
.
queryToObject
(
searchQuery
,
options
)).
toEqual
({
one
:
[
'
1
'
,
'
2
'
],
two
:
'
3
'
});
});
it
(
'
overwrites values with the same array-key name
'
,
()
=>
{
const
searchQuery
=
'
?one=1&one[]=2&two=2&two=3
'
;
expect
(
urlUtils
.
queryToObject
(
searchQuery
,
options
)).
toEqual
({
one
:
[
'
2
'
],
two
:
'
3
'
});
});
it
(
'
overwrites values with the same key name
'
,
()
=>
{
const
searchQuery
=
'
?one[]=1&one=2&two=2&two=3
'
;
expect
(
urlUtils
.
queryToObject
(
searchQuery
,
options
)).
toEqual
({
one
:
'
2
'
,
two
:
'
3
'
});
});
});
});
describe
(
'
objectToQuery
'
,
()
=>
{
...
...
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