Coder Social home page Coder Social logo

Using the library silently upgrades local configuration to version 3, which makes it unusable for "jfrog" command about jfrog-cli-core HOT 8 OPEN

jfrog avatar jfrog commented on July 23, 2024
Using the library silently upgrades local configuration to version 3, which makes it unusable for "jfrog" command

from jfrog-cli-core.

Comments (8)

eyalbe4 avatar eyalbe4 commented on July 23, 2024

@jhinrichsen,
I understand that you have multiple pipelines, which use different versions of JFrog CLI and all of these pipelines use the same JFrog CLI configuration.
To get this issue resolved, do you see an issue with upgrading JFrog CLI to the latest version for all pipelines?
We haven't considered a case where different versions of JFrog CLI's will use the same config directory. The idea was to upgrade the configuration, with the requirements of the new release. The version property inside the config is used to determine whether the config needs to be upgraded or not.
Can you please share with us more info about the reason why multiple versions of JFrog CLI are used? This may help us better understand the problem and consider possible solutions.
Thanks.

from jfrog-cli-core.

jhinrichsen avatar jhinrichsen commented on July 23, 2024

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.

from jfrog-cli-core.

jhinrichsen avatar jhinrichsen commented on July 23, 2024

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" ;-)

from jfrog-cli-core.

eyalbe4 avatar eyalbe4 commented on July 23, 2024

@jhinrichsen,
When you say "the first pipeline uses jfrog-cli-core library" - do you know how the pipeline uses the jfrog-cli-core library? Is it through another go application which depends on jfrog-cli-core? Is this another CLI?

from jfrog-cli-core.

jhinrichsen avatar jhinrichsen commented on July 23, 2024

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.

from jfrog-cli-core.

eyalbe4 avatar eyalbe4 commented on July 23, 2024

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.
This may mean though that adding a server to the old config, will not be reflected in the new config. Let me know what you think about adopting this approach,

In the meantime, to resolve the issue, will you be able to upgrade the version of JFrog CLI to the latest, in all pipelines?

from jfrog-cli-core.

jhinrichsen avatar jhinrichsen commented on July 23, 2024

An upgrade of jfrog executable resolves the issue.

from jfrog-cli-core.

eyalbe4 avatar eyalbe4 commented on July 23, 2024

I'm glad to hear this @jhinrichsen! Thanks for the update.
We made the config upgrade backward compatible, by copying the config to a new file, which is used by the new version only.
Feel free to close this issue.

from jfrog-cli-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.