Skip to content

Invalidate existing cached report when child pipelines are updated

Albert requested to merge 363301-invalidate-reactive-cache-upon-job-retry into master

What does this MR do and why?

Invalidate existing cached report when child pipelines are updated.

With the inclusion of coverage report from child pipelines !89950 (merged), the coverage report needs to include coverage from child pipeline. So when any child pipeline is updated, we also need to invalidate the existing cache.

This could happen in scenarios such as a job retry in the child pipeline, which changes updated_at on the child pipeline but does not change anything on the parent pipeline.

Related to #363301 (closed)

Query plan

Query plan for pipeline.self_and_descendants.maximum(:updated_at):

https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/10806/commands/38911 Looks good

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

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

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #363301 (closed)

Edited by Albert

Merge request reports