Geo: Make selective replication work right
What does this MR do?
Check if a secondary node with project restrictions can process hooks for specific projects ids.
Are there points in the code the reviewer needs to double check?
No.
Why was this MR needed?
Otherwise, we'll just end up pulling those repositories anyway.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #3131 (closed)
Merge request reports
Activity
added 1 commit
- bc4635d2 - Check if a wiki can be updated on a node with project restrictions
added 1 commit
- 799c27b3 - Add specs for Geo::ScheduleWikiRepoUpdateService
@smcgivern Can you have a look, please?
assigned to @smcgivern
marked the checklist item Conform by the merge request performance guides as completed
marked the checklist item Conform by the style guides as completed
added 1 commit
- 907d35e7 - Add specs for API::Geo when node has namespace restrictions
added 1 commit
- 907d35e7 - Add specs for API::Geo when node has namespace restrictions
added 1 commit
- 691af412 - Cast params[:project_id] to FixNum before checking
@dbalexandre Nice solution!
I hope we can remove all this logic when we remove system hooks, though, but this will be very useful for testing Geo in 9.5. :)
- Resolved by username-removed-283999
@dbalexandre LGTM, one suggestion - if @stanhu's comment means this won't be an issue soon anyway, feel free to tell me
assigned to @dbalexandre
added 1 commit
- 18ab996f - Refactoring Geo::ScheduleWikiRepoUpdateService
added 1 commit
- 6fc93454 - Refactoring Api::Geo#check_node_restricted_project_ids!
added 1 commit
- a5e9840a - Refactoring Gitlab::Geo::LogCursor::Daemon#can_replay?
assigned to @smcgivern
@dbalexandre looks good, thanks!
enabled an automatic merge when the pipeline for a5e9840a succeeds
mentioned in commit f1181394
removed Pick into Stable label
mentioned in commit b67e903f
mentioned in commit f762b632