https://www.puppet.com/community logo
Join Slack
Powered by
# voxpupuli
  • v

    VoxBot

    07/14/2023, 12:16 PM
    we do have it set up
  • v

    VoxBot

    07/14/2023, 12:16 PM
    well, today it gave you a big fat middle finger
  • v

    VoxBot

    07/14/2023, 12:17 PM
    https://github.com/voxpupuli/puppet_metadata/pull/96 also lists it as required check
  • y

    Yury Bushmelev

    07/14/2023, 12:22 PM
    do we have automerger enabled? 🤔
  • v

    VoxBot

    07/14/2023, 12:22 PM
    no
  • v

    VoxBot

    07/14/2023, 12:23 PM
    well not for the whole org
  • y

    Yury Bushmelev

    07/14/2023, 12:23 PM
    magic
  • v

    VoxBot

    07/14/2023, 12:23 PM
    on PRs with a required check you can enable automerge for a single PR
  • y

    Yury Bushmelev

    07/14/2023, 12:23 PM
    ah, I see
  • y

    Yury Bushmelev

    07/14/2023, 12:24 PM
    hm.. I forgot how annoying animated sticker can be..
  • y

    Yury Bushmelev

    07/14/2023, 12:45 PM
    well.. I guess 3x less
    \n
    than in ERB version is good enough for ERB -> EPP migration 🙂
  • y

    Yury Bushmelev

    07/14/2023, 12:46 PM
    though.. maybe I can go for exact the same result..
  • y

    Yury Bushmelev

    07/14/2023, 5:50 PM
    hmm.. I just hit some magic.. I have this in a EPP template:
    Copy code
    <%- $raw_append.each |$line| { -%>
      <%= $line %>
    <%- } -%>
    $raw_append is an Array. If I pass
    []
    as a $raw_append it adds an empty line. But if I replace $raw_append to
    []
    right in the EPP it doesn’t 🤔
  • y

    Yury Bushmelev

    07/14/2023, 5:50 PM
    (
    <%- [].each |$line| { -%>
    I mean)
  • y

    Yury Bushmelev

    07/14/2023, 5:55 PM
    it seems there is
    [ undef ]
    actually..
  • y

    Yury Bushmelev

    07/14/2023, 6:00 PM
    yep.. $raw_append.length is 1
  • y

    Yury Bushmelev

    07/14/2023, 6:02 PM
    ok,
    filter
    solved this
  • s

    smortex

    07/14/2023, 6:02 PM
    Data types could help avoid this… but that is a lot of work 🙂
  • s

    smortex

    07/14/2023, 6:02 PM
    "avoid"… I mean "alert" 🙃
  • y

    Yury Bushmelev

    07/14/2023, 6:02 PM
    it was me who did it actually.. I tried to make it Array always with [$raw_append].flatten
  • y

    Yury Bushmelev

    07/14/2023, 6:03 PM
    but if it’s $raw_append is Undef then..
  • y

    Yury Bushmelev

    07/14/2023, 6:03 PM
    Original definition is
    Optional[Variant[Array, String]] $raw_append   = undef,
  • s

    smortex

    07/14/2023, 6:03 PM
    Smells like a
    Variant[String, Array[String]]
  • s

    smortex

    07/14/2023, 6:03 PM
    ah !
  • y

    Yury Bushmelev

    07/14/2023, 6:04 PM
    💯
  • s

    smortex

    07/14/2023, 6:04 PM
    Array[String] $foo = []
    is how I handle this to avoid to much hack in the templates
  • v

    VoxBot

    07/14/2023, 6:04 PM
    I always try to avoid flatten when I can
  • v

    VoxBot

    07/14/2023, 6:04 PM
    and with EPP you can use data types to enforce that safely
  • y

    Yury Bushmelev

    07/14/2023, 6:05 PM
    @smortex but what to do with a lot of legacy configs where it’s String actually? 🙂
  • v

    VoxBot

    07/14/2023, 6:05 PM
    and I also prefer the empty array when possible
1...554555556...648Latest