Skip to content

Aa processor clarify#223

Draft
jacomago wants to merge 11 commits into
ChannelFinder:masterfrom
jacomago:aa-processor-clarify
Draft

Aa processor clarify#223
jacomago wants to merge 11 commits into
ChannelFinder:masterfrom
jacomago:aa-processor-clarify

Conversation

@jacomago
Copy link
Copy Markdown
Contributor

No description provided.

@jacomago jacomago force-pushed the aa-processor-clarify branch 2 times, most recently from b0f4eb3 to 3feb24a Compare May 22, 2026 10:49
jacomago and others added 10 commits May 22, 2026 12:56
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Eliminate three duplicate inline stream-filter-findFirst patterns for
channel property lookups.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace a 15-line Optional.map(→Stream).orElse(stream) chain with a
named helper method, making the intent immediately clear at the call site.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
process() was doing three things: guard clauses, mapping channels to per-archiver
PV options, and submitting actions. Extract the latter two into named methods so
process() reads as a three-step narrative.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace the imperative for-loop (with continue guard) with a stream pipeline.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tion

- INFO: "Processing N channels." / "Configured N channels." frame each run
- WARNING (new): "No reachable archivers configured" when archiversInfo is empty
- WARNING: per-channel failure now names the channel and archiver alias
- WARNING: archiver response anomalies now identify which archiver and what was wrong
- FINE (was INFO): per-archiver status query — too chatty for production INFO
- FINER: raw status response now includes archiver alias for correlation
- All String.format calls wrapped in lambdas for lazy evaluation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…urious ARCHIVE

Previously, a failed HTTP status batch silently returned an empty list.
Those PVs were then treated as "not archived" and submitted for archiving
on every subsequent run, spamming the archiver with duplicate requests.

ArchiverService now throws ArchiverServiceException on status fetch failure.
AAChannelProcessor catches it in getArchiveActions() and returns null,
causing submitToArchivers() to skip that archiver entirely for the run.

Also renames getStatusesFromPvListQuery/Body → getStatusesViaGet/Post
to reflect their transport semantics (package-private; promoted in next commit).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… transport methods

ArchiverService was holding archiver-alias config (postSupportArchivers) and
making the POST-vs-GET routing decision — a concern that belongs in
AAChannelProcessor alongside all other per-archiver configuration.

ArchiverService now exposes two public transport methods:
  getStatusesViaGet(url, pvs)  — batches internally (URL length limit)
  getStatusesViaPost(url, pvs) — sends in a single POST body

AAChannelProcessor holds @value("${aa.post_support:}") and selects the
correct transport in getArchiveActions(). The field is volatile so the
runtime setter added later is thread-safe.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ot PV map

Logging the full PV map at INFO generates enormous output in production.
Replace with a count summary at FINE.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jacomago jacomago force-pushed the aa-processor-clarify branch from 3feb24a to f6be0e5 Compare May 22, 2026 12:31
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>
@sonarqubecloud
Copy link
Copy Markdown

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.

1 participant