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

[bug] artifacts.properties doesn't apply to internal Artifactory files #8418

Closed
klimkin opened this issue Feb 1, 2021 · 7 comments
Closed
Assignees

Comments

@klimkin
Copy link
Contributor

klimkin commented Feb 1, 2021

artifacts.properties doesn't apply to internal Artifactory files. This causes issues for Artifactory tools like cleanup scripts that scan properties for retention indication.

Environment Details (include every applicable attribute)

  • Operating System+version: any
  • Compiler+version: any
  • Conan version: 1.32.0
  • Python version: 3.7.3

Steps to reproduce:

  1. Create artifacts.properties and add a property
  2. Upload to Artifactory
  3. Check .timestamp and index.json files don't have the property set

Logs

Conan trace log shows property retention.days is part of PUT header:

{
  "_action": "REST_API_CALL",
  "duration": 0.004857063293457031,
  "headers": {
    "User-Agent": "Conan/1.32.0 (Python 3.7.3) python-requests/2.25.0",
    "X-Checksum-Deploy": "true",
    "X-Checksum-Sha1": "fc4eb11924fc59e9acdc8dccb94c98d6b0356ee6",
    "artifact_property_retention.days": "3653",
    "retention.days": "3653"
  },
  "method": "PUT",
  "time": 1612151299.8733957,
  "url": "https://something.com/artifactory/api/conan/conan-repo/v1/files/_/libbacktrace/1.0/_/0/package/6af9cc7cb931c5ad942174fd7838eb655717c709/0/conan_package.tgz"
}

On artifactory, property is set for uploaded files:
image

But not for internal files:
image

@solvingj
Copy link
Contributor

solvingj commented Feb 1, 2021

I believe this is because index.json and .timestamp are not uploaded, but instead generated server side. The only way to get set a retention policy on these files is with curl or jfrog-cli after they are known to be created.

@solvingj solvingj self-assigned this Feb 1, 2021
@solvingj
Copy link
Contributor

solvingj commented Feb 1, 2021

@memsharded do you think my assessment is correct? If so, then the only other course of action possible would be to suggest it as an artifactory feature request.

@memsharded
Copy link
Member

Yes, correct. Those files are internal implementation details of the server side. They are not downloaded as part of the packages, nor uploaded. They are not known by Conan client at all, it is impossible that it will set properties.

For cleanup policies, maybe another approach is necessary, it depends if those scripts use the JFrog-CLI or they can also use Conan or is pure API based. This (cleanup policies) is something we want to start implementing as a Conan command layer as soon as Conan 2.0 is in beta stage, but that will take some time.

@klimkin
Copy link
Contributor Author

klimkin commented Feb 3, 2021

From perspective of Conan API integrity, the question here is: should the properties apply to all relevant Conan repository files? If yes, then this would be Artifactory request (how do you do that?)

@memsharded
Copy link
Member

Probably not. They are still "metadata", not repository files, and they do not belong to the Conan API. The Conan API only define things at the package level, like conan remove <ref> -r=remote-repo, and the server side should handle that accordingly.

The fact that they look like files on the server side is an implementation detail. Lets say that you try to use those properties to copy those files to another repository. You cannot copy those files to another repository, they will be generated automatically in the other repository when moving the Conan packages, but probably forcing a copy could be undefined behavior. Those files should most likely not be copied, removed, modified, or uploaded manually to Artifactory.

Maybe Artifactory team could clarify. For Artifactory support and requests, it depends:

  • If you are a JFrog customer, then the best is going through official JFrog support
  • There is a Jira here: https://www.jfrog.com/jira, but the traffic is massive, maybe it won't get much attention, but maybe worth trying.

Are those scripts client side with JFrog-CLI? Or using the Artifactory API? Or are they Artifactory user plugins server side?

@solvingj
Copy link
Contributor

@klimkin are you still working on or around this issue? If so, are you able to answer any of the questions from @memsharded ?

@memsharded
Copy link
Member

This issue is outdated, closing it.

artifacts.properties file has been removed in Conan 2.0 completely.
The alternative to set properties in Artifactory is an explicit command like the one that can be found in the extensions repo: https://github.com/conan-io/conan-extensions/tree/main/extensions/commands/art

@memsharded memsharded closed this as not planned Won't fix, can't repro, duplicate, stale May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants