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
f7fe44c2
Commit
f7fe44c2
authored
Sep 23, 2019
by
Tetiana Chupryna
Committed by
Peter Leitzen
Sep 23, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Dependency List is not up-to-date - backend"
parent
704c35aa
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
1 deletion
+14
-1
ee/app/serializers/dependency_list_entity.rb
ee/app/serializers/dependency_list_entity.rb
+4
-0
ee/changelogs/unreleased/14705-dl-not-update-backend.yml
ee/changelogs/unreleased/14705-dl-not-update-backend.yml
+5
-0
ee/spec/fixtures/api/schemas/dependency_list.json
ee/spec/fixtures/api/schemas/dependency_list.json
+2
-1
ee/spec/serializers/dependency_list_entity_spec.rb
ee/spec/serializers/dependency_list_entity_spec.rb
+3
-0
No files found.
ee/app/serializers/dependency_list_entity.rb
View file @
f7fe44c2
...
...
@@ -14,6 +14,10 @@ class DependencyListEntity < Grape::Entity
expose
:job_path
,
if:
->
(
_
,
options
)
{
options
[
:build
]
&&
can_read_job_path?
}
do
|
_
,
options
|
project_build_path
(
project
,
options
[
:build
].
id
)
end
expose
:generated_at
,
if:
->
(
_
,
options
)
{
options
[
:build
]
&&
can_read_job_path?
}
do
|
_
,
options
|
options
[
:build
].
finished_at
end
end
private
...
...
ee/changelogs/unreleased/14705-dl-not-update-backend.yml
0 → 100644
View file @
f7fe44c2
---
title
:
Expose time when the build was generated
merge_request
:
17113
author
:
type
:
added
ee/spec/fixtures/api/schemas/dependency_list.json
View file @
f7fe44c2
...
...
@@ -13,7 +13,8 @@
},
"report"
:
{
"status"
:
{
"type"
:
"string"
},
"job_path"
:
{
"type"
:
"string"
}
"job_path"
:
{
"type"
:
"string"
},
"generated_at"
:
{
"type"
:
"string"
}
}
},
"additionalProperties"
:
false
...
...
ee/spec/serializers/dependency_list_entity_spec.rb
View file @
f7fe44c2
...
...
@@ -33,6 +33,7 @@ describe DependencyListEntity do
expect
(
subject
[
:dependencies
][
0
][
:name
]).
to
eq
(
'nokogiri'
)
expect
(
subject
[
:report
][
:status
]).
to
eq
(
:ok
)
expect
(
subject
[
:report
][
:job_path
]).
to
eq
(
job_path
)
expect
(
subject
[
:report
][
:generated_at
]).
to
eq
(
ci_build
.
finished_at
)
end
end
...
...
@@ -69,6 +70,7 @@ describe DependencyListEntity do
it
'has only status failed_job'
do
expect
(
subject
[
:report
][
:status
]).
to
eq
(
:job_failed
)
expect
(
subject
[
:report
]).
not_to
include
(
:job_path
)
expect
(
subject
[
:report
]).
not_to
include
(
:generated_at
)
end
end
end
...
...
@@ -81,6 +83,7 @@ describe DependencyListEntity do
it
'has status job_not_set_up and no job_path'
do
expect
(
subject
[
:report
][
:status
]).
to
eq
(
:job_not_set_up
)
expect
(
subject
[
:report
][
:job_path
]).
not_to
be_present
expect
(
subject
[
:report
][
:generated_at
]).
not_to
be_present
end
end
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