Skip to content

Latest commit

 

History

History
90 lines (64 loc) · 2.58 KB

README.md

File metadata and controls

90 lines (64 loc) · 2.58 KB

light-complex (3)

Welcome

This repository is used to demonstrate the performance characteristics of a merge graph under different simulated loads.

Usage

  1. Fork this repo
  2. Follow the instructions in the docs.trunk.io to set up a merge queue for your forked repo
  3. Go to the actions tab of your forked repo and enable running github actions
  4. In the actions tab, go to the PR Factory workflow and click on Run workflow on main. Note: this will run a 30 minute merge queue simulation, but you can also uncomment the cron job in .github/workflows/pr-factory.yaml to run the simulation indefinitely.
  5. Go back to app.trunk.io and witness the merge queue in action

How does it work

The load imparted onto the connected queue is controlled by the mq.toml file in the .config folder. The PR Factory workflow is set on a cron schedule to call mq which is then responsible for generating the pull requests and enqueueing them.

The configuration system allows for setting the desired load on the queue, the flake rate and the interdependence element of the pull requests.

# parallelqueue - will push deps information to the service to take advantage of trunk merge dynamic parallel queues
# singlequeue - single traditional queueu
mode = "singlequeue"

# Default value: "none"
#build = "none"

[git]
# Default value: "Jane Doe"
#name = "Jane Doe"

# Default value: "[email protected]"
#email = "[email protected]"

[pullrequest]
# Default value: ""
#labels = ""

# Default value: ""
#comment = ""

# Default value: "This pull request was generated by the 'mq' tool"
#body = "This pull request was generated by the 'mq' tool"

# Default value: 10
#requests_per_hour = 10

# Default value: 1
#max_deps = 1

# Default value: 1
#max_impacted_deps = 1

# Default value: 100 (create logical merge conflict every 100 PRs)
#logical_conflict_every = 100

# Default value: "logical-conflict.txt"
#logical_conflict_file = "logical-conflict.txt"

# Default value: ["removed from the merge queue", "To merge this pull request, check the box to the left"]
#detect_stale_pr_comments = ["removed from the merge queue", "To merge this pull request, check the box to the left"]

# Default value: "4 hours"
#close_stale_after = "4 hours"

[test]
# Default value: 0.1
#flake_rate = 0.1

# Default value: "1 second"
#sleep_for = "1 second"

[merge]
# Default value: ""
#labels = ""

# Default value: ""
#comment = ""