gnodet opened a new pull request, #31263: URL: https://github.com/apache/camel/pull/31263
## Summary Two bugs in `camel-azure-key-vault` fixed: 1. **Dev console shows wrong login method** — `AzureKeyVaultManagerDevConsole` hardcoded `"Client Id/Client Secret"` regardless of the `azureIdentityEnabled` configuration flag. 2. **EventhubsReloadTriggerTask never checkpoints** — `onEventListener()` processed events but never called `eventContext.updateCheckpoint()`, so after a Camel restart the Event Hubs processor always resumed from the latest events, replaying nothing (or in some configurations, re-processing old events). ## Root Cause **Bug 1:** Lines 87 and 132 of `AzureKeyVaultManagerDevConsole` both unconditionally set the login string to `"Client Id/Client Secret"` without checking `AzureVaultConfiguration.isAzureIdentityEnabled()`. **Bug 2:** `onEventListener()` in `EventhubsReloadTriggerTask` updated the in-memory `updates` map and optionally triggered a Camel reload, but never persisted the checkpoint to Blob Storage. The Event Hubs processor uses that checkpoint to know where to resume after a restart. ## Fix **Bug 1:** Both `doCallText()` and `doCallJson()` now derive the login string from `azure.isAzureIdentityEnabled()`: `"Azure Identity"` when enabled, `"Client Id/Client Secret"` otherwise. The `@Metadata` description on the `Response` record and the generated `azure-secrets.json` are updated accordingly. **Bug 2:** `eventContext.updateCheckpoint()` is called at the end of `onEventListener()`, after all event processing and any reload trigger, so the offset is committed to Blob Storage on every processed event. ## Tests - `AzureKeyVaultManagerDevConsoleTest` — extended with tests verifying `isAzureIdentityEnabled()` correctly drives the login string selection. - `EventhubsReloadTriggerTaskCheckpointTest` — new test that mocks `EventContext` and asserts `updateCheckpoint()` is called after `onEventListener()` processes an event. Fixes https://issues.apache.org/jira/browse/CAMEL-27991 --- _Hermes Agent (Claude Sonnet 4.6) on behalf of Guillaume Nodet_ -- 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]
