Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Commit 0066793

Browse files
LaunchDarklyReleaseBoteli-darklyLaunchDarklyCIgwhelanLDssrm
authored
prepare 5.10.3 release (#283)
* fix release metadata * prepare 4.14.1 release (#200) * Releasing version 4.14.1 * exclude Kotlin metadata from jar + fix misc Gradle problems * update CI and Gradle to test with newer JDKs (#259) * update okhttp to 3.14.9 (fixes incompatibility with OpenJDK 8.0.252) * prepare 4.14.2 release (#205) * Releasing version 4.14.2 * update okhttp to 4.8.1 (fixes incompatibility with OpenJDK 8.0.252) * gitignore * Bump SnakeYAML from 1.19 to 1.26 to address CVE-2017-18640 * prepare 4.14.3 release (#209) * Releasing version 4.14.3 * comments * only log initialization message once in polling mode * [ch89935] Correct some logging call format strings (#264) Also adds debug logs for full exception information in a couple locations. * [ch90109] Remove outdated trackMetric comment from before service support. (#265) * Fix compatibility with Java 7. * Remove import that is no longer used. * add Java 7 build (#267) * prepare 4.14.4 release (#214) * Releasing version 4.14.4 * add and use getSocketFactory * alignment * add socketFactory to builder * test socket factory builder * preserve dummy CI config file when pushing to gh-pages (#271) * fix concatenation when base URI has a context path (#270) * fix shaded jar builds to exclude Jackson classes and not modify Jackson return types (#268) * add test httpClientCanUseCustomSocketFactory for DefaultFeatureRequestor * add httpClientCanUseCustomSocketFactory() test for DefaultEventSenderTest * add httpClientCanUseCustomSocketFactory() test to StreamProcessorTest * pass URI to in customSocketFactory event test * make test less ambiguous * copy rules to new FlagBuilder instances (#273) * Bump guava version (#274) * Removed the guides link * increment versions when loading file data, so FlagTracker will work (#275) * increment versions when loading file data, so FlagTracker will work * update doc comment about flag change events with file data * add ability to ignore duplicate keys in file data (#276) * add alias events (#278) * add alias events and function * update tests for new functionality * update javadoc strings * add validation of javadoc build to CI * update commons-codec to 1.15 (#279) * Add support for experiment rollouts * add tests and use seed for allocating user to partition * test serialization and add check for isExperiment * fix PollingProcessorTest test race condition + other test issues (#282) * use launchdarkly-java-sdk-common 1.1.0-alpha-expalloc.2 * Update src/test/java/com/launchdarkly/sdk/server/EvaluatorTest.java Co-authored-by: Sam Stokes <sstokes@launchdarkly.com> * Update src/test/java/com/launchdarkly/sdk/server/EvaluatorTest.java Co-authored-by: Sam Stokes <sstokes@launchdarkly.com> * Update src/test/java/com/launchdarkly/sdk/server/EvaluatorTest.java Co-authored-by: Sam Stokes <sstokes@launchdarkly.com> * Update src/test/java/com/launchdarkly/sdk/server/EvaluatorTest.java Co-authored-by: Sam Stokes <sstokes@launchdarkly.com> * changes per code review comments * Please enter the commit message for your changes. Lines starting * fix null pointer exception * address code review comments * address more comments * missed a ! for isUntracked() * fix default boolean for json * make untracked FALSE by default * refactoring of bucketing logic to remove the need for an extra result object (#283) * add comment to enum * various JSON fixes, update common-sdk (#284) * simlpify the logic and make it match node/.Net sdks * Update src/main/java/com/launchdarkly/sdk/server/EventFactory.java Co-authored-by: Sam Stokes <sstokes@launchdarkly.com> * add the same comment as the Node SDK * Remove outdated/meaningless doc comment. (#286) * protect against NPEs if flag/segment JSON contains a null value * use java-sdk-common 1.2.0 * fix Jackson-related build issues (again) (#288) * update to okhttp-eventsource patch for stream retry bug, improve tests (#289) * update to okhttp-eventsource patch for stream retry bug, improve test * add test for appropriate stream retry * add public builder for FeatureFlagsState (#290) * add public builder for FeatureFlagsState * javadoc fixes * clarify FileData doc comment to say you shouldn't use offline mode (#291) * improve validation of SDK key so we won't throw an exception that contains the key (#293) * fix javadoc link in FileData comment (#294) * fix PollingProcessor 401 behavior and use new HTTP test helpers (#292) * re-fix metadata to remove Jackson dependencies, also remove Class-Path from manifest (#295) * make FeatureFlagsState.Builder.build() public (#297) * clean up tests using java-test-helpers 1.1.0 (#296) * use Releaser v2 config + newer CI images (#298) * [ch123129] Fix `PollingDataSourceBuilder` example. (#299) * Updates docs URLs * always use US locale when parsing HTTP dates * use Gson 2.8.9 * don't try to send more diagnostic events after an unrecoverable HTTP error * ensure module-info file isn't copied into our jars during build * use Gradle 7 * update build for benchmarks * more Gradle 7 compatibility changes for benchmark job * test with Java 17 in CI (#307) * test with Java 17 in CI * also test in Java 17 for Windows * fix choco install command * do date comparisons as absolute times, regardless of time zone (#310) * fix suppression of nulls in JSON representations (#311) * fix suppression of nulls in JSON representations * distinguish between situations where we do or do not want to suppress nulls * fix identify/track null user key check, also don't create index event for alias * use latest java-sdk-common * fix setting of trackEvents/trackReason in allFlagsState data when there's an experiment * implement contract tests (#314) * Merge Big Segments feature branch for 5.7.0 release (#316) Includes Big Segments implementation and contract test support for the new behavior. * Fix for pom including SDK common library as a dependency. (#317) * use new logging API * update readme notes about logging * set base logger name for SDK per test * comment * javadoc fixes * revert accidental commit * Upload JUnit XML to CircleCI on failure (#320) Fix a bug in the CircleCI config that was only uploading JUnit XML on _success_, not failure. * Add application tag support (#319) * Enforce 64 character limit on application tag values (#323) * fix "wrong type" logic in evaluations when default value is null * Rename master to main in .ldrelease/config.yml (#325) * Simpler way of setting base URIs in Java (#322) Now supports the `ServiceEndpoints` config for setting custom URIs for endpoints in a single place * update logging info in readme * use 1.0.0 release of logging package * misc cleanup * remove unnecessary extra interfaces, just use default methods instead * make BigSegmentStoreWrapper.pollingDetectsStaleStatus test less timing-sensitive * make LDEndToEndClientTest.test____SpecialHttpConfigurations less timing-sensitive * make data source status tests less timing-sensitive * use streaming JSON parsing for incoming LD data * fix tests * rm unused * rm unused * use okhttp-eventsource 2.6.0 * update eventsource to 2.6.1 to fix pom/manifest problem * increase efficiency of summary event data structures (#335) * make reusable EvaluationDetail instances as part of flag preprocessing (#336) * make evaluator result object immutable and reuse instances * comment * avoid creating List iterators during evaluations * remove unnecessary copy * fix allFlagsState to not generate prereq eval events * add "...ForAll" TestData methods to replace "...ForAllUsers" * bump okhttp & okhttp-eventsource dependencies * update comment to clarify that level() doesn't apply to SLF4J * update readme to mention different logging examples in hello-java * switch to use snapshot build of java-logging, pending next release * level setting does not apply to SLF4J and JUL * use java-logging 1.1.0 release * make sure META-INF files are never mistaken for classes and relocated * update shared data store test logic to pass ClientContext with logger * enable external javadoc links for com.launchdarkly.logging types * use variable for dependency version * fix flaky big segment status polling tests * Update Windows orb, fix Windows JDK install in CI (#372) * update snakeyaml for CVE-CVE-2022-25857 * latest snakeyaml is 1.31 * bump snakeyaml version for CVE-2022-38752 * disable Windows Java 11 build * fix packaging of com.launchdarkly.logging classes * rm debugging * reconsidered - let's include the logging classes in the jars * fix packaging test logic * correct documentation Co-authored-by: Eli Bishop <eli@launchdarkly.com> Co-authored-by: LaunchDarklyCI <LaunchDarklyCI@users.noreply.github.com> Co-authored-by: LaunchDarklyCI <dev@launchdarkly.com> Co-authored-by: Gavin Whelan <gwhelan@launchdarkly.com> Co-authored-by: ssrm <ssrm@users.noreply.github.com> Co-authored-by: Harpo Roeder <hroeder@launchdarkly.com> Co-authored-by: Ben Woskow <48036130+bwoskow-ld@users.noreply.github.com> Co-authored-by: Elliot <35050275+Apache-HB@users.noreply.github.com> Co-authored-by: Robert J. Neal <rneal@launchdarkly.com> Co-authored-by: Robert J. Neal <robertjneal@users.noreply.github.com> Co-authored-by: Sam Stokes <sstokes@launchdarkly.com> Co-authored-by: LaunchDarklyReleaseBot <launchdarklyreleasebot@launchdarkly.com> Co-authored-by: Ember Stevens <ember.stevens@launchdarkly.com> Co-authored-by: ember-stevens <79482775+ember-stevens@users.noreply.github.com> Co-authored-by: Alex Engelberg <alex.benjamin.engelberg@gmail.com> Co-authored-by: Alex Engelberg <aengelberg@launchdarkly.com>
1 parent 9ea4f95 commit 0066793

File tree

4 files changed

+23
-17
lines changed

4 files changed

+23
-17
lines changed

.circleci/config.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ workflows:
2929
- benchmarks:
3030
requires:
3131
- build-linux
32-
- build-test-windows:
33-
name: Java 11 - Windows - OpenJDK
34-
openjdk-version: 11.0.2.01
32+
# Windows Java 11 build is temporarily disabled - see story 171428
33+
# - test-windows:
34+
# name: Java 11 - Windows - OpenJDK
35+
# openjdk-version: 11.0.2.01
3536
- build-test-windows:
3637
name: Java 17 - Windows - OpenJDK
3738
openjdk-version: 17.0.1

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ This version of the LaunchDarkly SDK works with Java 8 and above.
1717

1818
Three variants of the SDK jar are published to Maven:
1919

20-
* The default uberjar - this is accessible as `com.launchdarkly:launchdarkly-java-server-sdk:jar` and is the dependency used in the "[Getting started](https://docs.launchdarkly.com/sdk/server-side/java#getting-started)" section of the SDK reference guide as well as in the [`hello-java`](https://github.com/launchdarkly/hello-java) sample app. This variant contains the SDK classes, and all of the SDK's dependencies except for SLF4J, which must be provided by the host application. The bundled dependencies have shaded package names (and are not exported in OSGi), so they will not interfere with any other versions of the same packages.
20+
* The default uberjar - this is accessible as `com.launchdarkly:launchdarkly-java-server-sdk:jar` and is the dependency used in the "[Getting started](https://docs.launchdarkly.com/sdk/server-side/java#getting-started)" section of the SDK reference guide as well as in the [`hello-java`](https://github.com/launchdarkly/hello-java) sample app. This variant contains the SDK classes, and all of the SDK's dependencies except for SLF4J (the SLF4J API is assumed to be brought in automatically as Maven dependencies, or otherwise made available in the classpath of the host application). All third-party bundled dependencies have shaded package names (and are not exported in OSGi), so they will not interfere with any other versions of the same packages.
2121
* The extended uberjar - add `<classifier>all</classifier>` in Maven, or `:all` in Gradle. This is the same as the default uberjar except that SLF4J is also bundled, without shading (and is exported in OSGi).
22-
* The "thin" jar - add `<classifier>thin</classifier>` in Maven, or `:thin` in Gradle. This contains _only_ the SDK classes.
22+
* The "thin" jar - add `<classifier>thin</classifier>` in Maven, or `:thin` in Gradle. This contains _only_ the SDK classes. Applications using this jar must provide all of the dependencies that are in the SDK's `build.gradle`, so it is intended for use only in special cases.
2323

2424
## Getting started
2525

build.gradle

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,17 @@ ext.versions = [
8181
"jedis": "2.9.0"
8282
]
8383

84-
// Add dependencies to "libraries.internal" that we use internally but do not expose in
85-
// our public API. Putting dependencies here has the following effects:
84+
// Add dependencies to "libraries.internal" that we use internally but do not necessarily
85+
// expose in our public API. Putting dependencies here has the following effects:
8686
//
8787
// 1. Those classes will be embedded in the default uberjar
8888
// (launchdarkly-java-server-sdk-n.n.n.jar), and also in the "all" jar
8989
// (launchdarkly-java-server-sdk-n.n.n.jar).
9090
//
9191
// 2. The classes are renamed (shaded) within those jars, and all references to them are
92-
// updated to use the shaded names.
92+
// updated to use the shaded names. The only exception to this is classes from
93+
// launchdarkly-java-sdk-common and launchdarkly-logging, which are meant to be part of
94+
// the public API.
9395
//
9496
// 3. The "thin" jar does not contain those classes, and references to them from the code
9597
// in the "thin" jar are *not* renamed. If an application is using the "thin" jar, it is
@@ -110,6 +112,7 @@ ext.versions = [
110112
// headers for it.
111113
libraries.internal = [
112114
"com.launchdarkly:launchdarkly-java-sdk-common:${versions.launchdarklyJavaSdkCommon}",
115+
"com.launchdarkly:launchdarkly-logging:${versions.launchdarklyLogging}",
113116
"commons-codec:commons-codec:${versions.commonsCodec}",
114117
"com.google.code.gson:gson:${versions.gson}",
115118
"com.google.guava:guava:${versions.guava}",
@@ -132,7 +135,6 @@ libraries.internal = [
132135
// also as package exports (i.e. it provides them if a newer version is not available
133136
// from an import).
134137
libraries.external = [
135-
"com.launchdarkly:launchdarkly-logging:${versions.launchdarklyLogging}",
136138
"org.slf4j:slf4j-api:${versions.slf4j}"
137139
]
138140

@@ -229,8 +231,9 @@ jar {
229231
}
230232
}
231233

232-
// This builds the default uberjar that contains all of our dependencies except Gson and
233-
// SLF4j, in shaded form. The user is expected to provide Gson and SLF4j.
234+
// This builds the default uberjar that contains all of our dependencies in shaded form,
235+
// as well as com.launchdarkly.logging in unshaded form, but does not contain SLF4J. The
236+
// user is expected to provide SLF4J.
234237
shadowJar {
235238
// No classifier means that the shaded jar becomes the default artifact
236239
classifier = ''
@@ -265,7 +268,7 @@ shadowJar {
265268
}
266269

267270
// This builds the "-all"/"fat" jar, which is the same as the default uberjar except that
268-
// Gson and SLF4j are bundled and exposed (unshaded).
271+
// SLF4J is also bundled and exposed (unshaded).
269272
task shadowJarAll(type: com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
270273
classifier = 'all'
271274
group = "shadow"
@@ -290,9 +293,9 @@ task shadowJarAll(type: com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJ
290293
// configuration phase; this is necessary because they access the build products
291294
doFirst {
292295
shadeDependencies(project.tasks.shadowJarAll)
293-
// The "all" jar exposes its bundled SLF4j dependency as an export - but, like the
294-
// default jar, it *also* imports it ("self-wiring"), which allows the bundle to use a
295-
// higher version if one is provided by another bundle.
296+
// The "all" jar exposes its bundled SLF4j and launchdarkly-logging dependencies as
297+
// exports - but, like the default jar, it *also* imports them ("self-wiring"), which
298+
// allows the bundle to use a higher version if one is provided by another bundle.
296299
addOsgiManifest(project.tasks.shadowJarAll, [ project.configurations.imports ], [ project.configurations.imports ])
297300
}
298301

@@ -351,7 +354,7 @@ if (JavaVersion.current().isJava8Compatible()) {
351354
// enclosing packages like "com" that don't have any classes in them.
352355
def getAllSdkPackages() {
353356
// base package classes come from launchdarkly-java-sdk-common
354-
def names = [ "com.launchdarkly.sdk", "com.launchdarkly.sdk.json" ]
357+
def names = [ "com.launchdarkly.sdk", "com.launchdarkly.sdk.json", "com.launchdarkly.logging" ]
355358
project.convention.getPlugin(JavaPluginConvention).sourceSets.main.output.each { baseDir ->
356359
if (baseDir.getPath().contains("classes" + File.separator + "java" + File.separator + "main")) {
357360
baseDir.eachFileRecurse { f ->
@@ -505,7 +508,7 @@ def forEachArtifactAndVisiblePackage(configs, closure) {
505508
configs.collectMany { it.resolvedConfiguration.resolvedArtifacts }
506509
.collectMany { a ->
507510
def exportedPackages = getOsgiPackageExportsFromJar(a.file)
508-
if (exportedPackages == null) {
511+
if (exportedPackages == null || exportedPackages.size == 0) {
509512
// This dependency didn't specify OSGi exports, so we'll just have to assume that
510513
// we might need to use any package that's in this jar (with a little special-casing
511514
// to exclude things we probably should not be importing).

packaging-test/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ test-all-jar-classes: $(SDK_ALL_JAR) $(TEMP_DIR)
8787
@$(call caption,$@)
8888
@$(call classes_prepare,$<)
8989
@$(call verify_sdk_classes)
90+
@$(call classes_should_contain,com/launchdarkly/logging,unshaded com.launchdarkly.logging classes)
9091
@$(call classes_should_contain,org/slf4j,unshaded SLF4j)
9192
@$(call classes_should_not_contain,com/launchdarkly/shaded/com/launchdarkly/sdk,shaded SDK classes)
9293
@$(call classes_should_contain,com/launchdarkly/shaded/com/google/gson,shaded Gson)
@@ -101,6 +102,7 @@ test-default-jar-classes: $(SDK_DEFAULT_JAR) $(TEMP_DIR)
101102
@$(call caption,$@)
102103
@$(call classes_prepare,$<)
103104
@$(call verify_sdk_classes)
105+
@$(call classes_should_contain,com/launchdarkly/logging,unshaded com.launchdarkly.logging classes)
104106
@$(call classes_should_not_contain,com/launchdarkly/shaded/com/launchdarkly/sdk,shaded SDK classes)
105107
@$(call classes_should_contain,com/launchdarkly/shaded/com/google/gson,shaded Gson)
106108
@$(call classes_should_not_contain,com/launchdarkly/shaded/org/slf4j,shaded SLF4j)

0 commit comments

Comments
 (0)