Skip to content

Commit 26d01e8

Browse files
authored
chore: include AISdkInfo in extra-files to keep version synced (#191)
## Summary Adds `AISdkInfo.java` to Release Please `extra-files` so `AISdkInfo.VERSION` stays in sync with `gradle.properties` on each release PR. Follows the same pattern as the core Java server SDK and .NET AI SDK. The SDK-info event test now references the `AISdkInfo` constants directly so future version bumps can't leave the expectation stale. No runtime behavior change. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Release automation and test expectations only; no production logic changes. > > **Overview** > **Release Please** for `lib/sdk/server-ai` now bumps `AISdkInfo.java` alongside `gradle.properties`, matching the core server SDK’s `Version.java` pattern so `AISdkInfo.VERSION` stays aligned on release PRs. > > `constructorEmitsSdkInfoEvent` in `LDAIClientImplTest` asserts against `AISdkInfo.NAME`, `VERSION`, and `LANGUAGE` instead of hardcoded literals, so version bumps won’t leave the test out of date. **No runtime behavior change.** > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 07ff4bd. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 3ff90a5 commit 26d01e8

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎lib/sdk/server-ai/src/test/java/com/launchdarkly/sdk/server/ai/LDAIClientImplTest.java‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import com.launchdarkly.sdk.server.ai.datamodel.LDAIConfigTypes.Mode;
3030
import com.launchdarkly.sdk.server.ai.datamodel.LDAIConfigTypes.Message;
3131
import com.launchdarkly.sdk.server.ai.datamodel.LDAIConfigTypes.Model;
32+
import com.launchdarkly.sdk.server.ai.internal.AISdkInfo;
3233
import com.launchdarkly.sdk.server.interfaces.LDClientInterface;
3334

3435
import java.util.ArrayList;
@@ -70,9 +71,9 @@ private List<String> warnings() {
7071
@Test
7172
public void constructorEmitsSdkInfoEvent() {
7273
LDValue expected = LDValue.buildObject()
73-
.put("aiSdkName", "launchdarkly-java-server-sdk-ai")
74-
.put("aiSdkVersion", "0.1.0")
75-
.put("aiSdkLanguage", "java")
74+
.put("aiSdkName", AISdkInfo.NAME)
75+
.put("aiSdkVersion", AISdkInfo.VERSION)
76+
.put("aiSdkLanguage", AISdkInfo.LANGUAGE)
7677
.build();
7778
verify(client).trackMetric(eq("$ld:ai:sdk:info"), any(LDContext.class), eq(expected), eq(1.0));
7879
}

‎release-please-config.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"bump-minor-pre-major": true,
99
"include-v-in-tag": false,
1010
"extra-files": [
11-
"gradle.properties"
11+
"gradle.properties",
12+
"src/main/java/com/launchdarkly/sdk/server/ai/internal/AISdkInfo.java"
1213
]
1314
},
1415
"lib/java-server-sdk-otel": {

0 commit comments

Comments
 (0)