Git Product home page Git Product logo

Comments (10)

replicant0wnz avatar replicant0wnz commented on August 14, 2024 1

So, I'm kinda an idiot. Consul doesn't support lists, it's key/value. It supports lists in the manner that the value can be raw json or yaml. So if you want a list you have to store it as such. So just do:

test: |
- blah
- blah
- blah

If the code was modified, it would have to store it that way anyway .. May be kinda a pain if you already have existing yaml code, but we are starting from scratch so we're just gonna use this method.

from git2consul-go.

seanmalloy avatar seanmalloy commented on August 14, 2024

@Garagoth thanks opening this issue. Would you be willing to submit a pull request for this enhancement request?

from git2consul-go.

stevenscg avatar stevenscg commented on August 14, 2024

@Garagoth Have you encountered this error under other conditions?

We have a large config repo that does not have yaml lists as far as we know. We get the same error and have not yet been able to locate which file(s) could have an issue.

FWIW, we are trying to migrate from the breser/git2consul project and all of the files are yaml.

from git2consul-go.

Garagoth avatar Garagoth commented on August 14, 2024

@seanmalloy I am not fluent in go, so my pull request would be of poor quality I am afraid. I would need to learn a bit for this.

@stevenscg so far only with arrays of things that are not maps. Check for constructs like this as well:
key: [v1, v2, v3]
This is a valid array in yaml as well.

from git2consul-go.

stevenscg avatar stevenscg commented on August 14, 2024

@Garagoth Thanks. I'll try to look into it more later.

@seanmalloy Do you happen to know if there is a way to see which file is causing a problem when we see this error message? Maybe by increasing the log level?

from git2consul-go.

stevenscg avatar stevenscg commented on August 14, 2024

@Garagoth Thanks for that pattern! We found that we have 1 line like that in 1 file in each tree. I'll try removing it for now as a workaround.

from git2consul-go.

replicant0wnz avatar replicant0wnz commented on August 14, 2024

Any update on this? I'm seeing the same behaviour.

from git2consul-go.

Smiley73 avatar Smiley73 commented on August 14, 2024

@replicant0wnz unfortunately we're very short staffed and won't get to it any time soon. A pull request for this would be greatly appreciated. :)

from git2consul-go.

Smiley73 avatar Smiley73 commented on August 14, 2024

It sounds to me that there's an easy way to get this working, without code modifications. Should we close this PR or leave it open in the hopes somebody will tackle it someday?

from git2consul-go.

replicant0wnz avatar replicant0wnz commented on August 14, 2024

Well, it'll still crash if it receives a list. I'd say better sanity checking at a minimum. I may be able to tackle it later, but my golang knowledge is minimal.

from git2consul-go.

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.