Skip to content

Integrate updating of custom headers for existing audit event streaming destinations

What does this MR do and why?

This MR adds the ability to update custom headers on existing destinations.

Overall it adds:

  • Toggles the form submission function based upon a new item or existing item.
  • Removes disabling of header inputs while editing an existing item.
  • Adds the updating and deleting header mutations.
  • Adds logic to delete, update and add headers on save.
  • Updates the docs with the UI info for updating and deleting.
  • Updated specs to test the new functionality.

Known UI issues

Screenshots or screen recordings

Screen_Recording_2022-07-20_at_09.54.41

How to set up and validate locally

  1. Enable the feature flag :custom_headers_streaming_audit_events_ui: echo "Feature.enable(:custom_headers_streaming_audit_events_ui)" | rails c.
  2. Visit a group's audit events page e.g. http://gdk.test:3000/groups/gitlab-org/-/audit_events and look at the Streams tab.
  3. Select the edit button on a destination item (you may need to create one with a few headers first).
  4. Change the values of the headers for the destination item, add new headers, delete existing headers, and update existing headers.
  5. Select the save button.
  6. Select the edit button on the same destination item and check the header values match the edits made previously.

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 #361925 (closed) #361633 (closed)

Edited by Robert Hunt

Merge request reports