Deleting Conan builds does not delete the artifacts linked to the build.
Describe the bug
When deleting Conan builds that were uploaded via the Azure Devops extension, the build itself gets deleted but the linked artifacts are not getting deleted (--delete-artifacts=true with JFrog CLI). It seems like this issue is caused by a timestamp discrepancy. The build.timestamp property of the artifacts is different from the build started time:
Note that the build.timestamp of the artifacts is different from the build timestamp of the build itself.
As a result, the AQL query cannot find the linked artifacts which in turn, prevents the deletion of the artifacts linked to the build:
2024-09-10T09:59:53.706Z [jfrt ] [INFO ] [f4068742ff7b14f0] [o.a.a.b.BuildAddonImpl:256 ] [http-nio-8081-exec-7] - Removing build 'pylon-frontend-workbench-dev' that was started at '2024-08-15T03:23:56.243+0000' from artifactory-build-info repo 2024-09-10T09:59:53.707Z [jfrt ] [DEBUG] [f4068742ff7b14f0] [o.a.b.BuildServiceImpl:935 ] [http-nio-8081-exec-7] - Starting to remove the artifacts of build 'pylon-frontend-workbench-dev' #windows-x86_64-20240815.1 from artifactory-build-info repo 2024-09-10T09:59:53.707Z [jfrt ] [DEBUG] [f4068742ff7b14f0] [o.a.b.BuildServiceImpl:1166 ] [http-nio-8081-exec-7] - Executing Artifacts search for build pylon-frontend-workbench-dev:windows-x86_64-20240815.1:1723692236243 2024-09-10T09:59:53.710Z [jfrt ] [DEBUG] [f4068742ff7b14f0] [o.a.b.BuildServiceImpl:1173 ] [http-nio-8081-exec-7] - Search returned 0 artifacts 2024-09-10T09:59:53.711Z [jfrt ] [DEBUG] [f4068742ff7b14f0] [o.a.b.BuildServiceImpl:1176 ] [http-nio-8081-exec-7] - This build contains 5 artifacts (taken from build info) 2024-09-10T09:59:53.711Z [jfrt ] [DEBUG] [f4068742ff7b14f0] [o.a.b.BuildServiceImpl:1181 ] [http-nio-8081-exec-7] - Matched 0 build artifacts to actual paths returned by search 2024-09-10T09:59:53.711Z [jfrt ] [DEBUG] [f4068742ff7b14f0] [o.a.b.BuildServiceImpl:946 ] [http-nio-8081-exec-7] - Finished removing the artifacts of build 'pylon-frontend-workbench-dev' #windows-x86_64-20240815.1 from artifactory-build-info repo
It seems like the timestamp is not correctly added by the JFrog Azure Devops Extension as going through the same flow via JFrog CLI doesn’t display the same result, i.e the timestamps are similar with JFrog CLI. After looking in the Azure extension code, I found that the timestamp is generated twice, which I believe is related to this issue:
Current behavior
Builds are being deleted but the linked artifacts are still present in the repositories.
Reproduction steps
- Upload a build via Azure Devops with the JFrog Conan V1 with JFrog Azure Devops extension.
- Delete the build with JFrog CLI (--delete-artifacts=true).
- See that the artifacts linked to the build are not getting deleted.
Expected behavior
No response
Azure DevOps extension name and version
New JFrog Azure Devops extension
JFrog CLI version
latest
Operating system type and version
Mac OS 15.3.1
JFrog Artifactory version (if relevant)
No response
JFrog Xray version (if relevant)
No response
JFrog Distribution version (if relevant)
No response