-
Notifications
You must be signed in to change notification settings - Fork 65
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
Using the library silently upgrades local configuration to version 3, which makes it unusable for "jfrog" command #24
Comments
@jhinrichsen, |
No, if a pipelines uses the JFrog CLI the one and only version is 1.36.0. However, the first pipeline uses jfrog-cli-core library instead of jfrog executable, which updates the config and makes it unusable for jfrog executable. |
Not sure but I guess the update is part of https://pkg.go.dev/github.com/jfrog/jfrog-cli-core/utils/config#GetDefaultArtifactoryConf. At least the documentation does not suggest "oh, and as a side effect, it will rewrite your local config to V3 which effectively renders jfrog executable useless" ;-) |
@jhinrichsen, |
Yes, the Go library jfrog-cli-core is used by an inhouse Go program other than the JFrog CLI executable. Compared to git, trivial pipelines use the commandline executable 'git', while more advanced requirements that require custom logic use libgit2. |
I see @jhinrichsen. I guess that for future config upgrades, we can design the config migration mechanism to support multiple config versions, by simply keeping a copy of the old config, so that older versions can use it. In the meantime, to resolve the issue, will you be able to upgrade the version of JFrog CLI to the latest, in all pipelines? |
An upgrade of jfrog executable resolves the issue. |
I'm glad to hear this @jhinrichsen! Thanks for the update. |
Describe the bug
I have a working JFrog CLI configuration in $HOME/.jfrog/jfrog-cli.conf on our CI/CD server. We are making heavy use of 'jfrog' command in lots of pipelines. As soon as one single pipeline uses the new 'jfrog-cli-core' library instead of relying on an external command, the library silently converts the configuration from version 1 to version 3, making it useless for 'jfrog':
[Error] unexpected end of JSON input
To Reproduce
Expected behavior
library should not break existing configuration. I mean thats what the 'Version' in jfrog-cli.conf is for, no?
Screenshots
If applicable, add screenshots to help explain your problem.
Versions
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: