-
Notifications
You must be signed in to change notification settings - Fork 209
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(cmd/flipt-edge): lean, mean flag evaluating machine #3491
base: main
Are you sure you want to change the base?
Conversation
var ( | ||
rootCmd = &cobra.Command{ | ||
Use: "flipt-edge <command> <subcommand> [flags]", | ||
Short: "Flipt edge is a modern, self-hosted, lean Flipt feature flag evaluation service", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking great! couple minor things so far
|
||
g, ctx := errgroup.WithContext(ctx) | ||
|
||
if err := initMetaStateDir(cfg); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also will prob want to adjust the name of this state file incase someone runs Flipt Edge and Flipt on the same machine (at different times)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good shout!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After looking at this one too. I think actually leaving this path as-is, is both convient from a complexity standpoint, as well as being reasonably safe to do.
I think for 1, people will likely not run them on the same machine.
At-least, they will likely run these in a containerized environment. In which case, they're already isolated.
Secondly, edge consumes a subset of the full config. So it may just work.
Also, we never overwrite this config, we just read it. So I don't think we have a chance of corrupting anything.
If anything, it may just be useful that you can switch between the two without having to do much.
8401a53
to
2412c11
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3491 +/- ##
==========================================
- Coverage 65.74% 63.98% -1.77%
==========================================
Files 169 175 +6
Lines 13629 14206 +577
==========================================
+ Hits 8961 9089 +128
- Misses 3983 4415 +432
- Partials 685 702 +17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
2412c11
to
467ad8c
Compare
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
…o gm/flipt-edge * 'gm/flipt-edge' of https://github.com/flipt-io/flipt: docs: add devumesh as a contributor for code (#3512) feat(ext): determinism in exporting and declarative formats (#3509) fix: skip authz for clickhouse (#3511)
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
@GeorgeMac i setup a nightly workflow that I cant run until this is merged, to test the publishing I also was trying to figure out how to setup ITs for just |
- name: Run UI Tests | ||
uses: dagger/dagger-for-github@v6 | ||
with: | ||
verb: call | ||
version: ${{ env.DAGGER_VERSION }} | ||
args: test --source .:default ui | ||
cloud-token: ${{ secrets.DAGGER_CLOUD_TOKEN }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i decided to remove Dagger Cloud because im not sure we're benefiting too much from it and I also don't think this free-disk-space action works incredibly well. The disk space usage is caused by Dagger Cloud downloading the entire cache history (I think) on run, which both slows down CI and blows up our disk.
@markphelps yeah I just took a run at this and then got as far as realizing we don't expose anything under To me the quickest option I currently see is to write evaluation specific test suites in just to exercise edge. Also, we could defer doing that and consider edge to be alpha/beta for now until we have that settled. |
Lean, mean flag evaluating machine.
Im opening this up as a draft to get it on folks radars, while I work on other related bits.
This is a proposal PR containing a thinned down Flipt binary, which only supports evaluation.
You can think of it as a purely in-memory evaluation proxy.
This leaner build is more appropriate for pairing with Cloud as it does not carry around unnecessary baggage.
The following is a list of changes compared with Flipt proper:
local
,git
,object
andoci
backends).Notes
Storage
This build will continue to support sourcing from declarative (file / snapshot) stores.
We're also considering some more remote backends in the near future (these will likely be supported in Flipt too):
Authentication
We only support JWT for now as it is the only truly decentralized / stateless mechanism we have in Flipt.
Even the k8s method exchanged a service account token for a client token stored in the backing DB.
We could add support for a few more stateless authn methods like:
Outstanding