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

Make recursive cloning (e.g. of Git submodules) configurable #6697

Open
Tracked by #8556
dgutson opened this issue Mar 17, 2023 · 6 comments
Open
Tracked by #8556

Make recursive cloning (e.g. of Git submodules) configurable #6697

dgutson opened this issue Mar 17, 2023 · 6 comments
Labels
configuration About configuration topics downloader About the downloader tool enhancement Issues that are considered to be enhancements scanner About the scanner tool

Comments

@dgutson
Copy link

dgutson commented Mar 17, 2023

We would need the ability to exclude the cloning of the (git) submodules of a given repository. I would like to be able to specify that as an exclude in the .ort.yml file. Maybe there could be a section regarding the behavior of the downloader.

@sschuberth sschuberth changed the title feature request: new exclude Make recursive cloning (e.g. of Git submodules) configurable Mar 17, 2023
@sschuberth sschuberth added enhancement Issues that are considered to be enhancements downloader About the downloader tool configuration About configuration topics scanner About the scanner tool labels Mar 17, 2023
@mnonnenmacher
Copy link
Member

@dgutson Can you explain where exactly you need this option? Do you want an option for the download command to disable recursive cloning? Or do you want a way to configure the scanner to not clone a specific repository recursively?

@dgutson
Copy link
Author

dgutson commented Mar 22, 2023

@mnonnenmacher there are large repositories included as submodules that should be skipped. Currently there is no way to avoid these to be both downloaded (cloned) and analyzed.

@sschuberth
Copy link
Member

@dgutson, what @mnonnenmacher was asking is: Do you want this to be a new CLI option to the stand-alone ort download sub-command, or a configuration option to the scanner (which implicitly calls the downloader programmatically).

Given that you wrote

I would like to be able to specify that as an exclude in the .ort.yml file.

I understand that you only want the latter, a way for the scanner (not downloader CLI) to not download Git submodules, and thus omit them from scanning.

Maybe we could make path excludes smart to understand that a path refers to a submodule, and then not clone that submodule.

@dgutson
Copy link
Author

dgutson commented Mar 22, 2023

@arieltorti what do you think?

@mnonnenmacher
Copy link
Member

I understood the response differently:

Currently there is no way to avoid these to be both downloaded (cloned) and analyzed.

As you say "analyzed" my assumption was that you use the downloader to download a repository before running the analyzer. So you would need an option for the download command to not clone recursively, but this would also require changes to the scanner because currently it would still do a recursive clone. However, before we can say if and how this can be implemented we would need to understand the use-case better.

@arieltorti
Copy link

I understand that you only want the latter, a way for the scanner (not downloader CLI) to not download Git submodules, and thus omit them from scanning.

That will work.

As you say "analyzed" my assumption was that you use the downloader to download a repository before running the analyzer.

We run ort analyze directly on the repository, without ort download. The idea would be to exclude certain submodules to avoid downloading non-analyzable data or duplicated submodules (because they were already scanned in a standalone way)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration About configuration topics downloader About the downloader tool enhancement Issues that are considered to be enhancements scanner About the scanner tool
Projects
None yet
Development

No branches or pull requests

4 participants