Skip to content

Draft: Optimize patch op. Prepare it for the async version.

Guilherme Gallo requested to merge gallo/ci-collate:optimization into main

On draft

Waiting for !30 (merged) to merge.

Description

This update significantly enhances the GitLab Collation Tool, focusing on making it faster, more reliable, and easier to use. Key improvements include:

  • Profiling: Mitigated some bottlenecks, as the use of str.split instead of multiple str.count calls, and the tenacity high number of waiting time and retries.
  • Typing Enhancements: Adding type hints makes the code more transparent and helps prevent errors, improving the tool's reliability.
  • Code Optimization: Restructured imports and cleaned up the codebase, making the tool easier to maintain and extend.
  • Dynamic Expectation Management: The new ExpectationsProcessorFactory allows for lazier handling of changes across different files, facilitating the management of test expectations and controlling when we open/write files, better suited for concurrency.
  • Simplified Retry Mechanism: streamlined the retry mechanism for GitLab API interactions, reducing wait times and improving responsiveness.

These updates are designed to make the ci-collate faster, more efficient, more user-friendly, and easier to integrate into your workflow.

Performance changes

Source Command Mean [s] Min [s] Max [s]
This branch ci-collate --pipeline-url https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1107132 patch 118.440 ± 34.730 76.506 154.863
origin/main ci-collate --namespace mesa --project mesa patch 1107132 258.006 ± 25.050 221.964 289.948

Merge request reports

Loading