-
Notifications
You must be signed in to change notification settings - Fork 8
chore: migrating redis store package to java-core #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
name: 'Bug report for the java-server-sdk-redis-store package' | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: 'package: java-server-sdk-redis-store, bug' | ||
assignees: '' | ||
--- | ||
|
||
**Is this a support request?** | ||
This issue tracker is maintained by LaunchDarkly SDK developers and is intended for feedback on the code in this library. If you're not sure whether the problem you are having is specifically related to this library, or to the LaunchDarkly service overall, it may be more appropriate to contact the LaunchDarkly support team; they can help to investigate the problem and will consult the SDK team if necessary. You can submit a support request by going [here](https://support.launchdarkly.com/) and clicking "submit a request", or by emailing [email protected]. | ||
|
||
Note that issues filed on this issue tracker are publicly accessible. Do not provide any private account information on your issues. If your problem is specific to your account, you should submit a support request as described above. | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To reproduce** | ||
Steps to reproduce the behavior. | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Logs** | ||
If applicable, add any log output related to your problem. | ||
|
||
**SDK version** | ||
The version of this SDK that you are using. | ||
|
||
**Language version, developer tools** | ||
For instance, Go 1.11 or Ruby 2.5.3. If you are using a language that requires a separate compiler, such as C, please include the name and version of the compiler too. | ||
|
||
**OS/platform** | ||
For instance, Ubuntu 16.04, Windows 10, or Android 4.0.3. If your code is running in a browser, please also include the browser type and version. | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
20 changes: 20 additions & 0 deletions
20
.github/ISSUE_TEMPLATE/package-redis-store--feature_request.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Feature request for the java-server-sdk-redis-store package | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: 'package: java-server-sdk-redis-store, enhancement' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I would love to see the SDK [...does something new...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context about the feature request here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: java-server-sdk-redis-store | ||
|
||
on: | ||
push: | ||
branches: [main, 'feat/**'] | ||
paths-ignore: | ||
- '**.md' #Do not need to run CI for markdown changes. | ||
pull_request: | ||
branches: [main, 'feat/**'] | ||
paths-ignore: | ||
- '**.md' | ||
|
||
jobs: | ||
build-test-java-server-sdk-redis-store: | ||
strategy: | ||
matrix: | ||
jedis-version: [2.9.0, 3.0.0] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Edit build.gradle to change Jedis version | ||
shell: bash | ||
run: | | ||
cd lib/java-server-sdk-redis-store | ||
sed -i.bak 's#"jedis":.*"[0-9.]*"#"jedis":"${{ matrix.jedis-version }}"#' build.gradle | ||
|
||
- name: Shared CI Steps | ||
uses: ./.github/actions/ci | ||
with: | ||
workspace_path: 'lib/java-server-sdk-redis-store' | ||
java_version: 8 | ||
|
||
build-test-java-server-sdk-windows: | ||
strategy: | ||
matrix: | ||
jedis-version: [2.9.0, 3.0.0] | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- run: | | ||
$ProgressPreference = "SilentlyContinue" | ||
iwr -outf redis.zip https://github.com/MicrosoftArchive/redis/releases/download/win-3.0.504/Redis-x64-3.0.504.zip | ||
mkdir redis | ||
Expand-Archive -Path redis.zip -DestinationPath redis | ||
cd redis | ||
.\redis-server --service-install | ||
.\redis-server --service-start | ||
Start-Sleep -s 5 | ||
.\redis-cli ping | ||
|
||
- name: Edit build.gradle to change Jedis version | ||
shell: bash | ||
run: | | ||
cd lib/java-server-sdk-redis-store | ||
sed -i.bak 's#"jedis":.*"[0-9.]*"#"jedis":"${{ matrix.jedis-version }}"#' build.gradle | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 8 | ||
|
||
- name: Restore dependencies | ||
shell: bash | ||
id: restore | ||
run: lib/java-server-sdk-redis-store/gradlew dependencies -p lib/java-server-sdk-redis-store | ||
|
||
- name: Build | ||
shell: bash | ||
id: build | ||
run: lib/java-server-sdk-redis-store/gradlew build -p lib/java-server-sdk-redis-store | ||
|
||
- name: Build Jar | ||
shell: bash | ||
id: buildjar | ||
run: lib/java-server-sdk-redis-store/gradlew jar -p lib/java-server-sdk-redis-store | ||
|
||
- name: Run Tests | ||
if: steps.build.outcome == 'success' && inputs.run_tests == 'true' | ||
shell: bash | ||
run: lib/java-server-sdk-redis-store/gradlew test -p lib/java-server-sdk-redis-store | ||
|
||
- name: Build Documentation | ||
shell: bash | ||
run: lib/java-server-sdk-redis-store/gradlew javadoc -p lib/java-server-sdk-redis-store |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,10 +10,11 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
package-server-sdk-otel-released: ${{ steps.release.outputs['lib/java-server-sdk-otel--release_created'] }} | ||
package-sdk-common-released: ${{ steps.release.outputs['lib/java-sdk-common--release_created'] }} | ||
package-sdk-internal-released: ${{ steps.release.outputs['lib/java-sdk-internal--release_created'] }} | ||
package-server-sdk-released: ${{ steps.release.outputs['lib/java-server-sdk--release_created'] }} | ||
package-server-sdk-otel-released: ${{ steps.release.outputs['lib/java-server-sdk-otel--release_created'] }} | ||
package-server-sdk-redis-store-released: ${{ steps.release.outputs['lib/java-server-sdk-redis-store--release_created'] }} | ||
|
||
steps: | ||
- uses: google-github-actions/release-please-action@v4 | ||
|
@@ -86,6 +87,38 @@ jobs: | |
aws_role: ${{ vars.AWS_ROLE_ARN }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
release-server-sdk-redis-store: | ||
runs-on: ubuntu-latest | ||
needs: release-please | ||
permissions: | ||
id-token: write | ||
contents: write | ||
pull-requests: write | ||
if: ${{ needs.release-please.outputs.package-server-sdk-redis-store-released == 'true'}} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: launchdarkly/gh-actions/actions/[email protected] | ||
name: Get secrets | ||
with: | ||
aws_assume_role: ${{ vars.AWS_ROLE_ARN }} | ||
ssm_parameter_pairs: '/production/common/releasing/sonatype/username = SONATYPE_USER_NAME, | ||
/production/common/releasing/sonatype/password = SONATYPE_PASSWORD' | ||
s3_path_pairs: 'launchdarkly-releaser/java/code-signing-keyring.gpg = code-signing-keyring.gpg' | ||
|
||
- uses: ./.github/actions/full-release | ||
with: | ||
workspace_path: lib/java-server-sdk-redis-store | ||
dry_run: false | ||
prerelease: false | ||
code_signing_keyring: 'code-signing-keyring.gpg' | ||
signing_key_id: ${{ env.SIGNING_KEY_ID }} | ||
signing_key_passphrase: ${{ env.SIGNING_KEY_PASSPHRASE }} | ||
sonatype_username: ${{ env.SONATYPE_USER_NAME }} | ||
sonatype_password: ${{ env.SONATYPE_PASSWORD }} | ||
aws_role: ${{ vars.AWS_ROLE_ARN }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
release-sdk-internal: | ||
runs-on: ubuntu-latest | ||
needs: release-please | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Change log | ||
|
||
All notable changes to the LaunchDarkly Java SDK Redis integration will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org). | ||
|
||
## [3.0.0] - 2022-12-07 | ||
This release corresponds to the 6.0.0 release of the LaunchDarkly Java SDK. Any application code that is being updated to use the 6.0.0 SDK, and was using a 2.x version of `launchdarkly-java-server-sdk-redis-store`, should now use a 3.x version instead. | ||
|
||
There are no functional differences in the behavior of the Redis integration; the differences are only related to changes in the usage of interface types for configuration in the SDK. | ||
|
||
### Added: | ||
- `Redis.bigSegmentStore()`, which creates a configuration builder for use with Big Segments. Previously, the `Redis.dataStore()` builder was used for both regular data stores and Big Segment stores. | ||
|
||
### Changed: | ||
- The type `RedisDataStoreBuilder` has been removed, replaced by a generic type `RedisStoreBuilder`. Application code would not normally need to reference these types by name, but if necessary, use either `RedisStoreBuilder<PersistentDataStore>` or `RedisStoreBuilder<BigSegmentStore>` depending on whether you are configuring a regular data store or a Big Segment store. | ||
|
||
## [2.0.0] - 2022-07-29 | ||
This release updates the package to use the new logging mechanism that was introduced in version 5.10.0 of the LaunchDarkly Java SDK, so that log output from the Redis integration is handled in whatever way was specified by the SDK's logging configuration. | ||
|
||
This version of the package will not work with SDK versions earlier than 5.10.0; that is the only reason for the 2.0.0 major version increment. The functionality of the package is otherwise unchanged, and there are no API changes. | ||
|
||
## [1.1.0] - 2022-01-28 | ||
### Added: | ||
- Added support for Big Segments. An Early Access Program for creating and syncing Big Segments from customer data platforms is available to enterprise customers. | ||
|
||
## [1.0.1] - 2021-08-06 | ||
### Fixed: | ||
- This integration now works with Jedis 3.x as well as Jedis 2.9.x. The default dependency is still 2.9.x, but an application can override this with a dependency on a 3.x version. (Thanks, [robotmlg](https://github.com/launchdarkly/java-server-sdk-redis/pull/3)!) | ||
|
||
## [1.0.0] - 2020-06-02 | ||
Initial release, corresponding to the 5.0.0 release of [`launchdarkly-java-server-sdk`](https://github.com/launchdarkly/java-server-sdk). | ||
|
||
Prior to that release, the Redis integration was built into the main SDK library. For more information about changes in the SDK database integrations, see the [4.x to 5.0 migration guide](https://docs-stg.launchdarkly.com/252/sdk/server-side/java/migration-4-to-5/). | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why this file is showing a diff when main has these changes already.