-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
policy: fix autogroup:self propagation and optimize cache invalidation #2807
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
Merged
kradalby
merged 4 commits into
juanfont:main
from
kradalby:kradalby/2802-acl-self-propagate
Oct 23, 2025
Merged
policy: fix autogroup:self propagation and optimize cache invalidation #2807
kradalby
merged 4 commits into
juanfont:main
from
kradalby:kradalby/2802-acl-self-propagate
Oct 23, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12dc8b5 to
f834379
Compare
f834379 to
76d119c
Compare
76d119c to
3e605ee
Compare
kradalby
added a commit
to kradalby/headscale
that referenced
this pull request
Oct 23, 2025
Implements two patterns to handle eventual consistency in integration tests: 1. Built-in backoff retry for simple accessors (FQDN, IPv4, IPs) - Functions return (value, error) with internal 10s exponential backoff - Added MustFQDN(), MustIPv4(), MustIPs() panic variants 2. EventuallyWithT wrapping for complex validation - Status(): 11 calls (peer visibility, expiration, tags) - ListNodes(): 6 calls (registration, routes) - Curl(): 11 calls (HTTP connectivity) - Netmap(): 1 call (network map validation) All 336 external state calls now have proper retry logic. Fixes juanfont#2807
57f9b64 to
35e27e3
Compare
Add a ACL test that updates and validates node connectivity over time as nodes and policy changes. Updates juanfont#2802 Signed-off-by: Kristoffer Dalby <[email protected]>
kradalby
added a commit
to kradalby/headscale
that referenced
this pull request
Oct 23, 2025
Implements two patterns to handle eventual consistency in integration tests: 1. Built-in backoff retry for simple accessors (FQDN, IPv4, IPs) - Functions return (value, error) with internal 10s exponential backoff - Added MustFQDN(), MustIPv4(), MustIPs() panic variants 2. EventuallyWithT wrapping for complex validation - Status(): 11 calls (peer visibility, expiration, tags) - ListNodes(): 6 calls (registration, routes) - Curl(): 11 calls (HTTP connectivity) - Netmap(): 1 call (network map validation) All 336 external state calls now have proper retry logic. Fixes juanfont#2807
a26837d to
d763dad
Compare
autogroup:self uses per-node filters, causing stale peer maps when nodes change (global filter hash unchanged). Fix by detecting autogroup:self in SetNodes() and forcing peer map rebuild. Replace blanket cache clearing with granular invalidation of affected nodes only. Move ReduceFilterRules to policyutil package and add NodeView.HasNetworkChanges() for network change detection.
- Remove trailing whitespace and extra blank lines - Fix comment spacing - Normalize indentation (spaces to tabs) - Use octal prefix for file permissions
d763dad to
f0281a1
Compare
juanfont
approved these changes
Oct 23, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
autogroup:self uses per-node filters, causing stale peer maps when nodes
change (global filter hash unchanged). Fix by detecting autogroup:self
in SetNodes() and forcing peer map rebuild.
Replace blanket cache clearing with granular invalidation of affected
nodes only. Move ReduceFilterRules to policyutil package and add
NodeView.HasNetworkChanges() for network change detection.
Fixes #2802
Claude was used in this PR.