Aa policy cache#226
Open
jacomago wants to merge 6 commits into
Open
Conversation
bf01d66 to
a5f03a0
Compare
georgweiss
previously approved these changes
Jun 2, 2026
simon-ess
previously approved these changes
Jun 2, 2026
Contributor
|
Nitpick but please configure your agents on commit message subject lengths - you are again overflowing |
anderslindho
reviewed
Jun 2, 2026
| if (!namesToStatuses.isEmpty()) { | ||
| verify(archiverService, times(1)).getStatusesViaGet(anyString(), anyList()); | ||
| verify(archiverService).getStatusesViaGet(anyString(), anyList()); | ||
| verify(archiverService).getStatusesViaPost(anyString(), anyList()); |
Contributor
There was a problem hiding this comment.
This change should be split out. It is a fix in what should be a no-op refactor commit. And the conventional commit category here (for the refactor) should prob be refactor(tests) rather than test(...).
Contributor
Author
There was a problem hiding this comment.
Not sure exactly what you mean.
Comment on lines
+124
to
+127
| "PostSupportArchivers", | ||
| postSupportArchivers.toString(), | ||
| "PolicyRefreshIntervalSeconds", | ||
| String.valueOf(policyRefreshIntervalSeconds), |
Contributor
There was a problem hiding this comment.
These names should be improved, esp the first one (latter just add Cache somewhere)
Contributor
Author
There was a problem hiding this comment.
Tried to make more consistent.
remove duplicate stubs, add missing post verification Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Policies are fetched once at startup (@PostConstruct) and refreshed on a configurable fixed delay (aa.policy_refresh_interval_seconds, default 1 h) rather than on every process() call. process() now reads a volatile snapshot, so policy fetches can no longer block or fail mid-run. processorInfo() exposes LastPolicyRefresh and per-archiver policy counts for observability. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Create a base class AAChannelProcessorBaseIT with shared fields (archiveProperty, activeProperty, inactiveProperty), @MockitoBean/@Autowired declarations, @beforeeach primeCache(), and the paramableAAChannelProcessorTest helper. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Make a method cachedPoliciesRepresentation to make printing of cachedPolicies more DRY
|
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
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.



This changes how the policies are fetched from the archiver. Instead on every "processing", it is scheduled to a default of every hour and the result cached.
This separates the processing vs the fetching of policies from the archivers.