Distribute GitHub import workload
What does this MR do and why?
- Contributes to #356794 (closed)
- Follow-up for !81026 (merged) (comment 862075168)
Add a feature flag to setup global GitHub importer limitations
Screenshots or screen recordings
To verify that it works, I've locally changed the limit to 1 job per minute to see the list of scheduled jobs.
How to reproduce
- Enable feature flag:
> Feature.enable(:distribute_github_parallel_import)
- Generate GitHub token
- Modify the code and change batch size to
1
- Restart Rails app
gdk restart rails-web
- Go to GitHub project import page (provide token from 2 step)
-
Open Sidekiq UI in a different browser window and select
Scheduled
tab - Return to import page and choose a non empty GitHub project with issues
- You should see that same types of jobs are scheduled with 1 minute delay (similarly to the screenshot above)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Vasilii Iakliushin