Comments (4)
Hi zacyang,
Thanks for the suggestion. This is a low priority at the moment since we don't believe this feature request to be something that would be generally useful to most customers, but we'll keep this issue for future consideration.
Ben
from java-server-sdk.
It'd be easier to determine the best approach to this if the use case was clearer. This is something that could only be done when you have a live connection to LaunchDarkly - so, when you say "I needed a test", do you mean you would have a unit test or integration test that would actually connect to LD? Generally speaking it's not advisable to have CI tests like this rely on an external service. Or would this be something that is used in production by your application?
It sounds like whichever context you want this in, you are already doing it now via your REST workaround so I'm sure you're already aware of the tradeoffs, but I'd just like to understand the intended usage better.
from java-server-sdk.
@eli-darkly , thanks for getting back to me.
Yes, we used a live connection to live LD in CI. Reason for this is, we have some feature switch based on variant. The value in the variants determine the behaviours of some particular actions,
e.g ["db", "kafka"] means event A need to be save to both database and publish to kafka.
This is critical for us to guarantee the semantics (exactly once) of the events, therefor I need some test to make sure the variants are what we think it is before deploying to prod.
And you are right, I've implemented the test based on the rest api you guys provided, just thought it would be nicer to have it thru client.
from java-server-sdk.
Hi @zacyang ,
After re-reading this ticket, I realize that we had a solution for you all along. We maintain a set of client libraries for interacting with LaunchDarkly's REST API. These clients are auto-generated from our OpenAPI spec. Most relevant here is api-client-java.
Once you add api-client-java to your application you can use FeatureFlagsApi#getFeatureFlag(string)
to get your flag and then call getVariations
on the flag to get all possible variations. This is our recommended approach for doing so programmatically through a LaunchDarkly-provided client library.
The reason for maintaining API client libraries separate from our SDKs (java-server-sdk and others) is to allow our SDKs to be as lightweight as possible. We generally only add functionality to the SDKs when the functionality is common and/or crucial to the flow of evaluating flag rulesets on behalf of users, sending events back to LaunchDarkly, and so forth. All other functionality should be accessed through our REST APIs by our auto-generated API client libraries.
I'm going to close this ticket now. Cheers,
Ben
from java-server-sdk.
Related Issues (20)
- Getting numerous Error posting diagnostic event (giving up permanently): HTTP error 401 (invalid SDK key) HOT 2
- Synk reports the low version of okHttp3 dependency HOT 3
- Vulnerability in snakeyaml HOT 3
- LaunchDarkly Client initialing failed even add LaunchDarkly Certificate to java key store. HOT 9
- Add shaded libraries as dependencies to `-thin` jar HOT 2
- `isInitialized` & `dataStore.isInitialized()` HOT 3
- Please provide ability to `LDClient` in non-blocking manner HOT 4
- fat jar brings in duplicate copy of `launchdarkly-logging` HOT 3
- Allow lazily computed defaultValues in LDClient to improve code readability HOT 6
- java-server-sdk is vulnerable to CVE-2022-1471 RCE HOT 3
- Builder object is not exist in V6 but is taken as an example in the docs HOT 6
- Evaluation can throw when the same segment is used in multiple rules within a single flag HOT 6
- StreamClosedByServerException: Stream closed by server HOT 13
- Vulnerability CVE-2022-1471 is introduced via SnakeYaml 1.32. Upgrading to 2.0 should fix it. HOT 3
- Have a robust in memory datastore fallback when the persistent data store connection is not working HOT 2
- update to guava 32.0.0 to resolve CVE-2023-2976 HOT 6
- ApiException.getMessage throws NullPointerException when IOException occurs HOT 1
- Stream continuously reset HOT 2
- Support for use of java-server-sdk library in GraalVM native image applications HOT 8
- `launchdarkly-java-server-sdk:6.3.0` : causing LdFeatureFlagClient not initialized after '10' seconds! Until we restart the machine intermittently. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from java-server-sdk.