This repository is used to demonstrate the performance characteristics of a merge graph under
different simulated loads.
Usage
Fork this repo
Follow the instructions in the
docs.trunk.io to set up a merge queue for
your forked repo
Go to the actions tab of your forked repo and enable running github actions
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.
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: "bot@email.com"
#email = "bot@email.com"
[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 = ""
Welcome
This repository is used to demonstrate the performance characteristics of a merge graph under different simulated loads.
Usage
PR Factoryworkflow and click onRun workflowonmain. Note: this will run a 30 minute merge queue simulation, but you can also uncomment the cron job in.github/workflows/pr-factory.yamlto run the simulation indefinitely.How does it work
The load imparted onto the connected queue is controlled by the
mq.tomlfile in the .config folder. The PR Factory workflow is set on a cron schedule to callmqwhich 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.