Skip to content
Snippets Groups Projects

Add CI remote include parallelization

Merged Furkan Ayhan requested to merge 351250-parallelize-ci-remote-includes into master

What does this MR do and why?

Related to #351250 (closed)

In preload_content, we start executing the HTTP call in another thread. Then, when the content method is called, we wait for the HTTP response.

:exclamation: This is the first step. In the next step, we'll work on limiting the max number of parallel HTTP calls in a single-user call.

These changes are behind the FF ci_parallel_remote_includes (#413770 (closed))

How to set up and validate locally

  1. Enable the feature flag;
    Feature.enable(:ci_parallel_remote_includes)
  2. Run a basic web server to test slow includes.
    require 'rack'
    
    def run(env)
      puts "URL: #{env['REQUEST_URI']} started"
      sleep 3
      puts "URL: #{env['REQUEST_URI']} finished"
      "
      test:
        script: echo 'hello world'
      "
    end
    
    app = Proc.new do |env|
      [
        200,
        { "Content-Type" => "text/x-yaml" },
        [run(env)]
      ]
    end
    
    Rack::Server.start(app: app, Port: 9292)
  3. Enable local includes on the Admin page http://gdk.test:3000/admin/application_settings/network Screenshot_2023-06-01_at_09.37.52
  4. Use a basic CI config;
    include:
      - remote: http://0.0.0.0:9292/file1.yml
      - remote: http://0.0.0.0:9292/file2.yml
      - remote: http://0.0.0.0:9292/file3.yml
      - remote: http://0.0.0.0:9292/file4.yml
      - remote: http://0.0.0.0:9292/file5.yml
    
    build:
      script: exit 0
  5. Result; MIerMD5e4W

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 Furkan Ayhan

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Ghost User
  • 1 Message
    :book: CHANGELOG missing:

    If this merge request needs a changelog entry, add the Changelog trailer to the commit message you want to add to the changelog.

    If this merge request doesn't need a CHANGELOG entry, feel free to ignore this message.

    Reviewer roulette

    Changes that require review have been detected!

    Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:

    Category Reviewer Maintainer
    backend @wandering_person profile link current availability (UTC+8, 7 hours ahead of author) @pedropombeiro profile link current availability (UTC+1, same timezone as author)
    ~"Verify" Reviewer review is optional for ~"Verify" @drew profile link current availability (UTC+0, 1 hour behind author)

    Please check reviewer's status!

    • available Reviewer is available!
    • unavailable Reviewer is unavailable!

    Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.

    To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.

    Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.

    If needed, you can retry the :repeat: danger-review job that generated this comment.

    Generated by :no_entry_sign: Danger

    Edited by Ghost User
  • Allure report

    allure-report-publisher generated test report!

    e2e-test-on-gdk: :white_check_mark: test report for be08ea0e

    expand test summary
    +-----------------------------------------------------------------------+
    |                            suites summary                             |
    +------------------+--------+--------+---------+-------+-------+--------+
    |                  | passed | failed | skipped | flaky | total | result |
    +------------------+--------+--------+---------+-------+-------+--------+
    | Create           | 40     | 0      | 7       | 0     | 47    | ✅     |
    | Manage           | 0      | 0      | 1       | 0     | 1     | ➖     |
    | Plan             | 55     | 0      | 0       | 0     | 55    | ✅     |
    | Govern           | 57     | 0      | 0       | 0     | 57    | ✅     |
    | Monitor          | 8      | 0      | 0       | 0     | 8     | ✅     |
    | Package          | 0      | 0      | 1       | 0     | 1     | ➖     |
    | Data Stores      | 22     | 0      | 0       | 0     | 22    | ✅     |
    | Framework sanity | 0      | 0      | 1       | 0     | 1     | ➖     |
    | Verify           | 32     | 0      | 0       | 0     | 32    | ✅     |
    +------------------+--------+--------+---------+-------+-------+--------+
    | Total            | 214    | 0      | 10      | 0     | 224   | ✅     |
    +------------------+--------+--------+---------+-------+-------+--------+

    e2e-package-and-test: :white_check_mark: test report for be08ea0e

    expand test summary
    +-------------------------------------------------------------+
    |                       suites summary                        |
    +--------+--------+--------+---------+-------+-------+--------+
    |        | passed | failed | skipped | flaky | total | result |
    +--------+--------+--------+---------+-------+-------+--------+
    | Verify | 92     | 0      | 18      | 0     | 110   | ✅     |
    +--------+--------+--------+---------+-------+-------+--------+
    | Total  | 92     | 0      | 18      | 0     | 110   | ✅     |
    +--------+--------+--------+---------+-------+-------+--------+
    Edited by Ghost User
  • Furkan Ayhan added 1 commit

    added 1 commit

    • 5c227ed9 - Add FF info and fix a Rubocop failure

    Compare with previous version

  • Furkan Ayhan changed the description

    changed the description

  • Furkan Ayhan marked the checklist item I have evaluated the MR acceptance checklist for this MR. as completed

    marked the checklist item I have evaluated the MR acceptance checklist for this MR. as completed

  • Furkan Ayhan resolved all threads

    resolved all threads

  • @ayufan And, here is the result of all the work done :tada:

    In the next step, we'll work on limiting the max number of parallel HTTP calls in a single-user call because right now a single pipeline lint/create request can try to send 150 parallel HTTP requests.

  • Furkan Ayhan requested review from @ayufan

    requested review from @ayufan

  • mentioned in issue #351250 (closed)

  • Kamil Trzciński removed review request for @ayufan

    removed review request for @ayufan

  • Furkan Ayhan requested review from @ayufan

    requested review from @ayufan

  • Furkan Ayhan added 712 commits

    added 712 commits

    Compare with previous version

  • Furkan Ayhan added 247 commits

    added 247 commits

    • c502a029...f9fbb409 - 243 commits from branch master
    • 7cabc3f6 - Add CI remote include parallelization
    • 9b7e65fd - Add FF info and fix a Rubocop failure
    • 3ef176f1 - Remove metric config_file_fetch_remote_content
    • 77c842a9 - Remove preload_content from content

    Compare with previous version

  • Furkan Ayhan added 177 commits

    added 177 commits

    Compare with previous version

  • Kamil Trzciński resolved all threads

    resolved all threads

  • Kamil Trzciński approved this merge request

    approved this merge request

  • Kamil Trzciński resolved all threads

    resolved all threads

  • Kamil Trzciński enabled an automatic merge when the pipeline for 92e5212c succeeds

    enabled an automatic merge when the pipeline for 92e5212c succeeds

  • Kamil Trzciński mentioned in commit d3f4ac1a

    mentioned in commit d3f4ac1a

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading