This repository contains worker for change-metrics:
lentille-bugzilla
- bugzilla task crawlerlentille-github
- github task crawlerlentille-gitlab
- gitlab MR crawlermacroscope
- a lentille runner
Contributions are very welcome! To get started, run:
# Install the toolchain, for example on fedora>=33:
dnf install -y ghc cabal-install zlib-devel git && cabal update
# Run the tests:
cabal test all
Make sure monocle is cloned in the parent directory:
git clone --recurse-submodules https://github.com/change-metrics/monocle ../monocle
Ensure to revert those changes before the merge of the Lentille PR.
In the .github/workflows/haskell.yml
ensure to set the Monocle checkout ref at the
right dependent PR.
Prior to run a crawler, you need to ensure that a crawler entry is defined in the Monocle configuration.
A CLI is available and the crawler can be run with the following command:
GITHUB_GRAPH_TOKEN=<gh-token> MONOCLE_API_KEY=<monocle-api-key> cabal run lentille-github -- \
--monocle-url <monocle-api-url> --index elastic --crawler-name gh-crawler --repo elastic/elasticsearch
Or using the container image:
podman run -e GITHUB_GRAPH_TOKEN=<gh-token> -e MONOCLE_API_KEY=<monocle-api-key> -it --rm \
quay.io/change-metrics/lentille /bin/lentille-github -h
Note that this crawler is based on the redhat-bugzilla library and it might not work as expected with regular BugZilla.
A CLI is available and the crawler can be run with the following command:
BZ_API_KEY=<bugzilla-api-key> MONOCLE_API_KEY=<monocle-api-key> cabal run lentille-bugzilla -- \
--monocle-url <monocle-url> --index openstack --crawler-name rhbz-crawler \
--bugzilla-product "Red Hat OpenStack"
Or using the container image:
podman run -e BZ_API_KEY=<bugzilla-api-key> -e MONOCLE_API_KEY=<monocle-api-key> -it --rm \
quay.io/change-metrics/lentille /bin/lentille-bugzilla -h
The Macroscope schedules the run of Lentille crawlers (only the GitLab crawler is supported at the moment).
podman run -it --rm --network host -v "$(pwd)"/etc:/etc/monocle:z quay.io/change-metrics/lentille \
/bin/macroscope --monocle-url http://localhost:8080 --config /etc/monocle/config.yaml --debug --interval 300
TMPDIR=/tmp podman build -f Containerfile -t quay.io/change-metrics/lentille .