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

feat: detect pipeline with status success-with-warnings #878

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

seyguai
Copy link
Contributor

@seyguai seyguai commented Jul 23, 2024

Use pipeline detailed status to expose if the pipeline was successful with a warning (job with allow_failure: true)

Attempt to implement suggestion from #123

@mvisonneau
Copy link
Owner

thanks for the feature @seyguai !

@mvisonneau mvisonneau merged commit e6cc3e6 into mvisonneau:main Jan 14, 2025
1 check passed
@armingerten
Copy link

armingerten commented Jan 15, 2025

Does this feature require a specific GitLab version or configuration of the exporter?

I just updated the exporter to v0.5.10 but it does not seem to export any gitlab_ci_pipeline_status metric for projects in status "success-with-warnings".

I just checked the API and I get the following output (I removed some personal information):

{
  "id": 6592653,
  "iid": 1138,
  "project_id": 10465,
  "sha": "0480f5e44dc29c21f2c497c1d05aa0d9a23fc8af",
  "ref": "main",
  "status": "success",
  "source": "push",
  "created_at": "2025-01-15T09:31:04.806Z",
  "updated_at": "2025-01-15T09:31:21.268Z",
  "web_url": "*****",
  "before_sha": "d1da73c9e4ca3a91b444e36a87f64ff21895bd5a",
  "tag": false,
  "yaml_errors": null,
  "user": { ***** },
  "started_at": "2025-01-15T09:31:07.376Z",
  "finished_at": "2025-01-15T09:31:21.256Z",
  "committed_at": null,
  "duration": 13,
  "queued_duration": 2,
  "coverage": null,
  "detailed_status": {
    "icon": "status_warning",
    "text": "Warning",
    "label": "passed with warnings",
    "group": "success-with-warnings",
    "tooltip": "passed",
    "has_details": true,
    "details_path": "*****",
    "illustration": null,
    "favicon": "*****"
  },
  "name": null
}

@seyguai
Copy link
Contributor Author

seyguai commented Feb 25, 2025

I tried it myself, and could find any pipelines with such warning. However, I noticed that the pipeline that should have such status were no longer exposed. So there is a bug.

I managed to test, fix & improve it with this PR: #990

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

Successfully merging this pull request may close these issues.

4 participants