Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent return extra userData #1190

Merged
merged 1 commit into from
Oct 2, 2023
Merged

Prevent return extra userData #1190

merged 1 commit into from
Oct 2, 2023

Conversation

mlsmaycon
Copy link
Collaborator

@mlsmaycon mlsmaycon commented Oct 2, 2023

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

  • 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

We need to prevent returning extra userdata
to avoid endless cache reload
@braginini
Copy link
Contributor

braginini commented Oct 2, 2023

It is unclear what was the issue , could you please describe in the ticket?

@mlsmaycon
Copy link
Collaborator Author

It is unclear what was the issue , could you please describe in the ticket?

updated, have a look

@braginini braginini self-requested a review October 2, 2023 13:27
@mlsmaycon mlsmaycon merged commit a952e7c into main Oct 2, 2023
8 checks passed
@mlsmaycon mlsmaycon deleted the filter-idp-users-to-cache branch October 2, 2023 17:18
pulsastrix pushed a commit to pulsastrix/netbird that referenced this pull request Dec 24, 2023
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.
Foosec pushed a commit to Foosec/netbird that referenced this pull request May 8, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants