conan: [question] Building and uploading missing packages changes the recipe revision timestamp

What is your question?

Not sure if this is a bug or intentional for some reason.

A conan config change (core.package_id:default_python_mode in global.conf) caused our conan installs to search for different package ids, which were then missing because the recipe revisions that were locked in lockfiles did not have packages for the new config. To address this, we used -b missing in CI and wrote json output to a graph, then ran conan list on the graph and finally an upload on the list, causing the missing packages to be built and uploaded to Artifactory.

So far, everything worked well and projects that locked these revisions could find and install the new packages. However, when updating lockfiles with -u to get the latest revision, we noticed that the rebuilt revisions are now being picked up as the latest. Checking in Artifactory confirms that the recipe revision .timestamp files have changed for the revisions that we uploaded new packages for.

This is a problem because it means that the revision that is actually supposed to be the latest either needs to be rebuilt and reuploaded or the timestamp manually edited to make it the latest revision again. And since the latest revision is already built with the new config before rebuilding the older revision upload of the latest revision is skipped, making it hard to restore the latest revision (though I guess force uploading may help if that also changes the timestamp). Wouldn’t it make more sense if only the .timestamp files in the added packages were new and not the one for the recipe revision, since the recipe hasn’t changed?

We are using conan 2.4.1 and Artifactory 7.55.10.

Is there some reason I’m not aware of why the recipe timestamp needs to change or is this a bug? Would it make sense with a feature request to add a flag to the conan upload command to upload packages without altering the recipe timestamp in order to simply add additional packages without changing the order of revs?

Have you read the CONTRIBUTING guide?

  • I’ve read the CONTRIBUTING guide

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 23 (13 by maintainers)

Most upvoted comments

Thanks for the detail.

UPDATE: ~I have been able to reproduce,~ I have added a test that fails when used against Artifactory in my PR https://github.com/conan-io/conan/pull/16621

~We need to carefully check where would be the discrepancy, if it is a failure in the testing server or in Artifactory, it is not fully clear now what was the expected behavior.~

The test was failing against my local Artifactory because I was reusing the repo and not cleaning it. After cleaning it, the test, that I think it captures your described scenario, is passing in both cases.

Thank you for the quick reply! If that is the case and the expected behavior is that the revision order persists when adding packages, I’ll try to reproduce it manually and share some instructions for doing so if I’m able to. Just wanted to know what was expected before investigating it further!