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
2c4ffdd3
Commit
2c4ffdd3
authored
Aug 12, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
80705e3a
832824f4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
app/services/projects/update_service.rb
app/services/projects/update_service.rb
+1
-1
changelogs/unreleased/alipniagov-fix-wiki_can_not_be_created_total-counter.yml
.../alipniagov-fix-wiki_can_not_be_created_total-counter.yml
+5
-0
spec/services/projects/update_service_spec.rb
spec/services/projects/update_service_spec.rb
+4
-1
No files found.
app/services/projects/update_service.rb
View file @
2c4ffdd3
...
@@ -122,7 +122,7 @@ module Projects
...
@@ -122,7 +122,7 @@ module Projects
ProjectWiki
.
new
(
project
,
project
.
owner
).
wiki
ProjectWiki
.
new
(
project
,
project
.
owner
).
wiki
rescue
ProjectWiki
::
CouldNotCreateWikiError
rescue
ProjectWiki
::
CouldNotCreateWikiError
log_error
(
"Could not create wiki for
#{
project
.
full_name
}
"
)
log_error
(
"Could not create wiki for
#{
project
.
full_name
}
"
)
Gitlab
::
Metrics
.
counter
(
:wiki_can_not_be_created_total
,
'Counts the times we failed to create a wiki'
)
Gitlab
::
Metrics
.
counter
(
:wiki_can_not_be_created_total
,
'Counts the times we failed to create a wiki'
)
.
increment
end
end
def
update_pages_config
def
update_pages_config
...
...
changelogs/unreleased/alipniagov-fix-wiki_can_not_be_created_total-counter.yml
0 → 100644
View file @
2c4ffdd3
---
title
:
Fix :wiki_can_not_be_created_total counter
merge_request
:
31673
author
:
type
:
fixed
spec/services/projects/update_service_spec.rb
View file @
2c4ffdd3
...
@@ -186,7 +186,10 @@ describe Projects::UpdateService do
...
@@ -186,7 +186,10 @@ describe Projects::UpdateService do
expect_any_instance_of
(
ProjectWiki
).
to
receive
(
:wiki
).
and_raise
(
ProjectWiki
::
CouldNotCreateWikiError
)
expect_any_instance_of
(
ProjectWiki
).
to
receive
(
:wiki
).
and_raise
(
ProjectWiki
::
CouldNotCreateWikiError
)
expect_any_instance_of
(
described_class
).
to
receive
(
:log_error
).
with
(
"Could not create wiki for
#{
project
.
full_name
}
"
)
expect_any_instance_of
(
described_class
).
to
receive
(
:log_error
).
with
(
"Could not create wiki for
#{
project
.
full_name
}
"
)
expect
(
Gitlab
::
Metrics
).
to
receive
(
:counter
)
counter
=
double
(
:counter
)
expect
(
Gitlab
::
Metrics
).
to
receive
(
:counter
).
with
(
:wiki_can_not_be_created_total
,
'Counts the times we failed to create a wiki'
).
and_return
(
counter
)
expect
(
counter
).
to
receive
(
:increment
)
update_project
(
project
,
user
,
project_feature_attributes:
{
wiki_access_level:
ProjectFeature
::
ENABLED
})
update_project
(
project
,
user
,
project_feature_attributes:
{
wiki_access_level:
ProjectFeature
::
ENABLED
})
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