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

    VoxBot

    05/16/2023, 5:34 PM
    looking at your code I'm not sure I would agree with providing the dnf modules via facts and validating them
  • v

    VoxBot

    05/16/2023, 5:35 PM
    because if you enable a yumrepo with modularity then the fact will only show up (correctly) on the next run
  • v

    VoxBot

    05/16/2023, 5:36 PM
    https://github.com/EmersonPrado/dnf/blob/41d5ec07aecac3d227d061070c5642fa7fb1cdfe/lib/puppet/type/dnf_module.rb#L15 that is
  • v

    VoxBot

    05/16/2023, 5:37 PM
    similar, I'd suggest to call dnf instead of using facts here: https://github.com/EmersonPrado/dnf/blob/41d5ec07aecac3d227d061070c5642fa7fb1cdfe/lib/puppet/provider/dnf_module/dnf_module.rb#L7-L10
  • v

    VoxBot

    05/16/2023, 5:38 PM
    note you can write that more efficient as Facter['dnf_modules'].value[module_name].any? { |k, v| k.include?(profile_name) }
    ๐Ÿ‘ 1
  • v

    VoxBot

    05/16/2023, 5:39 PM
    what you can also do is implement prefetch to already load enabled modules
  • e

    emerson_prado

    05/16/2023, 5:44 PM
    I kinda kept myself away of calling
    dnf module
    inside those methods because this command is quite costly, and would run more than once for each action. But the prefetch seems a good idea - Does that mean it would call
    dnf module
    once for each Puppet agent run, then store the results for every resource call?
  • s

    Slackbot

    05/16/2023, 5:46 PM
    This message was deleted.
    e
    • 2
    • 1
  • v

    VoxBot

    05/16/2023, 5:47 PM
    and call new() with the correct properties in self.instances
  • v

    VoxBot

    05/16/2023, 6:20 PM
    There's a github setting "Always suggest updating pull request branches" It should give you a button on web interface to rebase. We have this on our gitlab instance, super useful. It does not force you to rebase. Could it be enabled. https://github.blog/changelog/2022-02-03-more-ways-to-keep-your-pull-request-branch-up-to-date/#update-your-pull-request-branch-by-rebasing
  • v

    VoxBot

    05/16/2023, 6:58 PM
    frisbee: we already have that enabled on a few modules. if someone wants to enable it for all of them, go ahead
  • v

    VoxBot

    05/16/2023, 7:00 PM
    yes, that's the idea
  • s

    Slackbot

    05/16/2023, 7:00 PM
    This message was deleted.
    e
    • 2
    • 1
  • v

    VoxBot

    05/16/2023, 7:09 PM
    bastelfreak: okay though it might be global setting, seems not, I have settings permissions on just some repositories will enable on them.
  • y

    Yury Bushmelev

    05/16/2023, 7:31 PM
    Maybe we should use terraform to manage all the repos ๐Ÿค”
  • v

    VoxBot

    05/16/2023, 7:34 PM
    we have a repo where afisher startet with that
  • v

    VoxBot

    05/16/2023, 7:36 PM
    https://github.com/secpupuli
  • v

    VoxBot

    05/16/2023, 8:07 PM
    ewoud: Zhenech https://github.blog/2023-05-16-addressing-githubs-recent-availability-issues/
  • b

    bastelfreak

    05/16/2023, 8:10 PM
    @emerson_prado or slack<>irc bridge dorsnt handle threads, I suggest to avoid them in this channel
    ๐Ÿ‘ 1
  • e

    emerson_prado

    05/16/2023, 8:37 PM
    Are there any docs for Puppet::Type.type.provide (or so)
    prefetch
    method?
  • v

    VoxBot

    05/16/2023, 9:02 PM
    @emerson_prado IIRC, the book "Puppet Types and Providers" is quite a good resource for this kind of info.
    ๐Ÿ‘ 1
  • v

    VoxBot

    05/17/2023, 5:10 AM
    bastelfreak, nice, thanks
  • a

    Alex Fisher

    05/17/2023, 10:55 AM
    @emerson_prado Also see http://garylarizza.com/blog/2013/12/15/seriously-what-is-this-provider-doing/
    ๐Ÿ‘ 1
  • v

    VoxBot

    05/17/2023, 10:56 AM
    looks at the date of that blog
  • v

    VoxBot

    05/17/2023, 10:56 AM
    though I'm pretty sure that area has changed very little over the past decade
  • a

    Alex Fisher

    05/17/2023, 11:07 AM
    Yeah, Iโ€™m not sure anything on that page is out of date. I mean the newer resource API also exists, but the old API has barely changed.
  • v

    VoxBot

    05/17/2023, 11:08 AM
    AFAIK newer resource API is a layer on top of the old API
  • a

    Alex Fisher

    05/17/2023, 11:11 AM
    Yes, and is a bit frustrating IMO being just less than feature complete. You bump into a blocker that can only be solved with the low level API and then have to start overโ€ฆ
  • v

    VoxBot

    05/17/2023, 11:13 AM
    morning o/
  • v

    VoxBot

    05/17/2023, 11:13 AM
    I've a PQL query to get all values from PuppetDB for a specific fact
1...479480481...642Latest