Skip to content

Fetch system notes when changing assignee

Tristan Read requested to merge tr-alert-assignee-performance into master

What does this MR do?

A small performance improvement.

When the assignee changes for an alert, a system note is added. Currently we wait for the mutation request to return successfully, then perform a full refetch of the alert data to get new system notes.

Downsides:

  • Does an extra request, so 2 round trips in total.
  • Fetches data that does not change.
  • Adds work for the db - to retrieve the same data more than once.

One of the advantages of graphql is being able to specify exactly what you need in a query. It also allows us to fetch new data in the same request as a mutation. We can leverage these two properties to slightly improve alert detail page performance 🚀

No visual change in this MR. You can verify the change by changing an alert assignee and seeing that it now makes one network call instead of two.

Issue: #225445 (closed)

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [n/a] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [n/a] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [n/a] Security reports checked/validated by a reviewer from the AppSec team
Edited by Tristan Read

Merge request reports

Loading