Commit 50fe8f1
authored
Doug/fix diff scan license options (#40)
* Fixed old diff scan endpoint to correctly use the include_license_details flag and default to true
* Bumped version
* Fixed license attributes that had changed for artifacts
* feat: implement lazy file loading to prevent 'too many open files' errors
- Add FileDescriptorManager singleton to track and limit open file descriptors
- Implement LazyFileLoader class that opens files only when needed for reading
- Add configurable max_open_files parameter to fullscans.post() and diffscans.create_from_repo()
- Auto-close files when fully read and use LRU eviction when limit reached
- Add comprehensive documentation with v3.0 migration notes
- Maintain backward compatibility with use_lazy_loading=False default
- Support cross-platform operation (Unix/Linux/macOS/Windows)
- Include retry logic with garbage collection for edge cases
This prevents file descriptor exhaustion when uploading large numbers of manifest files (e.g., 1956 files) on systems with low ulimit values.1 parent 88a2d96 commit 50fe8f1
File tree
7 files changed
+358
-81
lines changed- socketdev
- dependencies
- diffscans
- fullscans
- utils
- tests
7 files changed
+358
-81
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | | - | |
16 | | - | |
17 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
18 | 23 | | |
19 | 24 | | |
20 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
33 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
34 | 59 | | |
35 | 60 | | |
36 | 61 | | |
37 | 62 | | |
38 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
39 | 71 | | |
40 | 72 | | |
41 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
346 | | - | |
347 | | - | |
| 346 | + | |
348 | 347 | | |
349 | 348 | | |
350 | | - | |
351 | 349 | | |
352 | 350 | | |
353 | 351 | | |
| |||
360 | 358 | | |
361 | 359 | | |
362 | 360 | | |
| 361 | + | |
363 | 362 | | |
364 | | - | |
365 | | - | |
| 363 | + | |
| 364 | + | |
366 | 365 | | |
367 | 366 | | |
368 | | - | |
369 | | - | |
370 | | - | |
| 367 | + | |
371 | 368 | | |
372 | 369 | | |
373 | 370 | | |
| |||
723 | 720 | | |
724 | 721 | | |
725 | 722 | | |
726 | | - | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
727 | 748 | | |
728 | 749 | | |
729 | 750 | | |
730 | 751 | | |
731 | 752 | | |
732 | 753 | | |
733 | 754 | | |
734 | | - | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
735 | 762 | | |
736 | 763 | | |
737 | 764 | | |
| |||
766 | 793 | | |
767 | 794 | | |
768 | 795 | | |
769 | | - | |
| 796 | + | |
770 | 797 | | |
771 | 798 | | |
772 | | - | |
| 799 | + | |
773 | 800 | | |
774 | 801 | | |
775 | 802 | | |
| |||
0 commit comments