feat: Add dev server (AKA LaunchDevly)#364
Conversation
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
dbolson
left a comment
There was a problem hiding this comment.
Is there any reason not to merge this in?
|
Before merging, I do need to change how we're linking c dependencies. We're doing static linking of glib which is not recommended. 🤞🏻 I can make that improvement today. There were also some concerns re: bloating the CLI that we should discuss internally. |
Return a 409 when a project already exists in the dev server (vs. 500).
|
As a side note, it might be nice to stop vendoring deps so we don't have 743 changes here (unless someone is going to audit all of the deps.) |
Let's be sure to test on Linux because this happened previously when CGO was enabled |
Co-authored-by: Casey Waldren <cwaldren@launchdarkly.com>
This wraps some errors we don't own in the adapters so that the message indicates what the failure was.
Co-authored-by: Mike Zorn <mike@launchdarkly.com>
| - amd64 | ||
| - arm64 | ||
| ldflags: | ||
| - -s |
There was a problem hiding this comment.
Can we get comments on what each flag is doing?
| goarch: "386" | ||
| env: | ||
| - CGO_ENABLED=0 | ||
| - TOOLCHAIN_BASE= |
There was a problem hiding this comment.
A comment explaining what this is trying to achieve (and why we need to do it manually) would be great 👍
| env: | ||
| - GO111MODULE=on | ||
| - CGO_ENABLED=1 | ||
| - DOCKER_CLI_EXPERIMENTAL=enabled |
There was a problem hiding this comment.
Comment explaining why each of these is needed would be great
| env: | ||
| GITHUB_TOKEN: ${{ inputs.token }} | ||
| HOMEBREW_DEPLOY_KEY: ${{ inputs.homebrew-gh-secret }} | ||
| - name: Upload assets |
There was a problem hiding this comment.
Has it been verified that the uploaded results exactly match (or are expected) compared to previous releases, since the goreleaser-action is no longer being used?
There was a problem hiding this comment.
We're still using the goreleaser action. We're just also uploading the artifacts that were generated alongside the action run, so that it's easier to test dry runs.
| shell: bash | ||
| run: | | ||
| echo $DOCKER_TOKEN | docker login --username $DOCKER_USERNAME --password-stdin | ||
| CONTAINER_ID="$( |
There was a problem hiding this comment.
Comment explaining why the normal goreleaser-action can't be used would be great
Requirements
Related issues
N/A
Describe the solution you've provided
This adds a new command to the cli,
dev-server. When youstartit, an HTTP server starts running on port 8765. It provides APIs that mimic the APIs that LaunchDarkly SDKs use. You canadd-projects to the dev server and they will be populated with flag values from thesource-environment. You can alsoadd-overrides 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.