Skip to content

Commit cd1884c

Browse files
authored
Merge branch 'main' into evaluator-bucketing-optimization
2 parents 21716eb + f79fba7 commit cd1884c

274 files changed

Lines changed: 35909 additions & 533 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
11
name: Contract Tests
2-
description: Runs Contract Tests
2+
description: Runs Contract Tests (builds, starts service, runs SDK contract test harness)
33
inputs:
44
workspace_path:
5-
description: 'Path to the package.'
5+
description: 'Path to the package (e.g. lib/sdk/server).'
66
required: true
77
token:
88
description: 'Github token, used for contract tests'
99
required: false
1010
default: ''
11+
test_harness_params_v2:
12+
description: 'Optional extra parameters for the SDK test harness v2. Passed as TEST_HARNESS_PARAMS_V2 to make.'
13+
required: false
14+
default: ''
15+
test_harness_params_v3:
16+
description: 'Optional extra parameters for the SDK test harness v3 (e.g. -enable-long-running-tests). Passed as TEST_HARNESS_PARAMS_V3 to make.'
17+
required: false
18+
default: ''
1119

1220
runs:
1321
using: composite
1422
steps:
1523
- name: Run contract tests
1624
shell: bash
17-
run: make contract-tests -C ${{ inputs.workspace_path }}
25+
run: make contract-tests -C ${{ inputs.workspace_path }} TEST_HARNESS_PARAMS_V2="${{ inputs.test_harness_params_v2 }}" TEST_HARNESS_PARAMS_V3="${{ inputs.test_harness_params_v3 }}"

.github/workflows/java-server-sdk-redis-store.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ jobs:
1414
build-test-java-server-sdk-redis-store:
1515
strategy:
1616
matrix:
17-
jedis-version: [2.9.0, 3.0.0]
17+
# Username/password (Redis ACL) support requires Jedis 3.6.0+
18+
jedis-version: [3.6.0, 7.1.0]
1819
runs-on: ubuntu-latest
1920
steps:
2021
- uses: actions/checkout@v3
@@ -23,7 +24,7 @@ jobs:
2324
shell: bash
2425
run: |
2526
cd lib/java-server-sdk-redis-store
26-
sed -i.bak 's#"jedis":.*"[0-9.]*"#"jedis":"${{ matrix.jedis-version }}"#' build.gradle
27+
sed -i.bak -E 's/"jedis":[[:space:]]*"[0-9.]+"/"jedis": "${{ matrix.jedis-version }}"/' build.gradle
2728
2829
- name: Shared CI Steps
2930
uses: ./.github/actions/ci
@@ -34,7 +35,8 @@ jobs:
3435
build-test-java-server-sdk-windows:
3536
strategy:
3637
matrix:
37-
jedis-version: [2.9.0, 3.0.0]
38+
# Username/password (Redis ACL) support requires Jedis 3.6.0+
39+
jedis-version: [3.6.0, 7.1.0]
3840
runs-on: windows-latest
3941
steps:
4042
- uses: actions/checkout@v3
@@ -54,7 +56,7 @@ jobs:
5456
shell: bash
5557
run: |
5658
cd lib/java-server-sdk-redis-store
57-
sed -i.bak 's#"jedis":.*"[0-9.]*"#"jedis":"${{ matrix.jedis-version }}"#' build.gradle
59+
sed -i.bak -E 's/"jedis":[[:space:]]*"[0-9.]+"/"jedis": "${{ matrix.jedis-version }}"/' build.gradle
5860
5961
- name: Setup Java
6062
uses: actions/setup-java@v4

.github/workflows/manual-publish-docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
options:
99
- lib/shared/common
1010
- lib/shared/internal
11+
- lib/shared/test-helpers
1112
- lib/sdk/server
1213
- lib/java-server-sdk-otel
1314
- lib/java-server-sdk-redis-store

.github/workflows/manual-publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
options:
1010
- lib/shared/common
1111
- lib/shared/internal
12+
- lib/shared/test-helpers
1213
- lib/sdk/server
1314
- lib/java-server-sdk-otel
1415
- lib/java-server-sdk-redis-store
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: Nightly Contract Tests
2+
3+
on:
4+
schedule:
5+
- cron: "0 4 * * *" # every day at 4am UTC
6+
workflow_dispatch:
7+
inputs:
8+
branch:
9+
description: 'Branch to run contract tests on'
10+
required: false
11+
default: ''
12+
test_slack_notification:
13+
description: 'Also send a test Slack notification (to verify Slack integration)'
14+
required: false
15+
type: boolean
16+
default: false
17+
18+
jobs:
19+
nightly-contract-tests:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v3
23+
with:
24+
ref: ${{ inputs.branch || github.ref }}
25+
26+
- name: Shared CI Steps
27+
uses: ./.github/actions/ci
28+
with:
29+
workspace_path: 'lib/sdk/server'
30+
java_version: 8
31+
32+
- name: Contract Tests (with long-running tests)
33+
uses: ./.github/actions/contract-tests
34+
with:
35+
workspace_path: 'lib/sdk/server'
36+
token: ${{ secrets.GITHUB_TOKEN }}
37+
test_harness_params_v3: '-enable-long-running-tests'
38+
39+
notify-slack-on-failure:
40+
runs-on: ubuntu-latest
41+
if: ${{ always() && needs.nightly-contract-tests.result == 'failure' }}
42+
needs:
43+
- nightly-contract-tests
44+
steps:
45+
- name: Send Slack notification
46+
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
47+
with:
48+
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
49+
webhook-type: incoming-webhook
50+
payload: |
51+
{
52+
"blocks": [
53+
{
54+
"type": "section",
55+
"text": {
56+
"type": "mrkdwn",
57+
"text": ":warning: *Nightly Contract Tests Failed* :warning:\nThe nightly contract tests (with long-running tests enabled) failed on `${{ github.ref_name }}`."
58+
},
59+
"accessory": {
60+
"type": "button",
61+
"text": {
62+
"type": "plain_text",
63+
"text": "View failed run"
64+
},
65+
"url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
66+
}
67+
}
68+
]
69+
}
70+
71+
test-slack-notification:
72+
runs-on: ubuntu-latest
73+
if: ${{ inputs.test_slack_notification == true || inputs.test_slack_notification == 'true' }}
74+
steps:
75+
- name: Send test Slack notification
76+
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
77+
with:
78+
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
79+
webhook-type: incoming-webhook
80+
payload: |
81+
{
82+
"blocks": [
83+
{
84+
"type": "section",
85+
"text": {
86+
"type": "mrkdwn",
87+
"text": ":white_check_mark: *Nightly Contract Tests – Slack test*\nThis is a test notification to verify Slack integration is working. Triggered manually from the Nightly Contract Tests workflow."
88+
},
89+
"accessory": {
90+
"type": "button",
91+
"text": {
92+
"type": "plain_text",
93+
"text": "View workflow run"
94+
},
95+
"url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
96+
}
97+
}
98+
]
99+
}

.github/workflows/release-please.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
outputs:
1313
package-sdk-common-released: ${{ steps.release.outputs['lib/shared/common--release_created'] }}
1414
package-sdk-internal-released: ${{ steps.release.outputs['lib/shared/internal--release_created'] }}
15+
package-test-helpers-released: ${{ steps.release.outputs['lib/shared/test-helpers--release_created'] }}
1516
package-server-sdk-released: ${{ steps.release.outputs['lib/sdk/server--release_created'] }}
1617
package-server-sdk-otel-released: ${{ steps.release.outputs['lib/java-server-sdk-otel--release_created'] }}
1718
package-server-sdk-redis-store-released: ${{ steps.release.outputs['lib/java-server-sdk-redis-store--release_created'] }}
@@ -188,3 +189,36 @@ jobs:
188189
sonatype_password: ${{ env.SONATYPE_PASSWORD }}
189190
aws_role: ${{ vars.AWS_ROLE_ARN }}
190191
token: ${{ secrets.GITHUB_TOKEN }}
192+
193+
release-test-helpers:
194+
runs-on: ubuntu-latest
195+
needs: release-please
196+
permissions:
197+
id-token: write
198+
contents: write
199+
pull-requests: write
200+
if: ${{ needs.release-please.outputs.package-test-helpers-released == 'true'}}
201+
steps:
202+
- uses: actions/checkout@v4
203+
204+
- uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.1.0
205+
name: Get secrets
206+
with:
207+
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
208+
ssm_parameter_pairs: '/production/common/releasing/sonatype/central/username = SONATYPE_USER_NAME,
209+
/production/common/releasing/sonatype/central/password = SONATYPE_PASSWORD,
210+
/production/common/releasing/java/keyId = SIGNING_KEY_ID'
211+
s3_path_pairs: 'launchdarkly-releaser/java/code-signing-keyring.gpg = code-signing-keyring.gpg'
212+
213+
- uses: ./.github/actions/full-release
214+
with:
215+
workspace_path: lib/shared/test-helpers
216+
dry_run: false
217+
prerelease: false
218+
code_signing_keyring: ${{ github.workspace }}/code-signing-keyring.gpg
219+
signing_key_id: ${{ env.SIGNING_KEY_ID }}
220+
signing_key_passphrase: ''
221+
sonatype_username: ${{ env.SONATYPE_USER_NAME }}
222+
sonatype_password: ${{ env.SONATYPE_PASSWORD }}
223+
aws_role: ${{ vars.AWS_ROLE_ARN }}
224+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test-helpers.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: test-helpers
2+
3+
on:
4+
push:
5+
branches: [main, 'feat/**']
6+
paths-ignore:
7+
- '**.md' #Do not need to run CI for markdown changes.
8+
pull_request:
9+
branches: [main, 'feat/**']
10+
paths-ignore:
11+
- '**.md'
12+
13+
jobs:
14+
build-test-helpers:
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
java-version: [8, 19]
20+
os: [ubuntu-latest]
21+
include:
22+
- java-version: 19
23+
os: windows-latest
24+
steps:
25+
- uses: actions/checkout@v3
26+
27+
- name: Shared CI Steps
28+
uses: ./.github/actions/ci
29+
with:
30+
workspace_path: 'lib/shared/test-helpers'
31+
java_version: ${{ matrix.java-version }}

.release-please-manifest.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
2-
"lib/java-server-sdk-otel": "0.1.0",
3-
"lib/java-server-sdk-redis-store": "3.0.1",
4-
"lib/shared/common": "2.1.2",
5-
"lib/shared/internal": "1.5.1",
6-
"lib/sdk/server": "7.10.2"
2+
"lib/java-server-sdk-otel": "0.2.0",
3+
"lib/java-server-sdk-redis-store": "3.1.0",
4+
"lib/shared/common": "2.4.0",
5+
"lib/shared/internal": "1.9.0",
6+
"lib/shared/test-helpers": "2.1.0",
7+
"lib/sdk/server": "7.13.0"
78
}

.sdk_metadata.json

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,36 @@
88
"languages": [
99
"Java"
1010
],
11-
"userAgents": ["JavaClient"]
11+
"userAgents": ["JavaClient"],
12+
"releases": {
13+
"tag-prefix": "launchdarkly-java-server-sdk-"
14+
},
15+
"features": {
16+
"allFlags": { "introduced": "1.0" },
17+
"appMetadata": { "introduced": "5.8" },
18+
"bigSegments": { "introduced": "5.7" },
19+
"contexts": { "introduced": "6.0" },
20+
"eventCompression": { "introduced": "7.9" },
21+
"experimentation": { "introduced": "5.5" },
22+
"fileDataSource": { "introduced": "4.5" },
23+
"flagChanges": { "introduced": "5.0" },
24+
"hooks": { "introduced": "7.4" },
25+
"inlineContextCustomEvents": { "introduced": "7.8" },
26+
"migrations": { "introduced": "7.0" },
27+
"offlineMode": { "introduced": "1.0" },
28+
"otel": { "introduced": "7.4" },
29+
"pluginSupport": { "introduced": "7.10" },
30+
"privateAttrs": { "introduced": "2.5" },
31+
"relayProxyDaemon": { "introduced": "1.0" },
32+
"relayProxyProxy": { "introduced": "1.0" },
33+
"secureMode": { "introduced": "1.0" },
34+
"storingData": { "introduced": "1.0" },
35+
"storingDataRedis": { "introduced": "1.0" },
36+
"testDataSource": { "introduced": "5.1" },
37+
"track": { "introduced": "1.0" },
38+
"variationDetail": { "introduced": "4.3" },
39+
"webProxy": { "introduced": "1.0" }
40+
}
1241
}
1342
}
1443
}

lib/java-server-sdk-otel/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to the LaunchDarkly Java SDK will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).
44

5+
## [0.2.0](https://github.com/launchdarkly/java-core/compare/lib/java-server-sdk-otel-0.1.0...lib/java-server-sdk-otel-0.2.0) (2025-10-23)
6+
7+
8+
### Features
9+
10+
* Update OpenTelemetry semantic conventions ([#89](https://github.com/launchdarkly/java-core/issues/89)) ([c67ce73](https://github.com/launchdarkly/java-core/commit/c67ce73428a14f990f76d8f243fa6460e8b16cfb))
11+
512
## [0.1.0] - 2024-04-10
613
### Added
714
- Adds TrachingHook implementation for recording evaluation events via OpenTelemetry.

0 commit comments

Comments
 (0)