Package: gitbugactions
GitBug-ActionsGitBug-Actions is a tool that builds bug-fix benchmarks by leveraging GitHub Actions.
The tool mines GitHub repositories and navigates through their commits, locally executing GitHub Actions usingactin each commit considered.
Finally, the tool checks if a bug-fix pattern was found by looking at the test results parsed from the GitHub Actions runs.
If a bug-fix is found, GitBug-Actions is able to export a Docker image with the reproducible environment for the bug-fix.
The reproducible environment will preserve all the dependencies required to run the tests for the bug-fix, avoiding the degradation of the benchmark due to dependencies that become unavailable.RequirementsActIt is required to haveactinstalled and functional.
At the moment, GitBug-Actions only works correctly with the modified version ofactavailablehere.
Other versions will work but some issues may arise.To install this version:git clone https://github.com/gitbugactions/act
cd act
make buildA binary filedist/local/actwill be created. This binary file should be made available in the$PATHof the system:export PATH="<REPLACE_WITH_PATH_TO_ACT>:$PATH"Python dependenciesGitBug-Actions runs on Python3.10 and above.Ensure Poetry isinstalled.Then, to install the Python dependencies run:poetry shell
poetry installHow to runEnsure the commands are executed inside the Poetry shell:poetry shellUse the--helpcommand to obtain the list of options required to run each script.python collect_repos.py --help
python collect_bugs.py --help
python export_bugs.py --help
python filter_bugs.py --helpThe figure above provides an overview of the pipeline of GitBug-Actions.The scripts above should be executed in the same order shown on the figure.collect_bugswill use the repositories found bycollect_reposas input.export_bugsuses the bug-fixes found bycollect_bugsas input.
Finally,filter_bugsuses the bug-fixes found bycollect_bugsand the containers exported byexport_bugsas input.
The output offilter_bugsis a file with a list of non-flaky bug-fixes able to be reproduced in the exported containers.TestsTo run the tests:pytest test -sPractical ChallengesWhile developing GitBug-Actions, we found some challenges of running CI builds at a large scale.
Here we enumerate these challenges and explain how we mitigate them and, in cases that was not possible,how the user should handle them.Handling Commits without GitHub ActionsOne challenge in collecting bug-fix commit pairs by reproducing GitHub Actions is that GitHub Actions were only released in late 2019.
Moreover, albeit being the most popular as of 2023, its adoption was not immediate.
As a result the majority of commits found on GitHub do not have any associated workflows.To increase the number of supported commits by GitBug-Actions, it identifies the oldest locally reproducible GitHub Action for each project.
Then, for commits not associated with GitHub Actions, GitBug-Actions uses these as an approximation of the intended configuration.Disk Space ManagementBuild execution has the potential to exhaust available disk space.
To mitigate this, we restrict each build's allocation to a maximum of 3GiB. This restriction is handled by our version ofact.
However, users are advised to check disk usage frequently and remove dangling docker containers/images in case they occur.Concurrent File AccessCI builds may initiate concurrent file access operations, a situation that can escalate to the point of surpassing the user-level open-file limit set by Linux.
This is exarcebated when running multiple builds in parallel.
To overcome this, we recommend setting the open-file limit for your user profile to a higher threshold than the default.To check the current limit for your user runulimit -Sn.ContributingPull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT