ARTIFACTORY: Versions metadata file generated for ruby gems

Sai Undurthi
2022-07-24 07:46

The Bundler Compact Index feature allows you to retrieve the latest RubyGems version compatible with your installed Ruby version if the project applies to local, remote, and virtual repositories.

After applying the "artifactory.gems.compact.index.enabled=true" property, bundler compact indexing generates a metadata file "versions". You might notice two sets of formats here:

  1. <Gem_Repo>:<Gem_Package_name> <Multiple_versions> <Checksum>
    Example: 
    gems-local:gem_management 0.4.0,0.4.1,0.5.0 db3168759a092698d74fe73c1dcc4494
  2. <Gem_Repo>:<Gem_Package_name> <First_version> <Checksum>
    …..
    ….
    <Gem_Repo>:<Gem_Package_name> <Last_version> <Checksum>
    Example: 
    gems-local:gem_management 0.5.0 68aeaef02e702ac8a76dd5458d9adfc6
    gems-local:gem_management 0.4.1 4cac516295aa4ca413b638ba2c789a19
    gems-local:gem_management 0.4.0 db3168759a092698d74fe73c1dcc4494

Question: What are these values eg: db3168759a092698d74fe73c1dcc4494? And why is there a difference in the way this file is generated?

  • This value is the checksum of the versions file – you can see that in both files the last checksum is identical because only then it contains the same versions.
  • The first file is after a reindex – as we are gathering all versions of the same package in the same line.
  • The second file is a classic example of incremental indexing.