Update logic of zoekt_internal_api_register_nodes
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
- Create JWT token by going to this link and replacing
your-256-bit-secret
with contents from$GDK_DIR/gitlab/.gitlab_shell_secret
: - 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'
Feature.disable(:zoekt_internal_api_register_nodes)
- Perform the same request. Ensure you get the same response, but the node record shouldn't be updated (for example,
last_seen_at
field) ::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.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Dmitry Gruzd