Git Product home page Git Product logo

Comments (5)

luanxuechao avatar luanxuechao commented on June 19, 2024

Hi @thomaspoignant , I try to fix it, but I've found a bug in local, when I set yaml in the local:

listen: 1031
pollingInterval: 1000
startWithRetrieverError: false
retriever:
  kind: http
  url: https://raw.githubusercontent.com/thomaspoignant/go-feature-flag/main/examples/retriever_file/flags.goff.yaml
retrievers:
   - kind: file
     path: examples/retriever_file/flags.goff.yaml
  - kind: file
    path: examples/retriever_file/flags.goff.yaml

exporter:
  kind: log
enableSwagger: true
authorizedKeys:
  evaluation:
    - apikey1 # owner: userID1
    - apikey2 # owner: userID2
  admin:
    - apikey3

the retrievers of config can't load from the yaml file.

from go-feature-flag.

thomaspoignant avatar thomaspoignant commented on June 19, 2024

@luanxuechao from your example I see an indentation issue in your file on the providers.
Can you try this one instead?

listen: 1031
pollingInterval: 1000
startWithRetrieverError: false
retriever:
  kind: http
  url: https://raw.githubusercontent.com/thomaspoignant/go-feature-flag/main/examples/retriever_file/flags.goff.yaml
retrievers:
  - kind: file
    path: examples/retriever_file/flags.goff.yaml
  - kind: file
    path: examples/retriever_file/flags.goff.yaml

exporter:
  kind: log
enableSwagger: true
authorizedKeys:
  evaluation:
    - apikey1 # owner: userID1
    - apikey2 # owner: userID2
  admin:
    - apikey3

Can you double check if this will solve your issue?

from go-feature-flag.

luanxuechao avatar luanxuechao commented on June 19, 2024

Hi @thomaspoignant, it doesn't work. I run the relayproxy/main.go with goff-proxy.yaml, and debug it. I'm new developer of golang. I also can reproduce it with json config. go version is: go version go1.22.3 darwin/arm64
image

from go-feature-flag.

thomaspoignant avatar thomaspoignant commented on June 19, 2024

@luanxuechao I've tried the same file as you and I don't reproduce.
What I have done:

  1. copy/paste the file (the one edited by myself in the previous comment) in the root directory of go-feature-flag.
  2. Start the relay-proxy in IntelliJ (inside cmd/relay-proxy/main.go).
  3. Add a debugger point at this line:
    apiServer := api.New(proxyConf, services, zapLog)
  4. Here is the output I got:
    Screenshot 2024-05-15 at 12 31 58

from go-feature-flag.

thomaspoignant avatar thomaspoignant commented on June 19, 2024

@luanxuechao if you want you can also join the slack channel https://gofeatureflag.org/slack and we can discuss about your issue there.

from go-feature-flag.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.