Fix import of pipelines with negative duration to ClickHouse

What does this MR do and why?

This MR fixes a bug that is currently affecting the import of pipelines into ClickHouse. There are certain pipelines with negative duration in the database, which is problematic since the CH column is unsigned.

Changelog: fixed

Part of #482930 (closed)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

image

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Remove the fix in app/services/ci/click_house/data_ingestion/finished_pipelines_sync_service.rb, the tests should fail with the same error seen in Elastic logs:

image

Edited by Pedro Pombeiro

Merge request reports

Loading