gitlab-ci-pipelines-exporter
gitlab-ci-pipelines-exporter copied to clipboard
Using max_age_seconds or most_recent isn't accurate
log:
level: trace
server:
# [address:port] to make the process listen
# upon (optional, default: :8080)
listen_address: :9070
# URL and Token with sufficient permissions to access
# your GitLab's projects pipelines informations (optional)
# The list of the projects you want to monitor (optional)
projects:
- # Name of the project (actually path with namespace) to fetch
# (required)
name: project-name
pull:
refs:
tags:
enabled: false
most_recent: 20
branches:
regexp: ".*"
most_recent: 50
#max_age_seconds: 604800
pipeline:
jobs:
enabled: true
When I use the above configuration it does select about 50 branches but not the most recent ones ( I noticed you use the pipeline api and ones that do have a pipeline and more recent don't show). In fact it looks like it goes back a year for branches. It however does pull master.
If I uncomment the max_age_seconds it reduces it like expected. But if I comment out most_recent and use max_age_seconds it only shows 3 branches when there should be dozens.
I've also manually checked my token to ensure proper privileges by using curl to hit the api and it does list branches as expected.
One final note, When just using regexp, it appears to select all branches (over 1k). So it does appear at least some of the api calls work.
If there are >10000k results on gitlab.com, this is mabye fixed by #339. Which version are you using and did you try :latest?
If there are >10000k results on gitlab.com, this is mabye fixed by #339. Which version are you using and did you try :latest?
I just tried :latest and that doesn't appear to have worked.
i have also used this config,and version 0.5.3, but i don’t have the latest data,this is my config, how can i modify this ? projects:
-
name: devops/vms
pull: refs: tags: enabled: false most_recent: 10 branches: regexp: ".*" most_recent: 10 #max_age_seconds: 604800
pipeline: jobs: enabled: true
This still seems to be a problem
This issue still persists, for helm chart version: "0.3.1" and the appVersion: v0.5.5 - in our case we try to pull metrics for 10 most recent pipelines from merge requests,
Here is the configuration;
pull:
refs_from_projects:
on_init: true
scheduled: true
interval_seconds: 300
projects:
- name: NAME_OF_THE_PROJCT
pull:
refs:
branches:
enabled: false
most_recent: 10
merge_requests:
enabled: true
most_recent: 10
tags:
enabled: false
pipeline:
jobs:
enabled: true