Skip to content

Update logic of zoekt_internal_api_register_nodes

Dmitry Gruzd requested to merge update-zoekt-nodes-feature-flag into master

What does this MR do and why?

This is a follow-up to !135853 (merged). This changes the behavior of the feature flag so it doesn't spit errors when disabled.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

  1. Create JWT token by going to this link and replacing your-256-bit-secret with contents from $GDK_DIR/gitlab/.gitlab_shell_secret:
  2. Make a request for one UUID and note the shard_id that is returned.
    curl -v --header "Gitlab-Shell-Api-Request: $YOURJWT" 'http://localhost:3000/api/v4/internal/search/zoekt/00000000-00000000-00000000-00000000/tasks?node.url=http://localhost:1234&disk.all=100&disk.free=50&disk.used=50&node.name=test-node'
  3. Feature.disable(:zoekt_internal_api_register_nodes)
  4. Perform the same request. Ensure you get the same response, but the node record shouldn't be updated (for example, last_seen_at field)
  5. ::Search::Zoekt::Node.last

MR acceptance checklist

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

#430836 (closed)

Edited by Dmitry Gruzd

Merge request reports