Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
launchdarkly-android-client-sdk/src/main/java/com/launchdarkly/sdk/android/LDClient.java
Outdated
Show resolved
Hide resolved
kinyoklion
left a comment
There was a problem hiding this comment.
I also agree this is non-breaking. It was the intended behavior, also the primary consumer of this is also us. For our observability plugins.
launchdarkly-android-client-sdk/src/main/java/com/launchdarkly/sdk/android/LDClient.java
Outdated
Show resolved
Hide resolved
tanderson-ld
left a comment
There was a problem hiding this comment.
The commit for updating to identify per instance did not contain any unit test changes. Consider seeing if it is trivial to test for the multi instance case where each instance gets its identify hook invoked. If it is not trivial it is not the end of the world to add.
Good idea, added a new test for that. |
🤖 I have created a release *beep* *boop* --- ## [5.11.1](5.11.0...5.11.1) (2026-03-23) ### Bug Fixes * Call identify hooks during init. ([#331](#331)) ([a09cb57](a09cb57)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: only release/version metadata changes (`gradle.properties`, release manifest, and `CHANGELOG.md`) with no functional code modifications. > > **Overview** > Publishes release `5.11.1` by bumping the version in `gradle.properties` and `.release-please-manifest.json`. > > Updates `CHANGELOG.md` with the `5.11.1` entry noting the bug fix *“Call identify hooks during init”*. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 70604fc. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

Requirements
Related issues
N/A
Describe the solution you've provided
Before this change,
beforeIdentifyandafterIdentifywere only called whenidentifywas called. After this change, they are also called as part ofinit.Describe alternatives you've considered
None.
Additional context
I don't think this would be considered a breaking change, but I wouldn't mind a second opinion. The change in behavior is observable by the user, but the new behavior is what was originally intended. So I would consider this a bugfix, and would not expect customers to need to make any changes to their code to deal with the change.
Note
Medium Risk
Behavior change:
beforeIdentify/afterIdentifyhooks now run implicitly duringLDClient.init, which could affect apps/plugins that assume hooks only fire on explicitidentifycalls. The change touches initialization flow across multi-environment instances but is covered by updated and new instrumentation tests.Overview
Identify hooks now run during
LDClient.init. During startup, each environment instance invokes the identify hook series (beforeIdentifyviahookRunner.identify, followed byafterIdentifywith COMPLETED/ERROR based on startup outcome).Tests were updated to account for the new implicit identify on init, and a new plugin test ensures identify hooks fire once per configured environment (primary + secondary) and again for explicit
identifycalls.Written by Cursor Bugbot for commit c02c568. This will update automatically on new commits. Configure here.