[PR #1190] [MERGED] Prevent return extra userData #13391

Closed
opened 2026-08-05 02:08:17 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/1190
Author: @mlsmaycon
Created: 10/2/2023
Status: Merged
Merged: 10/2/2023
Merged by: @mlsmaycon

Base: mainHead: filter-idp-users-to-cache


📝 Commits (1)

  • c23ef64 Prevent return extra userData

📊 Changes

1 file changed (+32 additions, -3 deletions)

View changed files

📝 management/server/account.go (+32 -3)

📄 Description

Describe your changes

If there is a difference between local and cached data, we trigger a cache refresh; as we remove users from the local store and potentially from the remote IDP, we need to switch the source of truth to the local store to prevent unwanted endless cache for cases where the removal from the IDP fails or for cases where the userDeleteFromIDPEnabled got enabled after the first user deletion.

This also aligns with the change in the warmup method in PR #1147

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/1190 **Author:** [@mlsmaycon](https://github.com/mlsmaycon) **Created:** 10/2/2023 **Status:** ✅ Merged **Merged:** 10/2/2023 **Merged by:** [@mlsmaycon](https://github.com/mlsmaycon) **Base:** `main` ← **Head:** `filter-idp-users-to-cache` --- ### 📝 Commits (1) - [`c23ef64`](https://github.com/netbirdio/netbird/commit/c23ef64efaf94bf6e15df440837b823add862d65) Prevent return extra userData ### 📊 Changes **1 file changed** (+32 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `management/server/account.go` (+32 -3) </details> ### 📄 Description ## Describe your changes If there is a difference between local and cached data, we trigger a cache refresh; as we remove users from the local store and potentially from the remote IDP, we need to switch the source of truth to the local store to prevent unwanted endless cache for cases where the removal from the IDP fails or for cases where the userDeleteFromIDPEnabled got enabled after the first user deletion. This also aligns with the change in the warmup method in PR #1147 ## Issue ticket number and link ### Checklist - [x] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 02:08:17 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#13391