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

Issues with setting artifact properties #19

Closed
briantist opened this issue Oct 9, 2022 · 0 comments · Fixed by #20
Closed

Issues with setting artifact properties #19

briantist opened this issue Oct 9, 2022 · 0 comments · Fixed by #20

Comments

@briantist
Copy link
Owner

Because we previously relied on the collection being uploaded first before we gathered the collection info, we always updated the properties after uploading. It turns out this requires a pro license: https://www.jfrog.com/confluence/display/JFROG/Artifactory+REST+API#ArtifactoryRESTAPI-SetItemProperties

In #5 , since we removed that requirement, I attempted to use matrix parameters to set the artifact properties on upload, in a single request. Not having integration tests working yet, I usually test this against an older test version of Artifactory I have around that's still licensed, and this failed for the collection_info property which is JSON (Artifactory returned a 400 Bad Request error).

Testing revealed that this was due to quote characters (" and '), and no manner of escaping seemed to help, so I kept the post-upload property setting.

As I work on implementing integration tests with Artifactory OSS, I discovered the Pro license requirement, but I also discovered that the matrix property method has no issues with the JSON property or quote characters in general 🤯

I cannot find any documented acknowledgement of the problem in the 6.x series, nor a documented fix in the 7.x series; further testing has confirmed that even with OSS container 6.x (same version as my test environment) the issue is not present.

Further digging reveals that the issue likely related to some kind of reverse proxy arrangement in my environment, but I've seen some evidence that this might be due to the "default" reverse proxy configurations generated by Artifactory itself, so I am likely not the only person to be affected, and the most likely environments to be affected are in production (where it's more likely that reverse proxies are used). Some more info:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant