Coder Social home page Coder Social logo

Comments (7)

 avatar commented on May 28, 2024

I think we should go with the supports 'centos', '~> 6.5', '~> 7.0'notation.

from chef-server.

lxndrp avatar lxndrp commented on May 28, 2024

I guess what needs to be specified first is the exact semantics of the notation (whichever variant will be used in the end). That is, what does something like supports 'foo', ['~> 1.5', '~> 1.8'] exactly mean:

  • Both versions independently, up to the semver constraints
  • Both versions together, within the semver constraints

Plus, what about edge cases like 'lower than x, higher than y':

  • Everything smaller or greater than
  • smaller or greater than independently, but not the excluded part

Unless this is clearly defined, the discussion on the notation should be postponed IMHO.

from chef-server.

Zenexer avatar Zenexer commented on May 28, 2024

@lxndrp That sounds unnecessarily complex. A simple whitelist/blacklist system should suffice.

Here's the current proposal, as I understand it:

A whitelist is supported. If a whitelist exists, all versions not covered by the whitelist are deemed unsupported.

As currently implemented, the whitelist can only contain a single specifier; we would be removing this limitation.

Now, we're adding to the proposal:

A blacklist is supported. The blacklist takes precedence over the whitelist.

This gives the following possible scenarios:

  • Neither a whitelist nor a blacklist is specified: All versions are supported.
  • A whitelist is specified, but no blacklist: Only the versions covered by the whitelist are supported.
  • A blacklist is specified, but no whitelist: All versions are supported except those covered by the blacklist.
  • Both a whitelist and a blacklist are specified: Only the versions covered by the whitelist and not by the blacklist are supported.

It would be possible to blacklist all versions this way. However, it would be a waste of time for chef to test for such a case, because any attempt to test the cookbook on a system that the author intends to support will reveal the error.

from chef-server.

lxndrp avatar lxndrp commented on May 28, 2024

Sounds reasonable to me. Don't get me wrong, I didn't intend to make it overcomplicated, but supporting semver style version selectors makes the implementation much harder.

So what we basically get is a white (or black) list of specific versions, i.e. '1.7', '2.0' which would be included (or excluded), correct?

from chef-server.

Zenexer avatar Zenexer commented on May 28, 2024

Well, for the combination of white listing and blacklisting to be useful, selectors would still have to be supported. In theory, implementation shouldn't be much harder.

from chef-server.

stevendanna avatar stevendanna commented on May 28, 2024

We looked at this issue during a triage of some of the chef-server ticket. It is relatively straightforward to support this on the API side (depending on the signature, we might already support it), but as y'all have correctly honed in on, the question that we need to answer first is what we actually want client-side. I've left a comment on the original ticket

chef/chef#2457

to also hopefully pull in some of the client maintainers back into this discussion.

from chef-server.

PrajaktaPurohit avatar PrajaktaPurohit commented on May 28, 2024

Closing this issue since the Chef Client side issue for this is closed.

from chef-server.

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.