Giter Site home page Giter Site logo

Comments (7)

djoos avatar djoos commented on July 17, 2024

Hi @eric-tucker,

thanks for getting in touch! Sorry for the inconvenience the CHANGE_ME-changes have caused...

What about setting default['newrelic']['license'] to nil by default, instead of a random string (eg. "CHANGE_ME" or "REPLACE_WITH_REAL_KEY")?

Let me know what you think!

Kind regards,
David

from newrelic.

et304383 avatar et304383 commented on July 17, 2024

Something that is consistent and will not change.

To be honest, it should be nil by default so that I can set default values in a wrapper cookbook without having to use force_default as that prevents me from setting it in an environment file without using override.

If you leave node.newrelic.license at nil (undefined) that is the safest bet. Just don't set it at all. I want default[:newrelic][:license] = 'something' to work in a wrapper cookbook.

from newrelic.

djoos avatar djoos commented on July 17, 2024

+1 (will push these changes to master shortly)

from newrelic.

et304383 avatar et304383 commented on July 17, 2024

This is better and more consistent, but does force me to use force_default if I want to override in a wrapper cookbook (or I just set in environment files).

When I said nil by default, I actually meant undefined. As in no value if I referenced the hash using that index.

That being said, as long as there are no plans to change it again, I'm fine with this. Number one priority is consistency. :)

from newrelic.

djoos avatar djoos commented on July 17, 2024

Hi @eric-tucker,

there shouldn't be any need to use force_default when specifying the license attribute's value via...

default_attributes(
{
    "newrelic" => {
        "license" => "yournrlicensekey"
    }
})

...in either a role or environment.

Re: plans to change it again
The only reason why I changed it from CHANGE_ME was that for some reason nrsysmond restarted just fine on Ubuntu when running tests without setting the license key. It failed when using the "REPLACE_WITH_REAL_KEY". Anyway, the current default value (nil) is not going to change anymore ;-)

Hope this helps!

Kind regards,
David

from newrelic.

et304383 avatar et304383 commented on July 17, 2024

Yup. force_default, however, is reserved for overriding in a wrapper cookbook where the wrapped cookbook set the value.

For now, I get by with checking for nil and overriding in the environment when I want it to be set. The reason I'm so concerned with this is I want to install newrelic automatically just by setting the value [away from the default]. Probably not a good practice, but I'd rather have that instant flexibility where my run list doesn't need to change: I just need to set an attribute to install newrelic.

from newrelic.

djoos avatar djoos commented on July 17, 2024

Ah ok, in that case: the default license-attribute will be (and will stay) nil :-)

Hope this helps!

from newrelic.

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.