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
7ed88253
Commit
7ed88253
authored
Nov 24, 2021
by
john.mcdonnell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve handling of non JSON output
parent
501475b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
qa/qa/service/praefect_manager.rb
qa/qa/service/praefect_manager.rb
+4
-9
No files found.
qa/qa/service/praefect_manager.rb
View file @
7ed88253
...
...
@@ -386,20 +386,15 @@ module QA
def
list_untracked_repositories
untracked_repositories
=
[]
shell
"docker exec
#{
@praefect
}
bash -c 'gitlab-ctl praefect list-untracked-repositories'"
do
|
line
|
# Results look like this depending on whether untracked items found or not
# Running list-untracked-repositories
# Done.
# Running list-untracked-repositories
# Results look like this
# The following repositories were found on disk, but missing from the tracking database:
# {"relative_path":"@hashed/aa/bb.git","storage":"gitaly1","virtual_storage":"default"}
# {"relative_path":"@hashed/bb/cc.git","storage":"gitaly3","virtual_storage":"default"}
# Done.
QA
::
Runtime
::
Logger
.
debug
(
line
.
chomp
)
next
if
line
.
start_with?
(
'Running list-untracked-repositories'
)
next
if
line
.
start_with?
(
'Done.'
)
untracked_repositories
.
append
(
JSON
.
parse
(
line
))
rescue
JSON
::
ParserError
# Ignore lines that can't be parsed as JSON
end
QA
::
Runtime
::
Logger
.
debug
(
"list_untracked_repositories ---
#{
untracked_repositories
}
"
)
...
...
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