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

scan downloading scancode-toolkit each time. please made a cache of it once per installation session #1580

Closed
sweetca opened this issue Jun 25, 2019 · 2 comments
Labels
enhancement Issues that are considered to be enhancements scanner About the scanner tool

Comments

@sweetca
Copy link

sweetca commented Jun 25, 2019

Regarding to logs of scan execution

16:23:08.099 INFO  - Bootstrapping scanner 'ScanCode' as required version 2.9.7 was not found in PATH.
16:23:08.099 INFO  - Downloading ScanCode from https://github.com/nexB/scancode-toolkit/archive/v2.9.7.tar.gz... 
16:23:09.840 INFO  - Retrieved ScanCode from local cache.
16:23:48.622 INFO  - Unpacking '/var/folders/l1/q8mfwlln2pqf5pg30c553ytc0000gn/T/ort7289663463082405698ScanCode-v2.9.7.tar.gz' to '/var/folders/l1/q8mfwlln2pqf5pg30c553ytc0000gn/T/ort1678906659374181145ScanCode-2.9.7'... 
16:23:52.952 INFO  - Running '/var/folders/l1/q8mfwlln2pqf5pg30c553ytc0000gn/T/ort1678906659374181145ScanCode-2.9.7/scancode-toolkit-2.9.7/scancode --version' in '/Users/alexskorohod/space/oss/ort/here/oss-review-toolkit'...

we spending each time 5 min to download & unpack scancode-toolkit.
@tsteenbe is it possible to make this download step not necessary if scancode-toolkit/archive/v2.9.7.tar.gz already was downloaded? just copy it to tmp dit & unpack there...

thanks

@sschuberth
Copy link
Member

sschuberth commented Jun 25, 2019

Thanks for the report, @sweetca. This is currently a known limitation, and I've started to draft a fix already some time ago in the bootstrap branch. For now, the easiest work-around is to globally install ScanCode so it's available in PATH via sudo -H pip install scancode-toolkit==2.9.7.

@sschuberth sschuberth added scanner About the scanner tool enhancement Issues that are considered to be enhancements labels Jun 25, 2019
@sweetca
Copy link
Author

sweetca commented Jun 25, 2019

Thanks for the report, @sweetca. This is currently a known limitation, and I've started to draft a fix already some time ago. For now, the easiest work-around is to globally install ScanCode so it's available in PATH via sudo -H pip install scancode-toolkit==2.9.7.

@sschuberth thanks a lot for fast reply. really helpful...

sschuberth added a commit that referenced this issue Oct 27, 2020
The bootstrapping mechanism was sub-optimal anyway (see [1]) and added
complexity to the code that was barely needed, so just remove it.
Instead, prefer mechanisms like our Dockerfile to add any required
scanners a before runtime of ORT.

[1] #1580

Signed-off-by: Sebastian Schuberth <[email protected]>
sschuberth added a commit that referenced this issue Oct 27, 2020
The bootstrapping mechanism was sub-optimal anyway (see [1]) and added
complexity to the code that was barely needed, so just remove it.
Instead, prefer mechanisms like our Dockerfile to add any required
scanners before runtime of ORT.

[1] #1580

Signed-off-by: Sebastian Schuberth <[email protected]>
sschuberth added a commit that referenced this issue Oct 28, 2020
The bootstrapping mechanism was sub-optimal anyway (see [1]) and added
complexity to the code that was barely needed, so just remove it.
Instead, prefer mechanisms like our Dockerfile to add any required
scanners before runtime of ORT.

[1] #1580

Signed-off-by: Sebastian Schuberth <[email protected]>
sschuberth added a commit that referenced this issue Oct 28, 2020
The bootstrapping mechanism was sub-optimal anyway (see [1]) and added
complexity to the code that was barely needed, so just remove it.
Instead, prefer mechanisms like our Dockerfile to add any required
scanners before runtime of ORT.

[1] #1580

Signed-off-by: Sebastian Schuberth <[email protected]>
sschuberth added a commit that referenced this issue Nov 25, 2021
Bootstrap scanners to the persistent ORT tools directory (like already
done for Flutter) to not bootstrap them again on the same machine.

Resolves #1580.

Signed-off-by: Sebastian Schuberth <[email protected]>
sschuberth added a commit that referenced this issue Nov 26, 2021
Bootstrap scanners to the persistent ORT tools directory (like already
done for Flutter) to not bootstrap them again on the same machine.

Resolves #1580.

Signed-off-by: Sebastian Schuberth <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues that are considered to be enhancements scanner About the scanner tool
Projects
None yet
Development

No branches or pull requests

2 participants