1

Our software stack currently requires python-rosdep 0.18.0-1, but his package has been upgraded to 0.19.0-1, and therefore removed 0.18.0-1. In our jfrog artifactory repo I can still find 0.18.0-1 in the remote-cache, but I am not able force the version. When I do sudo apt install python-rosdep=0.18.0-1, I got E: Version '0.18.0-1' for 'python-rosdep' was not found. Searching for the package apt search python-rosdep gives me the newest version only. Is there a way I can still install the older version cached in our jfrog artifactory repo? Thanks!

Dror Bereznitsky
  • 20,048
  • 3
  • 48
  • 57
JPCY
  • 11
  • 1

1 Answers1

2

The behavior you got is expected as Remote Repository in Artifactory tries to mirror the original repository.

You have couple of options to resolve the package that is already cached although expired from the remote:

  1. Copy it to a local repository & pull from there.
  2. Not 100% sure about this one, but setting the remote repository "offline" may work as a quick workaround.
Ariel Kabov
  • 856
  • 4
  • 8
  • Thanks @ariel-kabov, currently we are getting by with option #1 you mentioned, but this happening too frequently and our cicd keeps interrupted due to this issue. Is there a more automated method, or a better way to deal with this package expired from remote issue? Thanks! – JPCY Apr 10 '20 at 18:34
  • @JPCY Yes. I believe implementing a User Plugin such as CreateCopy(https://github.com/jfrog/artifactory-user-plugins/tree/master/storage/createCopy) should work. It will automatically copy all cached content to a local repository. You'll only need to setup a Virtual repository to aggregate the remote+local. – Ariel Kabov Apr 12 '20 at 08:27
  • Thanks @ariel-kabov, I applied the plugin but it doesn't seem to work on our Artifactory. Perhaps there is something wrong with how I apply it? Here is what I have done: 1. create "ros-latest-local" <- this is the local repo 2. create virtual repo and include both "ros-latest-local" and "ros-latest-remote" <- this is the repo mirroring the original 3. place createCopy.groovy and createCopy.properties(updated accordingly) in /data/artifactory/etc/plugins (I deployed with docker and relocate jfrog home to /data/artifactory) 4. restart Artifactory – JPCY Apr 14 '20 at 17:59
  • I can see the log accepting the plugins: ==================Plugins Status=================== # createCopy.groovy --> Loaded # internalUser.groovy --> Loaded =================================================== @ariel-kabov If you see any mistake please let me know. – JPCY Apr 14 '20 at 18:04
  • Reading my previous response I may have mislead you a little. The plugin shouldn't copy the content that is already there (you can copy manually). However, it should intercept every new cached artifact and make a copy of it in the local repository. Does that sounds right according to what you experience? – Ariel Kabov Apr 16 '20 at 06:17
  • Hi @ariel-kabov, thanks for your help. We ended up using two repositories; an offline one which preserves the current state, and an online one which has the most updated version. For some reason virtual repository gave us error on integrity hash values. – JPCY May 15 '20 at 22:42