Skip to content

chore: migrating redis store package to java-core - #45

Merged
tanderson-ld merged 3 commits into
mainfrom
ta/migrating-java-server-sdk-redis
Mar 14, 2025
Merged

tanderson-ld merged 3 commits into
mainfrom
ta/migrating-java-server-sdk-redis

Conversation

@tanderson-ld

Copy link
Copy Markdown
Contributor

Migrates redis-store package to java-core package.

@tanderson-ld
tanderson-ld requested a review from a team as a code owner March 14, 2025 15:07

Copy link
Copy Markdown
Contributor Author

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.

@tanderson-ld
tanderson-ld merged commit b9a6f4c into main Mar 14, 2025
@tanderson-ld
tanderson-ld deleted the ta/migrating-java-server-sdk-redis branch March 14, 2025 17:08
kinyoklion added a commit that referenced this pull request Oct 30, 2026
<!-- TERMAG_PR_BODY_BEGIN -->
Moves
[launchdarkly/java-server-sdk-dynamodb](https://github.com/launchdarkly/java-server-sdk-dynamodb)
into `lib/java-server-sdk-dynamodb-store` and releases it with
release-please. It follows the redis-store migration (#45) and the
publishing changes made to that package since then (#48, #82, #153), so
the DynamoDB package uses the same tooling as the rest of the repo.

**Requirements**

- [x] I have added test coverage for new or changed functionality
- [x] I have followed the repository's [pull request submission
guidelines](../blob/main/CONTRIBUTING.md#submitting-pull-requests)
- [ ] I have validated my changes against all supported platform
versions

The library code and tests are unchanged. This PR's CI covers the
platform matrix: Linux on Java 8/11/17/19 and Windows on Java 11/17.

**Describe the solution you've provided**

Package contents (`lib/java-server-sdk-dynamodb-store/`)
- Sources, tests, `checkstyle.xml`, `settings.gradle`, `CHANGELOG.md`
and the Gradle 7.6 wrapper are byte-for-byte copies of
`java-server-sdk-dynamodb@main`. The wrapper is also identical to
redis-store's.
- `.gitignore` is the same as redis-store's.

Build changes (`build.gradle`, `gradle.properties`). The old repo could
no longer publish.
- Replaced `de.marcphilipp.nexus-publish` 0.4.0 and
`io.codearte.nexus-staging` 0.30.0 with
`io.github.gradle-nexus.publish-plugin` 1.3.0, and removed the
`nexusStaging` block. `publish.sh` calls `publishToSonatype
closeAndReleaseSonatypeStagingRepository`, and only the gradle-nexus
plugin provides those tasks.
- `nexusPublishing` now targets the Central Portal OSSRH staging API
(`ossrh-staging-api.central.sonatype.com`) and the Central snapshots
repo, the same as redis-store and otel. Credentials come from
`-PsonatypeUsername`/`-PsonatypePassword` as with the other packages, so
the `ossrhUsername`/`ossrhPassword` properties are gone.
- Removed the `oss.sonatype.org` resolution repository. That host is
retired and now redirects to a Maven Central path that doesn't exist.
Redis-store still lists it and could drop it in a follow-up.
- The POM `url` and `scm` now point at java-core.
- Added `#x-release-please-start-version` markers around `version` in
`gradle.properties`.

Repo wiring
- `release-please-config.json` and `.release-please-manifest.json`:
added `lib/java-server-sdk-dynamodb-store` with package name
`launchdarkly-java-server-sdk-dynamodb-store`, starting from the last
published version, 5.0.0. Tags will look like
`launchdarkly-java-server-sdk-dynamodb-store-5.0.1`.
- `release-please.yml`: added a
`package-server-sdk-dynamodb-store-released` output and a
`release-server-sdk-dynamodb-store` job, a copy of the redis-store job.
- `manual-publish.yml` and `manual-publish-docs.yml`: added the package
to the workspace choices.
- `.github/actions/ci/action.yml`: starts `amazon/dynamodb-local` on
port 8000 when the workspace is this package, like the Redis step.
- New `java-server-sdk-dynamodb-store.yml` workflow:
  - Linux, Java 8/11/17/19, through the shared CI action.
- Windows, Java 11/17. It's laid out like the redis-store Windows job,
except the `Run Tests` step runs on `steps.build.outcome`. The redis job
keys that step on `inputs.run_tests`, which is always empty in a push/PR
workflow, so that step never runs. `build` still runs the tests either
way.
- The old repo's Windows CI downloaded DynamoDB Local from
`s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.zip`.
That file is frozen at 1.25.1 (Nov 2024, from the deprecated 1.x line).
This job downloads the current release instead
(`d1ni2b6xgvw0s0.cloudfront.net/v2.x/dynamodb_local_latest.zip`,
currently 3.3.2), the same version as the Linux `amazon/dynamodb-local`
image. DynamoDB Local 2.6.0+ requires Java 17, so it runs on its own
`setup-java` 17 install while the matrix JDK builds and tests the
library. The setup step now fails if DynamoDB Local exits or isn't
listening on port 8000 within 60 seconds, so a startup failure surfaces
there instead of as test failures.
- Root `README.md`: added a row and link references under "Other
Packages".
- Issue templates: added `package-dynamodb-store--bug_report.md` and
`package-dynamodb-store--feature_request.md`.

Not carried over, because java-core already covers them or doesn't use
them: `.ldrelease/config.yml`, the old CI action and workflow,
`stale.yml`, `dependabot.yml`, `gradle.properties.example`,
`CODEOWNERS`, `LICENSE`, `SECURITY.md` and `CONTRIBUTING.md`.

**Release behavior**

The commit override below makes release-please open a 5.0.1 release PR
for this package after the merge. The only change to the published
artifact is the POM metadata, the same kind of change as redis-store
3.1.1 (#153). That first release exercises the new pipeline end to end:
Central Portal publish, signing, and docs to
`launchdarkly.github.io/java-core/lib/java-server-sdk-dynamodb-store/`.
To merge without releasing, delete the `fix:` line.

BEGIN_COMMIT_OVERRIDE
chore: Migrate java-server-sdk-dynamodb-store to java-core
fix: Update Maven POM URLs to java-core
END_COMMIT_OVERRIDE

**Validation done locally** (Temurin 8 container next to an
`amazon/dynamodb-local` container)
- `gradlew dependencies`, `build` (which includes
`checkstyleMain`/`checkstyleTest`), `jar` and `javadoc` all succeed. 27
tests pass, 0 fail.
- `gradlew tasks --all` lists `publishToSonatype` and
`closeAndReleaseSonatypeStagingRepository`.
- `publishToMavenLocal` produces the jar, sources, javadoc, `.module`
and a POM with java-core `url`/`scm`.
- All changed workflow and action YAML parses.

**Before merging**
- [ ] Create the `package: java-server-sdk-dynamodb-store` label in
java-core. The new issue templates and the README issues link use it.

**After the first release from java-core**
- [ ] Confirm `5.0.1` is on Maven Central and the docs are on GitHub
Pages.
- [ ] Update the old repo's README to point at java-core, then archive
`launchdarkly/java-server-sdk-dynamodb`, as was done for
`java-server-sdk-redis`. Its maintenance branches (`2.x`, `3.x`, `4.x`,
`aws-v1`) aren't migrated. It has no open issues or PRs.
- [ ] Check docs.launchdarkly.com's DynamoDB page for links to the old
repo or API docs.

**Describe alternatives you've considered**

- Gradle 9 (old repo PR #38): left out so the package matches
redis-store and the rest of the repo on 7.6. Upgrading the Gradle
wrapper can be done in a follow-up for the whole repo.
- Keeping git history: the earlier migrations copied files and java-core
squash-merges, so this PR does the same.

**Additional context**

Follow-ups this PR deliberately doesn't change, so the move stays
behavior-neutral:
- The `software.amazon.awssdk:dynamodb` API dependency is still pinned
at 2.10.32 (2019). Applications get that version transitively unless
they declare their own.
- The minimum SDK version is still 6.0.0, where redis-store uses 6.3.0.
- The old repo had Dependabot with a 7-day cooldown, but java-core has
no Dependabot config.
<!-- TERMAG_PR_BODY_END -->

<!-- termag: box=i-0001945826233b631
project=release-please-support-java-dynamo -->
<sub>Opened from termag</sub>

[SDK-3421](https://launchdarkly.atlassian.net/browse/SDK-3421)


[SDK-3421]:
https://launchdarkly.atlassian.net/browse/SDK-3421?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants