-
Notifications
You must be signed in to change notification settings - Fork 38
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
Support overriding the version of the CLI extractors to use #161
Comments
Hi @markrekveld, |
Hi @eyalbe4 Thanks for your reply. I'm a but lost. The CLI is hardcoded to a specific version of the build info extractor. How can I use the CLI with a different version of the extractor to test a pull request like the one I linked? Can you please take me trough the steps how I would be able to test a code change like the linked PR on a CI system like JFrog Pipelines where you only have the option to select version 1 or 2 of the JFrog CLI? Cheers, |
Hi @markrekveld, Thanks again for your contribution and willingness to improve our products :).
Please let me know If you have any further questions. |
Hi @talarian1 Thanks for your explainer, it is doable and workable hijacking the extractor version. I'll take some time to see if I can get the JFrog Pipelines platform to accept this workaround. Cheers, |
I just tried to override the extractor version used by the CLI , but there is no way to predict the version of the maven extractor that CLI will use when running on JFrog Pipelines. So implementing a way to preload the extractor is not an option. This only leaves implementing a "custom" server to download the extractor from. This "server" would need to capture all the requests for the extractor and then return a different version then the one being requested. This seams to me a lot of work where a simple environment property defining the version to download would fix the issue. |
I implemented my attempt in #168 please give it a review |
Here is another example to support overriding the extractor version used, jfrog/build-info#738 |
@talarian1 @eyalbe4 do you see this issue and/or my implementations being accepted any time? |
Is your feature request related to a problem? Please describe.
It's impossible to test PRs for extractors without also building a custom CLI and using this. But then, what are you testing? Any issue during the CLI build to validate and test the extractor build makes it harder to do a proper job.
Take this case:
I found a (in my eyes) bug in the extractor implementation for Maven. It introduces a 'dummy' repository but this is causing numerous issues with Maven plugins that cannot take this kind of repository into account.
So I opened a PR in an attempt to resolve this: jfrog/build-info#683
But this introduced a bug and needed to be reverted.
This is not only annoying for me to have to revisit the PR again, but also other customers affected by the introduced bug.
It was easy to resolve and a new PR was opened to address the bug introduced jfrog/build-info#715
I'm confident that the bug would not have been introduced if it was easier to test the custom version of the extractor.
Describe the solution you'd like to see
I would like to be able to override the version of the extractor used during Maven builds so I can use or test a custom version of the extractor.
Currently you can provide a different remote server to download the extractor from, but the version is hardcoded at https://github.com/jfrog/build-info-go/blob/a6ed2e89a5bf16feff10be3333c5f69821b0b903/build/maven.go#LL21C29-L21C29
But it would be great if this version can be overridden by an environment variable just like the remote server can be overridden.
Describe alternatives you've considered
The only alternative is to also build a custom CLI version to test the custom extractor version, which is not really an alternative if you ask me.
Additional context
See also opened support ticket
The text was updated successfully, but these errors were encountered: