gnodet commented on PR #31263:
URL: https://github.com/apache/camel/pull/31263#issuecomment-7353315649

   Thanks for the thorough review @davsclaus!
   
   **Re: checkpointing and restart behaviour (concern 1)**
   
   The intent of `updateCheckpoint()` here is exactly to replay events missed 
while the app was down. For a secrets reload trigger this is the right 
behaviour: if a `SecretNewVersionCreated` event arrived while Camel was 
restarting, we want to detect it and reload secrets on the next startup, not 
silently miss it.
   
   The comparison with AWS CloudTrail (`lastTime = Instant.now()`) is accurate 
for CloudTrail — that approach works because the CloudWatch event stream is 
polled on a timer and we look for events "from now on". Event Hubs push-based 
delivery is different: if Camel restarts while an event is in-flight, without a 
checkpoint the processor jumps to `EventPosition.latest()` and skips everything 
that arrived during the outage.
   
   Regarding the concern about replaying stale `updates` entries and blocking 
blob writes: the reload is triggered only for secrets that `matchSecret()` 
returns true for (i.e., secrets the application actually uses). A startup 
replay of one or two missed secret-rotation events is bounded, expected, and 
harmless — it results in a fresh config reload that would have been needed 
anyway.
   
   Adding an `getEnqueuedTime() < taskStartTime` skip-guard would be one way to 
prevent replaying events older than the task start time, but it would 
re-introduce the original problem: a secret rotated one second before startup 
would be missed. I'd rather keep the current behaviour and document it.
   
   **Re: console login with env vars (concern 2)**
   
   The current code delegates to `propertiesFunction.isAzureIdentityEnabled()` 
(line 134 in `AzureKeyVaultManagerDevConsole`). 
`KeyVaultPropertiesFunction.doStart()` reads 
`CAMEL_VAULT_AZURE_IDENTITY_ENABLED` from the environment first (line 113), so 
the value exposed via `isAzureIdentityEnabled()` already reflects the 
environment variable — the console will show the right login method in all 
cases.
   
   **Re: tests (concern 3)**
   
   Fixed in the latest commit — the three tests now register a stub 
`KeyVaultPropertiesFunction` and call `con.call(DevConsole.MediaType.JSON)` to 
assert the `login` field directly. The gnodet-bot thread was resolved.
   
   _Claude Code on behalf of gnodet._


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to