Skip to content

[BUG] Local setup with example_flags.json #251

Closed

Description

@josecolella

Observed behavior

I am trying to run the following steps to setup flagd locally with evaluation examples.

I've been able to track it down to the following line:

return fmt.Errorf("invalid sync uri argument: %s", uri)
, but I'm unsure what else is needed

Expected Behavior

I would expect the example to work as described in the documentation:
https://github.com/open-feature/flagd/blob/main/docs/usage/evaluation_examples.md

Steps to reproduce

❯ git clone https://github.com/open-feature/flagd.git 
❯ cd flagd
❯ make build
❯ curl https://raw.githubusercontent.com/open-feature/flagd/main/config/samples/example_flags.json -o example_flags.json

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2517  100  2517    0     0   9954      0 --:--:-- --:--:-- --:--:-- 10149

flagd on  main [?] via  v1.19.4 via  v3.2.0 on   (us-west-2) 
❯ ./flagd start -f example_flags.json

                 ______   __       ________   _______    ______      
                /_____/\ /_/\     /_______/\ /______/\  /_____/\     
                \::::_\/_\:\ \    \::: _  \ \\::::__\/__\:::_ \ \    
                 \:\/___/\\:\ \    \::(_)  \ \\:\ /____/\\:\ \ \ \   
                  \:::._\/ \:\ \____\:: __  \ \\:\\_  _\/ \:\ \ \ \  
                   \:\ \    \:\/___/\\:.\ \  \ \\:\_\ \ \  \:\/.:| | 
                    \_\/     \_____\/ \__\/\__\/ \_____\/   \____/_/ 

{"level":"fatal","ts":1673355270.661315,"caller":"cmd/start.go:112","msg":"invalid sync uri argument: example_flags.json","component":"start","stacktrace":"github.com/open-feature/flagd/cmd.glob..func1\n\t/Users/jose.colella/workspace/flagd/cmd/start.go:112\ngithub.com/spf13/cobra.(*Command).execute\n\t/Users/jose.colella/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:860\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/Users/jose.colella/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:974\ngithub.com/spf13/cobra.(*Command).Execute\n\t/Users/jose.colella/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:902\ngithub.com/open-feature/flagd/cmd.Execute\n\t/Users/jose.colella/workspace/flagd/cmd/root.go:38\nmain.main\n\t/Users/jose.colella/workspace/flagd/main.go:30\nruntime.main\n\t/opt/homebrew/Cellar/go/1.19.4/libexec/src/runtime/proc.go:250"}

Activity

  1. added
    bug
    Needs Triage
    on Jan 10, 2023
  2. toddbaert commented on Jan 10, 2023

    @toddbaert
    Member

    I think all that's going wrong here is the file protocol (file:) is missing. We support a number of them.

    We should fix the doc, and probably improve the error message if that's the problem. A possible enhancement would be to interpret no protocol as "file", but I'm less sure if that's a good idea.

  3. toddbaert commented on Jan 10, 2023

    @toddbaert
    Member

    Thanks for the report @josecolella

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs Triagebug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions