Skip to content

Expire relevant ETag caches for importers

What does this MR do and why?

Related issue #292861 (closed)

This MR ensures that ETag caches of relevant importers are properly flushed when import status is changed

Additionally:

Do not use query parameters (for example ?scope=all) for endpoints where you want to enable ETag caching. The middleware takes into account only the request path and ignores query parameters. All parameters should be included in the request path. By doing this we avoid query parameter ordering problems and make route matching easier.

For now it is sufficient not to alter routes to include query param to path. frontend removal of query param will be done in #348744 (closed), however this will not break any existing frontend code path when this one will be merged

How to set up and validate locally

  1. Open /projects/new
  2. Initiate any import (github might be probably the easiest)
  3. Observe statuses being correctly updated (previously due to ETag realtime_changes endpoint will stuck forever in 304 Not modified

MR acceptance checklist

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

Edited by Illya Klymov

Merge request reports

Loading