Skip to content

Distribute GitHub import workload

What does this MR do and why?

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.

Screenshot_2022-04-04_at_14.35.42

How to reproduce

  1. Enable feature flag: > Feature.enable(:distribute_github_parallel_import)
  2. Generate GitHub token
  3. Modify the code and change batch size to 1
  4. Restart Rails app gdk restart rails-web
  5. Go to GitHub project import page (provide token from 2 step)
  6. Open Sidekiq UI in a different browser window and select Scheduled tab
  7. Return to import page and choose a non empty GitHub project with issues
  8. 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.

Edited by Vasilii Iakliushin

Merge request reports

Loading