-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: Add dev server (AKA LaunchDevly) #364
Open
mike-zorn
wants to merge
67
commits into
main
Choose a base branch
from
moonshot-ld-dev-server
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
incase we also proxy apis with this thing
adding getProject
delete project
* unmarshal flagstate * use our own type for state * add logging and panic handling * hello js works
* add delete dev project * fix projects postBody * add overrides table * add override * remove override * remove delete proj stuff * fix imports * pr feedback * add todo
adding groups to the commands
* unmarshal flagstate * use our own type for state * add note about cors * streaming
* Move devserver db to XDG_STATE_HOME * Move devserver db to XDG_STATE_HOME * Use XDG lib instead
* Use go generate instead of make * Add ui asset handler
* adding sync project api * adding expand to post * updating cli command to match actual api * minor refactor
* add dev stream uri to config file * actually use the value * change variable name
* feat: add frontend build * tweak fs so that the paths work out --------- Co-authored-by: Mike Zorn <[email protected]>
* adding context to post and patch * refactoring out the expand params
bug: fix override
add new dev-server ui cmd
This adds support for mobile and PHP SDKs. It also relocates the list of the supported endpoints to the package docs instead of a random comment.
Improves error handling when an sdk connects and a project is missing. Previous behavior was a scary panic log. Now there's a more helpful ``` 2024/06/28 16:26:02 project, default2, not found 2024/06/28 16:26:02 You may need to call ldcli dev-server add-project ```
This adds some integration tests for go server SDK & Dev server.
* check if flag exists before adding override * fix error handling * fix imports
This ended up being needed because a dependency used a standard library package which became available in 1.22.
* Remove WIP comments with API ideas No longer relevant * add failing unit test for deregister issue * use sync map
* add store mock and bundle mocks together in same directory * override.go tests * new test file and put observer_test in test package * more tests * Final project tests * fix nit and tests, add more coverage * PR suggestions
Documents the build process for the dev server. Also fixes a go generate command and removes an extraneous comment.
* chore: Replace login client with resources client (#366) Replace login client with resources client * Ensure extra trailing slash doesn't break requests * use new unauthenticated request method on resources client * fix imports --------- Co-authored-by: Danny Olson <[email protected]>
#373) * add params object to allow easier extensibility of function args * don't allow full customization of the IP, just port (duh) * Add cmd param * reorderin' Co-authored-by: Mike Zorn <[email protected]> --------- Co-authored-by: Mike Zorn <[email protected]>
* Add event, emit event, rename a field * server side update * client side event * Code consolidation and cleanup * little more cleanup * half an attempt at an integration test * correct log text * add overrides * add expected times (causes timeout) * make test go * Make comment more accurate Co-authored-by: Mike Zorn <[email protected]> * chans are pointer types already * modify test --------- Co-authored-by: Mike Zorn <[email protected]>
* JSON flags now use modal, catch formatting errors * fixed 'only show flags with overrides' bug * refactoring * refactoring * json update modal now dismissed when new override value accepted * minor tweak * remove unnecessarily generated /bin, /.vscode, and undo version change to package-lock * Use close render prop from Dialog --------- Co-authored-by: Abram Thau <[email protected]> Co-authored-by: Keegan Watkins <[email protected]>
Allow customized contexts when creating a project
* rename function to be more accurate * first couple tests * more tests * add remaining tests * rename function to be more accurate
…nt (#380) Return 400 if sourceEnvironmentKey is not present in Post endpoint
fix: Fixup startup logging
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Requirements
Related issues
N/A
Describe the solution you've provided
This adds a new command to the cli,
dev-server
. When youstart
it, an HTTP server starts running on port 8765. It provides APIs that mimic the APIs that LaunchDarkly SDKs use. You canadd-project
s to the dev server and they will be populated with flag values from thesource-environment
. You can alsoadd-override
s to change the value served by a given flag. There's also a UI that will display which flag values are being served and allow you to set overrides.These features combine to provide a more portable solution for local & ephemeral development environments of projects using LaunchDarkly than the current state of the art: creating real environments in LaunchDarkly for each of these environments.
Describe alternatives you've considered
N/A
Additional context
Internal to LaunchDarkly Epic that details some loose ends on the dev server that are in progress.