Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Sourcegraph LaunchDarkly extension design #1249
Feature request description
Sourcegraph LaunchDarkly extension
Is your feature request related to a problem? If so, please describe.
Describe alternatives you've considered.
Every flag has its own page that looks like
Visibility of an LD feature requires a client id which can be obtained similarly to the Codecov extension
For the first feature (seeing whether a feature flag is visible), here are a few related improvements that I think are more valuable than listening for changes in feature flags:
I'm Arnold, I work at LaunchDarkly, and I built our Visual Studio Code extension, which has similar functionality to your extension proposal. We think this is a great idea!
On the other hand, our node sdk does store flag configs in-memory, which will make it much easier to access flag settings (number of user targets, rules, etc). For our VSCode extension, we were able to retrieve and interact with flag configs using the node SDK's internals (see https://github.com/launchdarkly/ld-vscode/blob/master/src/flags.ts#L100).
Also had a question about your planned implementation- will the extension resolve all string literals containing flag keys, or only when they're inside of
Hope the above is helpful! Feel free to @ me with any questions
@yevbar This sounds brilliant! If there is anything I can do to help, let me know.
@atrakh The Sourcegraph extension API is similar to VSCode's and with some tweaks (e.g. higher level of abstraction for showing messages and notifications) you could create an extension that re-uses most of the code in
Here's the API for fetching feature flag info: https://apidocs.launchdarkly.com/docs/get-feature-flag
Here's an example project that uses LaunchDarkly https://github.com/launchdarkly/hello-node/blob/master/index.js
The v1 REST API has been deprecated, and is not compatible with most LaunchDarkly accounts.
If you're planning on using our API over an SDK to retrieve flag data, I'd recommend using the v2 API's flags endpoint. The main difference between the v1 and v2 APIs is that in v2, flags are scoped to projects, and results can be filtered by environment (since your environments, like