Skip crawling of excluded directories during path resolution#356
Open
mdrum wants to merge 3 commits into
Open
Conversation
nutjob4life
requested changes
May 29, 2026
Member
There was a problem hiding this comment.
Overall a nice refactor and the shared iterator is definitely the right move. Feel free to incorporate or ignore my other comments.
Update: one other quick note, this PR doesn't seem compatible with tox, which what our CI/CD will use to test the code, check formatting, create the documentation, etc.:
$ python3.13 -m venv .venv
$ . .venv/bin/activate
(.venv) $ pip install --editable '.[dev]'
…
(.venv) $ tox
.pkg: _optional_hooks> python /Users/kelly/Documents/Clients/JPL/PDS/Development/nasa-pds/data-upload-manager/.venv/lib/python3.13/site-packages/pyproject_api/_backend.py True setuptools.build_meta
…
Fix End of Files.........................................................Passed
Check that executables have shebangs.....................................Passed
Check for merge conflicts................................................Passed
Debug Statements (Python)................................................Passed
Check Yaml...............................................................Passed
Reorder python imports...................................................Failed
- hook id: reorder-python-imports
- exit code: 1
- files were modified by this hook
Reordering imports in src/pds/ingress/util/progress_util.py
flake8...................................................................Passed
Detect secrets...........................................................Passed
lint: exit 1 (2.56 seconds) /Users/kelly/Documents/Clients/JPL/PDS/Development/nasa-pds/data-upload-manager> python -m pre_commit run --color=always --all pid=34937
py313: OK (23.97=setup[1.28]+cmd[22.70] seconds)
docs: OK (1.63=setup[0.60]+cmd[1.03] seconds)
lint: FAIL code 1 (2.57=setup[0.01]+cmd[2.56] seconds)
evaluation failed :( (28.31 seconds)
But the following should fix it:
--- a/src/pds/ingress/util/progress_util.py
+++ b/src/pds/ingress/util/progress_util.py
@@ -9,11 +9,10 @@ states of an upload request.
"""
import multiprocessing
+from pds.ingress.util.path_util import PathUtil
from tqdm import tqdm
from tqdm.asyncio import tqdm_asyncio
-from pds.ingress.util.path_util import PathUtil
-
PATH_BAR = None
MANIFEST_BAR = None
TOTAL_INGRESS_BAR = None
Author
|
Fixed the linter issue and exclusions edge case. The assumption that passed exclusions are relative is consistent with the file filter, and prob worth a new issue/PR if we wanna change that. @nutjob4life could you have another look? |
nutjob4life
approved these changes
May 30, 2026
nutjob4life
left a comment
Member
There was a problem hiding this comment.
Outstanding @mdrum! Thanks for taking the time with this.
Tests: ✓
Delta: ✓
Approval: ✅
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🗒️ Summary
Updates ingress path resolution so excluded directory trees are pruned before traversal instead of being walked and filtered only after child files are discovered. This keeps excluded files out of path resolution, checksum manifest preparation, backend verification, and upload work.
Also updates path-resolution progress totals to use the same include/exclude/symlink-aware traversal logic as resolution, documents directory-pruning semantics, and adds regression coverage for directory excludes, deep file globs, include/exclude interaction, and symlink skipping.
🤖 AI Assistance Disclosure
Estimated % of code influenced by AI: 100 %
⚙️ Test Data and/or Report
Code
Automated tests added/updated in
tests/pds/ingress/util/test_path_util.py.Local verification:
Results:
9 passed36 passedLive Run
Used this updated version of DUM on live data to upload collection inventories and labels in a directory while excluding any data in subdirectories:
It had the expected behavior change: Previously, "Resolving ingress paths" would have included all files in excluded directories (in our case, tens of millions of files). Now, it only resolved paths for the expected number of files (2826, due to incrementing collection version every day).
♻️ Related Issues
No GitHub issue was provided for this change.
🤓 Reviewer Checklist
Reviewers: Please verify the following before approving this pull request.
Documentation and PR Content
Security & Quality
Testing & Validation
Maintenance