ARTIFACTORY: How To Verify If An Artifact Was Downloaded From A Remote Registry Or Remote-Cache

ARTIFACTORY: How To Verify If An Artifact Was Downloaded From A Remote Registry Or Remote-Cache

AuthorFullName__c
Yoav Harel
articleNumber
000005940
ft:sourceType
Salesforce
FirstPublishedDate
2024-01-02T13:36:19Z
lastModifiedDate
2023-12-20
VersionNumber
2

When retrieving an artifact from a remote repository, the download process involves accessing either the remote registry or retrieving it from the remote repository cache if the artifact is already present therein.

To verify the origin of the artifact download, we can refer to the artifactory-access.log file. Each download event will have a corresponding log entry denoted as "[ACCEPTED DOWNLOAD]". The below logs show artifact downloads from the remote registry and the same artifact that was downloaded from the remote repository cache (including the “cache” postfix at the end of the remote repository name).

In addition, when an artifact is downloaded from the remote registry, a corresponding log entry will be present in the artifactory-request-out.log

artifactory-access.log - NPM Remote:
2023-12-10T11:15:38.671Z [39c996fe3dd435a5] [ACCEPTED DOWNLOAD] npm-remote:express/-/express-4.18.2.tgz  for client : admin / <CLIENT_IP> [token]

artifactory-request-out.log:
2023-12-10T11:15:38.537Z|39c996fe3dd435a5|npm-remote||GET|https://registry.npmjs.org/express/-/express-4.18.2.tgz|200|0|55804|28

artifactory-access.log - NPM Cache:
2023-12-10T11:16:17.913Z [7e696bd95cb1e89a] [ACCEPTED DOWNLOAD] npm-remote-cache:express/-/express-4.18.2.tgz  for client : admin / <CLIENT_IP> [token]