Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not all refs (Tags/MRs) are exported #940

Open
maheshglm opened this issue Nov 7, 2024 · 1 comment
Open

Not all refs (Tags/MRs) are exported #940

maheshglm opened this issue Nov 7, 2024 · 1 comment

Comments

@maheshglm
Copy link

maheshglm commented Nov 7, 2024

I am using webhook approach, and here is the configuration I used. I expect, latest 10 recent tags and 5 recent branches should get polled, but its not working as expected. Pulling random MRs (not latest 5) and same goes to Tags as well (not latest 10).

Noticed similar behaviour with pull based approach as well, where expecting latest 10 merge-requests, but seeing random MRs

  wildcards:
    - {}
   
  project_defaults:
    output_sparse_status_metrics: true
    pull:
      pipeline:
        jobs:
          enabled: true
          from_child_pipelines:
            enabled: true
          aggregation_regexp: ".*"
        variables:
          enabled: false
      refs:
        branches:
          enabled: true
          most_recent: 0
          regexp: "^(?:main|master)$"
          # If the age of the most recently updated pipeline for the branch is greater than
          # this value, the pipeline metrics won't get exported (optional, default: 0 (disabled))
          max_age_seconds: 0
        tags:
          enabled: true
          regexp: ".*"
          most_recent: 10
          # If the age of the most recently updated pipeline for the tag is greater than
          # this value, the pipeline metrics won't get exported (optional, default: 0 (disabled))
          max_age_seconds: 0
          exclude_deleted: true
        merge_requests:
          enabled: true
          most_recent: 5
          # If the age of the most recently updated pipeline for the merge request is greater than
          # this value, the pipeline metrics won't get exported (optional, default: 0 (disabled))
          max_age_seconds: 0

for example, created a new MR and I expect pipeline should appear in the list, but seeing this in the logs, even though pipeline is running

time="2024-11-07T04:11:24Z" level=info msg="received a pipeline webhook from GitLab for a ref, triggering metrics pull" project-name=gt/test ref=42 ref-kind=merge-request
time="2024-11-07T04:11:24Z" level=debug msg="could not find any pipeline for the ref" project-name=gt/test ref=42 ref-kind=merge-request
@maheshglm
Copy link
Author

I kind of identified issue with Merge Request discrepancy, Seeing above error could not find any pipeline for the ref when the MR is labelled merged results but merge request works fine. This is controlled from Gitlab Merge Request settings

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant