Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to download cookbooks with nonstandard versioning conventions #52

Open
borgified opened this issue Sep 15, 2016 · 3 comments
Open

Comments

@borgified
Copy link

borgified commented Sep 15, 2016

how to reproduce problem:

root@d43d5405d23f:/# minimart mirror --inventory-config=test.yml
Fetching the universe for https://api.berkshelf.com ...
The cookbook erlang with the version 2.1.0 could not be found

this is the inventory file:

root@d43d5405d23f:/# more test.yml
sources:
  - "https://api.berkshelf.com"
cookbooks:
  erlang:
    versions:
      - "2.1"

this particular version actually does exist:
https://supermarket.chef.io/cookbooks/erlang/versions/2.1

also it seems to get confused with this type of versioning:
https://supermarket.chef.io/cookbooks/apache_vhosts/versions/20140110

@borgified borgified changed the title unable to download cookbooks with versions that are missing patch number unable to download cookbooks with funny versioning conventions Sep 15, 2016
@borgified borgified changed the title unable to download cookbooks with funny versioning conventions unable to download cookbooks with nonstandard versioning conventions Sep 15, 2016
@tapickell
Copy link
Contributor

Thats interesting. Will have to investigate, thank you. Is the Erlang cookbook the onnly one you have had this issue with @borgified ??

@borgified
Copy link
Author

actually there are more.. theres all sorts of versioning conventions present that apparently dont follow that semver.org regexp

root@d43d5405d23f:/# grep '#' inventory.yml
#  7dtd:
#    versions:
#      - "0.1"
#  apache_vhosts:
#    versions:
#      - "20140206"
#      - "20140108"
#      - "20140109"
#      - "20140110"
#  aws_rds:
#    versions:
#      - "1.4"
#  tomcat-solr:
#    versions:
#      - "0.1"
#      - "0.1"
#  spark-shark-cookbook:
#    versions:
#      - "0.1"
#      - "1.1"
#  CVE-2015-0235:
#    versions:
#      - "1.0"
#      - "1.1"
#  rolling_deploy:
#    versions:
#      - "0.00.5"
#      - "0.2"
#      - "1.1"
#      - "1.2"
#      - "1.3"
#      - "1.0"
#      - "1.2.02"
#      - "1.2.00"

it's not supercritical for me, i just noticed that these didnt work (the vast majority of cookbooks have sane versioning)

the last two.. i think it interprets them as 1.2.2 and 1.2.0. i guess it should treat them as strings to preserve the leading 0? then again, it's clunky to do logic with them to check for <, >, etc.

@tapickell
Copy link
Contributor

@borgified Awesome, thank you. This is something we have not run into on our deployment of this yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants