Repository navigation
fix: fingerprint every file of a plugin directory for the cache key - #101
Merged
Merged
Conversation
directory_fingerprint hashed .py and .toml files only, so a plugin that ships its rules or advisories as .json or .yaml could change without invalidating cached results. Every regular file now takes part, except bytecode and hidden files. Closes #94
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.
Closes #94.
What
directory_fingerprinthashed.pyand.tomlfiles only. A plugin shipping rules or advisories as.json/.yamlcould change without invalidating the cache: stale findings served silently.__pycache__and hidden files are skipped.suffixesparameter is gone; its only caller used the default.Tests
test_keys_depend_on_every_plugin_file: adding a.jsonnext to a plugin changes every module key; adding bytecode under__pycache__does not.Full suite: 890 passed.
ruff checkandmypy srcclean.Docs
Usage guide lists plugin files among what the key covers; changelog entry under Unreleased.