Skip to content

WIP: Add support for CI build annotations

Yorick Peterse requested to merge build-annotations into master

What does this MR do?

This adds support for CI build annotations, as described in https://gitlab.com/gitlab-org/gitlab-ce/issues/51641. A more in-depth description will be added once the changes mature.

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/51641

TODO

  • Add mechanism for caching rendered Markdown in Redis.
    • This should be implemented in such a way that N+1 requests are not possible. This would be done using Redis pipelining, and raising errors if the data is not eager loaded (= N+1 is impossible).
    • This somehow should reuse some of the important logic from the CacheMarkdownField concern. This may just require some copy-pasting for the time being. We also don't need to support multiple Markdown engines.
  • Create Sidekiq worker for processing the reports
  • Schedule Sidekiq worker when the build state transitions to a finished state, like security reports do for pipelines
  • Create service that takes a CI build, and parses it into a database row
    • Ensure that we only process artifacts below 10MB in size
  • Implement basic UI, which initially would just be a separate "Annotations" tab in an MR
  • Tests for the Sidekiq worker

Does this MR meet the acceptance criteria?

Edited by Yorick Peterse

Merge request reports

Loading