Add fetching of git/hg repositories
Review Request #9502 — Created Jan. 20, 2018 and submitted
If there are a lot of Review Bot worker it will be
very expensive to maintain a repository configuration
manually. Since a reviewboard instance already knows
the configuration it is now be possible to configure
multiple reviewboard instances and let the Review Bot
fetch git and hg repositories automatically.If a repository has a "path" or "mirror_path" that
can be access locally or has a scheme starting with
"http" or "git" it will be added to known repository.
Added some repositories in reviewboard with path
and mirror_path. Some with non-existing local path
and mirror_path with "http" scheme.Saw that the Review Bot finds all accessible
repositories are added correctly.Tested with and without authentication.
Description | From | Last Updated |
---|---|---|
In your description and testing done, "ReviewBot" -> "Review Bot" |
david | |
W503 line break before binary operator |
reviewbot | |
TODO: needs to paginate here |
misery | |
Can we call this review_board_servers? |
david | |
Should be "Review Board" |
david | |
Same here. |
david | |
Let's say: If you have many workers and repositories, it may not be feasible to configure repositories by hand. You … |
david | |
How about "Automatically Fetch Repositories From Review Board" |
david | |
useable -> usable |
david | |
reviewboard -> Review Board server. |
david | |
Let's rewrite this to say: The repository path or mirror_path field must be the URL of a repository which is … |
david | |
Please add an "Args" section to this docstring. |
david | |
This should say tasks.py rather than celery.py |
david | |
Indent this one more space. |
david | |
Maybe switch the success/error cases here? |
david | |
Typo: useable -> usable |
david | |
Please add an "Args" section to this docstring. |
david | |
I'd rather keep this explicitly as "git" and not introduce the case insensitivity. |
david | |
Can be repo_type in ('hg', 'mercurial') (and probably should keep everything lower case) |
david | |
Can we call this fetch_repositories? |
brennie | |
url is missing. |
brennie | |
Instead of constructing a list, you can use a tuple here. |
brennie | |
Same here re: tuples vs lists. |
brennie | |
There might be ssh:// URLs too? If it isn't a file path, should we parse path and check (a) it … |
brennie | |
No blank line here. |
brennie | |
HTTP Technically, it could also be exposed over SSH, no? |
brennie |
- Commit:
-
63f565684065895ddcce97398813dad0af81f6b4b85cd6709c9e4dcf7bed1787e603b696d5340648
Checks run (2 succeeded)
- Change Summary:
-
rebase
- Branch:
-
masterrelease-1.0.x
- Commit:
-
b85cd6709c9e4dcf7bed1787e603b696d534064892568a9b7eb2830f955e80b6547c09a8db4c49d1
Checks run (2 succeeded)
- Description:
-
~ If there are a lof of ReviewBot worker it will be
~ If there are a lot of ReviewBot worker it will be
very expensive to maintain a repository configuration manually. Since a reviewboard instance already knows the configuration it is now be possible to configure multiple reviewboard instances and let the ReviewBot fetch git and hg repositories automatically. If a repository has a "path" or "mirror_path" that
can be access locally or has a scheme starting with "http" or "git" it will be added to known repository.
- Commit:
-
92568a9b7eb2830f955e80b6547c09a8db4c49d15b01f073dcc5d8767db22b5a0f5d24d200923028
Checks run (2 succeeded)
-
-
-
-
-
Let's say:
If you have many workers and repositories, it may not be feasible to configure repositories by hand. You can also configure a list of Review Board servers to fetch all supported repositories from.
-
-
-
-
Let's rewrite this to say:
The repository
path
ormirror_path
field must be the URL of a repository which is accessible to the Review Bot worker. If you use a local file path for your repository and the worker is not running on the same host as the Review Board server, you must also expose the repository over http and set themirror_path
.This should probably also be a separate paragraph from the "manually configured repositories will override"
- Commit:
-
5b01f073dcc5d8767db22b5a0f5d24d200923028e903411cf6b91f3b3a6636ba57928e27f32b597f
Checks run (2 succeeded)
- Description:
-
~ If there are a lot of ReviewBot worker it will be
~ If there are a lot of Review Bot worker it will be
very expensive to maintain a repository configuration manually. Since a reviewboard instance already knows the configuration it is now be possible to configure ~ multiple reviewboard instances and let the ReviewBot ~ multiple reviewboard instances and let the Review Bot fetch git and hg repositories automatically. If a repository has a "path" or "mirror_path" that
can be access locally or has a scheme starting with "http" or "git" it will be added to known repository. - Testing Done:
-
Added some repositories in reviewboard with path
and mirror_path. Some with non-existing local path and mirror_path with "http" scheme. ~ Saw that the ReviewBot finds all accessible
~ Saw that the Review Bot finds all accessible
repositories are added correctly. Tested with and without authentication.
- Commit:
-
e903411cf6b91f3b3a6636ba57928e27f32b597f28d08f628a21ee0542ef4d0279ac4151747390ee
Checks run (2 succeeded)
- Commit:
-
28d08f628a21ee0542ef4d0279ac4151747390ee8a0700ecc04219df1dfc99a8d1b9edbee8885ffd