Coder Social home page Coder Social logo

Comments (5)

mook-as avatar mook-as commented on July 19, 2024

There is no actual difference; they all get parsed as YAML. But format one (two levels of quoting) may be required, if the expanded value is a string that looks like a number and it needs to go through multiple levels of YAML parsing (there's one in configgin as well).

The pass where fissile parses it to put it into /opt/fissile/env2conf.yml (in the docker images) should round trip fine, and that file gets parsed by configgin.

Let me know if that explanation is too confusing… because it sort of is :D

from fissile.

qibobo avatar qibobo commented on July 19, 2024

@mook-as For format one: "But format one (two levels of quoting) may be required, if the expanded value is a string that looks like a number and it needs to go through multiple levels of YAML parsing (there's one in configgin as well)." Could you give an example?

from fissile.

mook-as avatar mook-as commented on July 19, 2024

Looking more at this, I think that might actually be obsolete (sort of).

  • Fissile copies it, verbatim, to env2conf.yml in the docker images
  • Configgin loads it in here
  • #transmogrify then (repeatedly) applies mustache templating to it
  • Which happens in #processMustacheTemplate. (This will always strip one level of quoting)

So it should only end up needing multiple levels if it goes through multiple expansions (now), I think. I believe that previously fissile would do one level of unquoting as well, but we fixed it at some point? Looks like it was initially added in SUSE/scf@1aeb76d but the relevant PR didn't mention it.

(In general, I've been reducing the level of quoting when I touch things, but others might not have been…)

from fissile.

viovanov avatar viovanov commented on July 19, 2024
  1. '"((ONE))"'
    This forces the rendered template to be a string when loaded by configgin as a YAML value.
    e.g. ONE=5 '"((ONE))"' -> renders as "5" -> parsed as YAML string value "5".

  2. '((ONE))'
    This does not force the rendered template to be a string.
    e.g. ONE=5 '((ONE))' -> renders as 5 -> parsed as YAML integer value 5.

  3. ((ONE))
    Same as 2.

from fissile.

jandubois avatar jandubois commented on July 19, 2024

This was not an issue, but a question, and seems to have been answered.

from fissile.

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.