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
c7f93441
Commit
c7f93441
authored
Nov 28, 2017
by
James Lopez
Committed by
Nick Thomas
Nov 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix wiki retry count typo
parent
a50afe7c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
1 deletion
+22
-1
app/services/geo/wiki_sync_service.rb
app/services/geo/wiki_sync_service.rb
+1
-1
changelogs/unreleased-ee/fix-geo-wiki-error.yml
changelogs/unreleased-ee/fix-geo-wiki-error.yml
+5
-0
spec/services/geo/repository_sync_service_spec.rb
spec/services/geo/repository_sync_service_spec.rb
+8
-0
spec/services/geo/wiki_sync_service_spec.rb
spec/services/geo/wiki_sync_service_spec.rb
+8
-0
No files found.
app/services/geo/wiki_sync_service.rb
View file @
c7f93441
...
...
@@ -37,7 +37,7 @@ module Geo
rescue
Gitlab
::
Git
::
Repository
::
NoRepository
=>
e
log_error
(
'Invalid wiki'
,
e
)
registry
.
update
(
force_to_redownload_wiki:
true
,
repository
_retry_count:
retry_count
+
1
)
wiki
_retry_count:
retry_count
+
1
)
ensure
clean_up_temporary_repository
if
redownload
end
...
...
changelogs/unreleased-ee/fix-geo-wiki-error.yml
0 → 100644
View file @
c7f93441
---
title
:
Fix Geo wiki sync error not increasing retry count
merge_request
:
author
:
type
:
fixed
spec/services/geo/repository_sync_service_spec.rb
View file @
c7f93441
...
...
@@ -90,6 +90,14 @@ describe Geo::RepositorySyncService do
expect
{
subject
.
execute
}.
not_to
raise_error
end
it
'increases retry count when Gitlab::Git::Repository::NoRepository is raised'
do
allow
(
repository
).
to
receive
(
:fetch_as_mirror
).
with
(
url_to_repo
,
forced:
true
)
{
raise
Gitlab
::
Git
::
Repository
::
NoRepository
}
subject
.
execute
expect
(
Geo
::
ProjectRegistry
.
last
.
repository_retry_count
).
to
eq
(
1
)
end
context
'tracking database'
do
it
'creates a new registry if does not exists'
do
expect
{
subject
.
execute
}.
to
change
(
Geo
::
ProjectRegistry
,
:count
).
by
(
1
)
...
...
spec/services/geo/wiki_sync_service_spec.rb
View file @
c7f93441
...
...
@@ -71,6 +71,14 @@ RSpec.describe Geo::WikiSyncService do
expect
{
subject
.
execute
}.
not_to
raise_error
end
it
'increases retry count when Gitlab::Git::Repository::NoRepository is raised'
do
allow
(
repository
).
to
receive
(
:fetch_as_mirror
).
with
(
url_to_repo
,
forced:
true
)
{
raise
Gitlab
::
Git
::
Repository
::
NoRepository
}
subject
.
execute
expect
(
Geo
::
ProjectRegistry
.
last
.
wiki_retry_count
).
to
eq
(
1
)
end
context
'tracking database'
do
it
'creates a new registry if does not exists'
do
expect
{
subject
.
execute
}.
to
change
(
Geo
::
ProjectRegistry
,
:count
).
by
(
1
)
...
...
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